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 //===----------------------------------------------------------------------===// 9 10 // <future> 11 12 // class packaged_task<R(ArgTypes...)> 13 // template <class F> 14 // packaged_task(F&& f); 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 21 struct A {}; 22 typedef std::packaged_task<A(int, char)> PT; 23 typedef volatile std::packaged_task<A(int, char)> VPT; 24 25 26 int main() 27 { 28 PT p { VPT{} }; 29 } 30