diff options
Diffstat (limited to 'libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp')
-rw-r--r-- | libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp new file mode 100644 index 00000000000..6995f064833 --- /dev/null +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <mutex> + +// struct once_flag; + +// constexpr once_flag() noexcept; + +#include <mutex> + +int main() +{ + { + std::once_flag f; + } +#ifndef _LIBCPP_HAS_NO_CONSTEXPR + { + constexpr std::once_flag f; + } +#endif +} |