1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03
10
11// <memory>
12
13// template <class OuterAlloc, class... InnerAllocs>
14// class scoped_allocator_adaptor
15
16// typedef see below propagate_on_container_swap;
17
18#include <scoped_allocator>
19#include <type_traits>
20
21#include "test_macros.h"
22#include "allocators.h"
23
24int main(int, char**) {
25 static_assert(
26 (std::is_same< std::scoped_allocator_adaptor<A1<int>>::propagate_on_container_swap, std::false_type>::value), "");
27
28 static_assert((std::is_same< std::scoped_allocator_adaptor<A1<int>, A2<int>>::propagate_on_container_swap,
29 std::false_type>::value),
30 "");
31
32 static_assert((std::is_same< std::scoped_allocator_adaptor<A1<int>, A2<int>, A3<int>>::propagate_on_container_swap,
33 std::true_type>::value),
34 "");
35
36 return 0;
37}
38

source code of libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp