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: c++98, c++03
11 
12 // <experimental/memory_resource>
13 
14 // template <class Alloc> class resource_adaptor_imp;
15 
16 #include <experimental/memory_resource>
17 #include <type_traits>
18 #include <memory>
19 #include <cassert>
20 
21 namespace ex = std::experimental::pmr;
22 
main()23 int main()
24 {
25     typedef ex::resource_adaptor<std::allocator<void>> R;
26     typedef ex::resource_adaptor<std::allocator<long>> R2;
27     static_assert(std::is_same<R, R2>::value, "");
28     {
29         static_assert(std::is_base_of<ex::memory_resource, R>::value, "");
30         static_assert(std::is_same<R::allocator_type, std::allocator<char>>::value, "");
31     }
32     {
33         static_assert(std::is_default_constructible<R>::value, "");
34         static_assert(std::is_copy_constructible<R>::value, "");
35         static_assert(std::is_move_constructible<R>::value, "");
36         static_assert(std::is_copy_assignable<R>::value, "");
37         static_assert(std::is_move_assignable<R>::value, "");
38    }
39 }
40