summaryrefslogtreecommitdiff
path: root/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp')
-rw-r--r--test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp b/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
index 138b657196da..dfd2f10b79e2 100644
--- a/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
@@ -66,7 +66,7 @@ void f3()
#endif
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
struct init1
{
@@ -101,7 +101,7 @@ void f2()
std::call_once(flg2, init2(), 4, 5);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // TEST_STD_VER >= 11
std::once_flag flg41;
std::once_flag flg42;
@@ -135,7 +135,7 @@ void f42()
std::call_once(flg41, init41);
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
class MoveOnly
{
@@ -174,7 +174,6 @@ public:
void operator()(int&) {}
};
-#if TEST_STD_VER >= 11
// reference qualifiers on functions are a C++11 extension
struct RefQual
{
@@ -185,8 +184,8 @@ struct RefQual
void operator()() & { ++lv_called; }
void operator()() && { ++rv_called; }
};
-#endif
-#endif
+
+#endif // TEST_STD_VER >= 11
int main()
{
@@ -218,7 +217,7 @@ int main()
assert(init41_called == 1);
assert(init42_called == 1);
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
// check functors with 1 arg
{
std::thread t0(f1);
@@ -245,7 +244,6 @@ int main()
int i = 0;
std::call_once(f, NonCopyable(), i);
}
-#if TEST_STD_VER >= 11
// reference qualifiers on functions are a C++11 extension
{
std::once_flag f1, f2;
@@ -255,6 +253,5 @@ int main()
std::call_once(f2, std::move(rq));
assert(rq.rv_called == 1);
}
-#endif
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // TEST_STD_VER >= 11
}