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 propagate_on_container_swap;
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>>::propagate_on_container_swap,
28         std::false_type>::value), "");
29 
30     static_assert((std::is_same<
31         std::scoped_allocator_adaptor<A1<int>, A2<int>>::propagate_on_container_swap,
32         std::false_type>::value), "");
33 
34     static_assert((std::is_same<
35         std::scoped_allocator_adaptor<A1<int>, A2<int>, A3<int>>::propagate_on_container_swap,
36         std::true_type>::value), "");
37 
38 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
39 }
40