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, c++11, c++14
10// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed
11// UNSUPPORTED: availability-pmr-missing
12
13// <list>
14
15// namespace std::pmr {
16// template <class T>
17// using list =
18// ::std::list<T, polymorphic_allocator<T>>
19//
20// } // namespace std::pmr
21
22#include <list>
23#include <memory_resource>
24#include <type_traits>
25#include <cassert>
26
27int main(int, char**) {
28 using StdList = std::list<int, std::pmr::polymorphic_allocator<int>>;
29 using PmrList = std::pmr::list<int>;
30 static_assert(std::is_same<StdList, PmrList>::value, "");
31 PmrList d;
32 assert(d.get_allocator().resource() == std::pmr::get_default_resource());
33
34 return 0;
35}
36

source code of libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop.pass.cpp