Marshall Clow | 5f2d5b9 | 2013-10-12 22:49:17 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Eric Fiselier | faa9a31 | 2015-08-19 04:10:15 +0000 | [diff] [blame] | 9 | |
Marshall Clow | 5f2d5b9 | 2013-10-12 22:49:17 +0000 | [diff] [blame] | 10 | // <future> |
| 11 | |
| 12 | // class packaged_task<R(ArgTypes...)> |
| 13 | // template <class F, class Allocator> |
Marshall Clow | 07546f3 | 2015-06-30 14:16:49 +0000 | [diff] [blame] | 14 | // packaged_task(allocator_arg_t, const Allocator& a, F&& f); |
Marshall Clow | 5f2d5b9 | 2013-10-12 22:49:17 +0000 | [diff] [blame] | 15 | // These constructors shall not participate in overload resolution if |
| 16 | // decay<F>::type is the same type as std::packaged_task<R(ArgTypes...)>. |
| 17 | |
| 18 | #include <future> |
| 19 | #include <cassert> |
| 20 | |
Dan Albert | 1d4a1ed | 2016-05-25 22:36:09 -0700 | [diff] [blame^] | 21 | #include "../../test_allocator.h" |
Marshall Clow | 5f2d5b9 | 2013-10-12 22:49:17 +0000 | [diff] [blame] | 22 | |
| 23 | struct A {}; |
| 24 | typedef std::packaged_task<A(int, char)> PT; |
| 25 | typedef volatile std::packaged_task<A(int, char)> VPT; |
| 26 | |
| 27 | int main() |
| 28 | { |
Dan Albert | 1d4a1ed | 2016-05-25 22:36:09 -0700 | [diff] [blame^] | 29 | PT p { std::allocator_arg_t{}, test_allocator<A>{}, VPT {}}; |
Marshall Clow | 5f2d5b9 | 2013-10-12 22:49:17 +0000 | [diff] [blame] | 30 | } |