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/forward_list>
13 
14 // namespace std { namespace experimental { namespace pmr {
15 // template <class T>
16 // using forward_list =
17 //     ::std::forward_list<T, polymorphic_allocator<T>>
18 //
19 // }}} // namespace std::experimental::pmr
20 
21 #include <experimental/forward_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 StdForwardList = std::forward_list<int, pmr::polymorphic_allocator<int>>;
33     using PmrForwardList = pmr::forward_list<int>;
34     static_assert(std::is_same<StdForwardList, PmrForwardList>::value, "");
35     PmrForwardList d;
36     assert(d.get_allocator().resource() == pmr::get_default_resource());
37 
38   return 0;
39 }
40