//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 // TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed // UNSUPPORTED: availability-pmr-missing // // namespace std::pmr { // template > // using set = // ::std::set> // // template > // using multiset = // ::std::multiset> // // } // namespace std::pmr #include #include #include #include int main(int, char**) { using V = char; using DC = std::less; using OC = std::greater; { using StdSet = std::set>; using PmrSet = std::pmr::set; static_assert(std::is_same::value, ""); } { using StdSet = std::set>; using PmrSet = std::pmr::set; static_assert(std::is_same::value, ""); } { std::pmr::set m; assert(m.get_allocator().resource() == std::pmr::get_default_resource()); } { using StdSet = std::multiset>; using PmrSet = std::pmr::multiset; static_assert(std::is_same::value, ""); } { using StdSet = std::multiset>; using PmrSet = std::pmr::multiset; static_assert(std::is_same::value, ""); } { std::pmr::multiset m; assert(m.get_allocator().resource() == std::pmr::get_default_resource()); } return 0; }