Debian Codegraph @

libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.compile.pass.cpp

raw
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // UNSUPPORTED: no-threads
10
11 // packaged_task allocator support was removed in C++17 (LWG 2976)
12 // REQUIRES: c++11 || c++14
13
14 // <future>
15
16 // class packaged_task<R(ArgTypes...)>
17
18 // template <class Callable, class Alloc>
19 // struct uses_allocator<packaged_task<Callable>, Alloc>
20 // : true_type { };
21
22 #include <future>
23 #include "test_macros.h"
24 #include "test_allocator.h"
25
26 static_assert((std::uses_allocator<std::packaged_task<double(int, char)>, test_allocator<int> >::value), "");