36 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed11// UNSUPPORTED: availability-pmr-missing12 13// <deque>14 15// namespace std::pmr {16// template <class T>17// using deque =18// ::std::deque<T, polymorphic_allocator<T>>19//20// } // namespace std::pmr21 22#include <deque>23#include <memory_resource>24#include <type_traits>25#include <cassert>26 27int main(int, char**) {28 using StdDeque = std::deque<int, std::pmr::polymorphic_allocator<int>>;29 using PmrDeque = std::pmr::deque<int>;30 static_assert(std::is_same<StdDeque, PmrDeque>::value, "");31 PmrDeque d;32 assert(d.get_allocator().resource() == std::pmr::get_default_resource());33 34 return 0;35}36