diff --git a/include/boost/unordered/concurrent_flat_map_fwd.hpp b/include/boost/unordered/concurrent_flat_map_fwd.hpp index 99fa130c..e66f3674 100644 --- a/include/boost/unordered/concurrent_flat_map_fwd.hpp +++ b/include/boost/unordered/concurrent_flat_map_fwd.hpp @@ -1,6 +1,7 @@ /* Fast open-addressing concurrent hashmap. * * Copyright 2023 Christian Mazakas. + * Copyright 2024 Braden Ganetsky. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -11,11 +12,16 @@ #ifndef BOOST_UNORDERED_CONCURRENT_FLAT_MAP_FWD_HPP #define BOOST_UNORDERED_CONCURRENT_FLAT_MAP_FWD_HPP +#include #include #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { @@ -43,6 +49,15 @@ namespace boost { typename concurrent_flat_map::size_type erase_if( concurrent_flat_map& c, Predicate pred); +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class Pred = std::equal_to > + using concurrent_flat_map = boost::unordered::concurrent_flat_map > >; + } // namespace pmr +#endif + } // namespace unordered using boost::unordered::concurrent_flat_map; diff --git a/include/boost/unordered/concurrent_flat_set_fwd.hpp b/include/boost/unordered/concurrent_flat_set_fwd.hpp index 03bcc5b4..1133d9c9 100644 --- a/include/boost/unordered/concurrent_flat_set_fwd.hpp +++ b/include/boost/unordered/concurrent_flat_set_fwd.hpp @@ -2,6 +2,7 @@ * * Copyright 2023 Christian Mazakas. * Copyright 2023 Joaquin M Lopez Munoz. + * Copyright 2024 Braden Ganetsky. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -12,11 +13,16 @@ #ifndef BOOST_UNORDERED_CONCURRENT_FLAT_SET_FWD_HPP #define BOOST_UNORDERED_CONCURRENT_FLAT_SET_FWD_HPP +#include #include #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { @@ -44,6 +50,15 @@ namespace boost { typename concurrent_flat_set::size_type erase_if( concurrent_flat_set& c, Predicate pred); +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class Pred = std::equal_to > + using concurrent_flat_set = boost::unordered::concurrent_flat_set >; + } // namespace pmr +#endif + } // namespace unordered using boost::unordered::concurrent_flat_set; diff --git a/include/boost/unordered/unordered_flat_map_fwd.hpp b/include/boost/unordered/unordered_flat_map_fwd.hpp index 5551d1a6..f758f83a 100644 --- a/include/boost/unordered/unordered_flat_map_fwd.hpp +++ b/include/boost/unordered/unordered_flat_map_fwd.hpp @@ -1,5 +1,6 @@ // Copyright (C) 2022 Christian Mazakas +// Copyright (C) 2024 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +16,10 @@ #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { template , @@ -36,6 +41,16 @@ namespace boost { void swap(unordered_flat_map& lhs, unordered_flat_map& rhs) noexcept(noexcept(lhs.swap(rhs))); + +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class KeyEqual = std::equal_to > + using unordered_flat_map = + boost::unordered::unordered_flat_map > >; + } // namespace pmr +#endif } // namespace unordered using boost::unordered::unordered_flat_map; diff --git a/include/boost/unordered/unordered_flat_set_fwd.hpp b/include/boost/unordered/unordered_flat_set_fwd.hpp index 02435bab..9214939f 100644 --- a/include/boost/unordered/unordered_flat_set_fwd.hpp +++ b/include/boost/unordered/unordered_flat_set_fwd.hpp @@ -1,5 +1,6 @@ // Copyright (C) 2022 Christian Mazakas +// Copyright (C) 2024 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +16,10 @@ #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { template , @@ -36,6 +41,15 @@ namespace boost { void swap(unordered_flat_set& lhs, unordered_flat_set& rhs) noexcept(noexcept(lhs.swap(rhs))); + +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class KeyEqual = std::equal_to > + using unordered_flat_set = boost::unordered::unordered_flat_set >; + } // namespace pmr +#endif } // namespace unordered using boost::unordered::unordered_flat_set; diff --git a/include/boost/unordered/unordered_map_fwd.hpp b/include/boost/unordered/unordered_map_fwd.hpp index b374965e..375889a1 100644 --- a/include/boost/unordered/unordered_map_fwd.hpp +++ b/include/boost/unordered/unordered_map_fwd.hpp @@ -1,6 +1,7 @@ // Copyright (C) 2008-2011 Daniel James. // Copyright (C) 2022-2023 Christian Mazakas +// Copyright (C) 2024 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +17,10 @@ #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { template , @@ -58,6 +63,20 @@ namespace boost { template class node_handle_map; template struct insert_return_type_map; + +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class P = std::equal_to > + using unordered_map = boost::unordered::unordered_map > >; + + template , + class P = std::equal_to > + using unordered_multimap = boost::unordered::unordered_multimap > >; + } // namespace pmr +#endif } // namespace unordered using boost::unordered::unordered_map; diff --git a/include/boost/unordered/unordered_node_map_fwd.hpp b/include/boost/unordered/unordered_node_map_fwd.hpp index ec598168..95ac162d 100644 --- a/include/boost/unordered/unordered_node_map_fwd.hpp +++ b/include/boost/unordered/unordered_node_map_fwd.hpp @@ -1,5 +1,6 @@ // Copyright (C) 2022 Christian Mazakas +// Copyright (C) 2024 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +16,10 @@ #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { template , @@ -36,6 +41,16 @@ namespace boost { void swap(unordered_node_map& lhs, unordered_node_map& rhs) noexcept(noexcept(lhs.swap(rhs))); + +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class KeyEqual = std::equal_to > + using unordered_node_map = + boost::unordered::unordered_node_map > >; + } // namespace pmr +#endif } // namespace unordered using boost::unordered::unordered_node_map; diff --git a/include/boost/unordered/unordered_node_set_fwd.hpp b/include/boost/unordered/unordered_node_set_fwd.hpp index 977d032f..75215f2a 100644 --- a/include/boost/unordered/unordered_node_set_fwd.hpp +++ b/include/boost/unordered/unordered_node_set_fwd.hpp @@ -1,5 +1,6 @@ // Copyright (C) 2023 Christian Mazakas +// Copyright (C) 2024 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +16,10 @@ #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { template , @@ -36,6 +41,15 @@ namespace boost { void swap(unordered_node_set& lhs, unordered_node_set& rhs) noexcept(noexcept(lhs.swap(rhs))); + +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , + class KeyEqual = std::equal_to > + using unordered_node_set = boost::unordered::unordered_node_set >; + } // namespace pmr +#endif } // namespace unordered using boost::unordered::unordered_node_set; diff --git a/include/boost/unordered/unordered_set_fwd.hpp b/include/boost/unordered/unordered_set_fwd.hpp index b74c6136..aea95d88 100644 --- a/include/boost/unordered/unordered_set_fwd.hpp +++ b/include/boost/unordered/unordered_set_fwd.hpp @@ -1,6 +1,7 @@ // Copyright (C) 2008-2011 Daniel James. // Copyright (C) 2022 Christian Mazakas +// Copyright (C) 2024 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +17,10 @@ #include #include +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE +#include +#endif + namespace boost { namespace unordered { template , class P = std::equal_to, @@ -56,6 +61,18 @@ namespace boost { template class node_handle_set; template struct insert_return_type_set; + +#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE + namespace pmr { + template , class P = std::equal_to > + using unordered_set = boost::unordered::unordered_set >; + + template , class P = std::equal_to > + using unordered_multiset = boost::unordered::unordered_multiset >; + } // namespace pmr +#endif } // namespace unordered using boost::unordered::unordered_multiset;