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
This commit is contained in:
@@ -29,6 +29,8 @@ typedef volatile std::packaged_task<A(int, char)> VPT;
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
VPT init{};
|
VPT init{};
|
||||||
PT p{init}; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task<A (int, char)>')}}
|
auto const& c_init = init;
|
||||||
// expected-note@future:* 1 {{candidate template ignored: disabled by 'enable_if'}}
|
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)>')}}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user