]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp
Import libc++ 3.7.0 release (r246257).
[FreeBSD/FreeBSD.git] / test / std / utilities / allocator.adaptor / allocator.adaptor.types / propagate_on_container_move_assignment.pass.cpp
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_move_assignment;
16
17 #include <scoped_allocator>
18 #include <type_traits>
19
20 #include "allocators.h"
21
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_move_assignment,
28         std::false_type>::value), "");
29
30     static_assert((std::is_same<
31         std::scoped_allocator_adaptor<A1<int>, A2<int>>::propagate_on_container_move_assignment,
32         std::true_type>::value), "");
33
34     static_assert((std::is_same<
35         std::scoped_allocator_adaptor<A1<int>, A2<int>, A3<int>>::propagate_on_container_move_assignment,
36         std::true_type>::value), "");
37
38 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
39 }