1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++03
11 
12 // <experimental/list>
13 
14 // namespace std { namespace experimental { namespace pmr {
15 // template <class T>
16 // using list =
17 //     ::std::list<T, polymorphic_allocator<T>>
18 //
19 // }}} // namespace std::experimental::pmr
20 
21 #include <experimental/list>
22 #include <experimental/memory_resource>
23 #include <type_traits>
24 #include <cassert>
25 
26 #include "test_macros.h"
27 
28 namespace pmr = std::experimental::pmr;
29 
main(int,char **)30 int main(int, char**)
31 {
32     using StdList = std::list<int, pmr::polymorphic_allocator<int>>;
33     using PmrList = pmr::list<int>;
34     static_assert(std::is_same<StdList, PmrList>::value, "");
35     PmrList d;
36     assert(d.get_allocator().resource() == pmr::get_default_resource());
37 
38   return 0;
39 }
40