aboutsummaryrefslogtreecommitdiff
path: root/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp')
-rw-r--r--test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp b/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp
new file mode 100644
index 000000000000..450ba8361391
--- /dev/null
+++ b/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+// 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;
+
+// once_flag(const once_flag&) = delete;
+
+#include <mutex>
+
+int main()
+{
+ std::once_flag f;
+ std::once_flag f2(f);
+}