]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp
Vendor import of libc++ trunk r290819:
[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 // UNSUPPORTED: c++98, c++03
11
12 // <memory>
13
14 // template <class OuterAlloc, class... InnerAllocs>
15 //   class scoped_allocator_adaptor
16
17 // typedef see below propagate_on_container_move_assignment;
18
19 #include <scoped_allocator>
20 #include <type_traits>
21
22 #include "allocators.h"
23
24 int main()
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 }