• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // UNSUPPORTED: libcpp-has-no-threads
11 
12 // This test is marked XFAIL and not UNSUPPORTED because the non-variadic
13 // declaration of packaged_task is available in C++03. Therefore the test
14 // should fail because the static_assert fires and not because std::packaged_task
15 // in undefined.
16 // XFAIL: c++98, c++03
17 
18 // <future>
19 
20 // class packaged_task<R(ArgTypes...)>
21 
22 // template <class Callable, class Alloc>
23 //   struct uses_allocator<packaged_task<Callable>, Alloc>
24 //      : true_type { };
25 
26 #include <future>
27 #include "test_allocator.h"
28 
main()29 int main()
30 {
31     static_assert((std::uses_allocator<std::packaged_task<double(int, char)>, test_allocator<int> >::value), "");
32 }
33