summaryrefslogtreecommitdiffstats
path: root/libcxx/test/thread/thread.threads
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2013-10-12 22:49:17 +0000
committerMarshall Clow <mclow.lists@gmail.com>2013-10-12 22:49:17 +0000
commitd58daf94337f5e06d867c64869f2763e73f01df2 (patch)
tree5ae244e6bb9f33f821fc4e031e878f72fedbe6bd /libcxx/test/thread/thread.threads
parentb212f3baa1c17e7739d4cebba3b3697292cf796e (diff)
downloadbcm5719-llvm-d58daf94337f5e06d867c64869f2763e73f01df2.tar.gz
bcm5719-llvm-d58daf94337f5e06d867c64869f2763e73f01df2.zip
LWG Issue 2097: packaged_task constructors should be constrained
llvm-svn: 192544
Diffstat (limited to 'libcxx/test/thread/thread.threads')
-rw-r--r--libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp
new file mode 100644
index 00000000000..a331add9626
--- /dev/null
+++ b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <thread>
+
+// class thread
+// template <class _Fp, class ..._Args,
+// explicit thread(_Fp&& __f, _Args&&... __args);
+// This constructor shall not participate in overload resolution
+// if decay<F>::type is the same type as std::thread.
+
+
+#include <thread>
+#include <cassert>
+
+int main()
+{
+ volatile std::thread t1;
+ std::thread t2 ( t1, 1, 2.0 );
+}
OpenPOWER on IntegriCloud