| 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 | // <future> |
| 12 | |
| 13 | // class promise<R> |
| 14 | |
| 15 | // template <class R, class Alloc> |
| 16 | // struct uses_allocator<promise<R>, Alloc> |
| 17 | // : true_type { }; |
| 18 | |
| 19 | #include <future> |
| 20 | #include "test_macros.h" |
| 21 | #include "test_allocator.h" |
| 22 | |
| 23 | int main(int, char**) |
| 24 | { |
| 25 | static_assert((std::uses_allocator<std::promise<int>, test_allocator<int> >::value), "" ); |
| 26 | static_assert((std::uses_allocator<std::promise<int&>, test_allocator<int> >::value), "" ); |
| 27 | static_assert((std::uses_allocator<std::promise<void>, test_allocator<void> >::value), "" ); |
| 28 | |
| 29 | return 0; |
| 30 | } |
| 31 | |