Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / thread / futures / futures.promise / uses_allocator.pass.cpp
blob7c859a999aced3675bc1fc7956fe5377251d29ca
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
11 // <future>
13 // class promise<R>
15 // template <class R, class Alloc>
16 // struct uses_allocator<promise<R>, Alloc>
17 // : true_type { };
19 #include <future>
20 #include "test_macros.h"
21 #include "test_allocator.h"
23 int main(int, char**)
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), "");
29 return 0;