//===----------------------------------------------------------------------===// // // 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 // // namespace std { namespace experimental { namespace pmr { // template , class P = equal_to > // using unordered_set = // ::std::unordered_set> // // template , class P = equal_to > // using unordered_multiset = // ::std::unordered_multiset> // // }}} // namespace std::experimental::pmr #include #include #include #include #include "test_macros.h" namespace pmr = std::experimental::pmr; template struct MyHash : std::hash {}; template struct MyPred : std::equal_to {}; int main(int, char**) { using V = char; using DH = std::hash; using MH = MyHash; using DP = std::equal_to; using MP = MyPred; { using StdSet = std::unordered_set>; using PmrSet = pmr::unordered_set; static_assert(std::is_same::value, ""); } { using StdSet = std::unordered_set>; using PmrSet = pmr::unordered_set; static_assert(std::is_same::value, ""); } { using StdSet = std::unordered_set>; using PmrSet = pmr::unordered_set; static_assert(std::is_same::value, ""); } { pmr::unordered_set m; assert(m.get_allocator().resource() == pmr::get_default_resource()); } { using StdSet = std::unordered_multiset>; using PmrSet = pmr::unordered_multiset; static_assert(std::is_same::value, ""); } { using StdSet = std::unordered_multiset>; using PmrSet = pmr::unordered_multiset; static_assert(std::is_same::value, ""); } { using StdSet = std::unordered_multiset>; using PmrSet = pmr::unordered_multiset; static_assert(std::is_same::value, ""); } { pmr::unordered_multiset m; assert(m.get_allocator().resource() == pmr::get_default_resource()); } return 0; }