mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix intrinsic calls in static_initializer
This commit is contained in:
@@ -122,14 +122,14 @@ static_initializer <T, Tag>::static_initializer (Args&&... args)
|
||||
for(;;)
|
||||
{
|
||||
long prev;
|
||||
prev = InterlockedCompareExchange(&_.state, 1, 0);
|
||||
prev = _InterlockedCompareExchange(&_.state, 1, 0);
|
||||
if (prev == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
::new(t) T (std::forward<Args>(args)...);
|
||||
static destroyer on_exit (t);
|
||||
InterlockedIncrement(&_.state);
|
||||
_InterlockedIncrement(&_.state);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user