summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-08 10:02:04 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-08 10:02:04 +0000
commit22e3b2af5014c449b5546aca8f95bfd13adf7b01 (patch)
treedde58f3194ee1cd13ed9f9fc4a97b99f859d7147
parent52b1b1733690da2a86aba52f7c76e9f0b89ea0ab (diff)
downloadexternal_libcxx-22e3b2af5014c449b5546aca8f95bfd13adf7b01.tar.gz
external_libcxx-22e3b2af5014c449b5546aca8f95bfd13adf7b01.tar.bz2
external_libcxx-22e3b2af5014c449b5546aca8f95bfd13adf7b01.zip
Add more test cases to packaged_task copyability test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289034 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp b/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp
index 8882fd1f1..9d1ad61ce 100644
--- a/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp
+++ b/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp
@@ -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)>')}}
}