blob: e4df4ec225e70e6c7227c23cbf10b80d55939b8f [file] [log] [blame]
Marshall Clow5f2d5b92013-10-12 22:49:17 +00001//===----------------------------------------------------------------------===//
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 Fiselierfaa9a312015-08-19 04:10:15 +00009
Marshall Clow5f2d5b92013-10-12 22:49:17 +000010// <future>
11
12// class packaged_task<R(ArgTypes...)>
13// template <class F, class Allocator>
Marshall Clow07546f32015-06-30 14:16:49 +000014// packaged_task(allocator_arg_t, const Allocator& a, F&& f);
Marshall Clow5f2d5b92013-10-12 22:49:17 +000015// 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 Albert1d4a1ed2016-05-25 22:36:09 -070021#include "../../test_allocator.h"
Marshall Clow5f2d5b92013-10-12 22:49:17 +000022
23struct A {};
24typedef std::packaged_task<A(int, char)> PT;
25typedef volatile std::packaged_task<A(int, char)> VPT;
26
27int main()
28{
Dan Albert1d4a1ed2016-05-25 22:36:09 -070029 PT p { std::allocator_arg_t{}, test_allocator<A>{}, VPT {}};
Marshall Clow5f2d5b92013-10-12 22:49:17 +000030}