blob: 9c2c91789ef87f29b7817b819e1fe6ef31361109 [file] [log] [blame]
Eric Fiselierdba23b42016-05-07 03:09:55 +00001// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// The LLVM Compiler Infrastructure
5//
6// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
8//
9//===----------------------------------------------------------------------===//
10
11// UNSUPPORTED: c++98, c++03
12
13// <experimental/list>
14
15// namespace std { namespace experimental { namespace pmr {
16// template <class T>
17// using list =
18// ::std::list<T, polymorphic_allocator<T>>
19//
20// }}} // namespace std::experimental::pmr
21
22#include <experimental/list>
23#include <experimental/memory_resource>
24#include <type_traits>
25#include <cassert>
26
27namespace pmr = std::experimental::pmr;
28
29int main()
30{
31 using StdList = std::list<int, pmr::polymorphic_allocator<int>>;
32 using PmrList = pmr::list<int>;
33 static_assert(std::is_same<StdList, PmrList>::value, "");
34 PmrList d;
35 assert(d.get_allocator().resource() == pmr::get_default_resource());
36}