Add more test cases to packaged_task copyability test
authorEric Fiselier <eric@efcs.ca>
Thu, 8 Dec 2016 10:02:04 +0000 (10:02 +0000)
committerEric Fiselier <eric@efcs.ca>
Thu, 8 Dec 2016 10:02:04 +0000 (10:02 +0000)
llvm-svn: 289034

libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp

index 8882fd1..9d1ad61 100644 (file)
@@ -29,6 +29,8 @@ typedef volatile std::packaged_task<A(int, char)> VPT;
 int main()
 {
     VPT init{};
-    PT p{init}; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task<A (int, char)>')}}
-    // expected-note@future:* 1 {{candidate template ignored: disabled by 'enable_if'}}
+    auto const& c_init = init;
+    PT p1{init}; // expected-error {{no matching constructor}}
+    PT p2{c_init}; // expected-error {{no matching constructor}}
+    PT p3{std::move(init)}; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task<A (int, char)>')}}
 }