forked from boostorg/beast
Fix intrinsic calls in static_initializer
This commit is contained in:
1 parent
cc11b498cc
commit
11d667c830
1 file changed
+2
-2
@@ -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