From 1fc9d0b0e4657b29ff140fa03dca1711aa5a1198 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 10 Aug 2018 00:25:53 +0100 Subject: Define aliases for containers using polymorphic_allocator These aliases are placed in the top-level header, e.g. not . This ensures that they refer to whichever of std::vector or __debug::vector or __profile::vector is in use when the header is included. * include/std/deque (std::pmr::deque): Declare alias. * include/std/forward_list (std::pmr::forward_list): Likewise. * include/std/list (std::pmr::list): Likewise. * include/std/map (std::pmr::map, std::pmr::multimap): Likewise. * include/std/regex (std::pmr::match_results, std::pmr::cmatch) (std::pmr::smatch, std::pmr::wcmatch, std::pmr::wsmatch): Likewise. * include/std/set (std::pmr::set, std::pmr::multiset): Likewise. * include/std/string (std::pmr::basic_string, std::pmr::string) (std::pmr::u16string, std::pmr::u32string, std::pmr::wstring): Likewise. * include/std/unordered_map (std::pmr::unordered_map) (std::pmr::unordered_multimap): Likewise. * include/std/unordered_set (std::pmr::unordered_set) (std::pmr::unordered_multiset): Likewise. * include/std/vector (std::pmr::vector): Likewise. * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: New test. * testsuite/23_containers/deque/types/pmr_typedefs.cc: New test. * testsuite/23_containers/forward_list/pmr_typedefs.cc: New test. * testsuite/23_containers/list/pmr_typedefs.cc: New test. * testsuite/23_containers/map/pmr_typedefs.cc: New test. * testsuite/23_containers/multimap/pmr_typedefs.cc: New test. * testsuite/23_containers/multiset/pmr_typedefs.cc: New test. * testsuite/23_containers/set/pmr_typedefs.cc: New test. * testsuite/23_containers/unordered_map/pmr_typedefs.cc: New test. * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc: New test. * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New test. * testsuite/23_containers/unordered_set/pmr_typedefs.cc: New test. * testsuite/23_containers/vector/pmr_typedefs.cc: New test. * testsuite/28_regex/match_results/pmr_typedefs.cc: New test. From-SVN: r263456 --- libstdc++-v3/include/std/deque | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libstdc++-v3/include/std/deque') diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque index 896ec8a..d2c75f1 100644 --- a/libstdc++-v3/include/std/deque +++ b/libstdc++-v3/include/std/deque @@ -73,4 +73,18 @@ # include #endif +#if __cplusplus >= 201703L +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + namespace pmr + { + template class polymorphic_allocator; + template + using deque = std::deque<_Tp, polymorphic_allocator<_Tp>>; + } // namespace pmr +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std +#endif // C++17 + #endif /* _GLIBCXX_DEQUE */ -- cgit v1.1