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 // <memory>
11 
12 // template <class OuterAlloc, class... InnerAllocs>
13 //   class scoped_allocator_adaptor
14 
15 // typedef see below inner_allocator_type;
16 
17 #include <scoped_allocator>
18 #include <type_traits>
19 
20 #include "allocators.h"
21 
main()22 int main()
23 {
24 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
25 
26     static_assert((std::is_same<
27         std::scoped_allocator_adaptor<A1<int>>::inner_allocator_type,
28         std::scoped_allocator_adaptor<A1<int>>>::value), "");
29 
30     static_assert((std::is_same<
31         std::scoped_allocator_adaptor<A1<int>, A2<int>>::inner_allocator_type,
32         std::scoped_allocator_adaptor<A2<int>>>::value), "");
33 
34     static_assert((std::is_same<
35         std::scoped_allocator_adaptor<A1<int>, A2<int>, A3<int>>::inner_allocator_type,
36         std::scoped_allocator_adaptor<A2<int>, A3<int>>>::value), "");
37 
38 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
39 }
40