mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
Add unordered container pmr aliases
This commit is contained in:
@ -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 <boost/config.hpp>
|
||||
#include <boost/container_hash/hash_fwd.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
|
||||
@ -43,6 +49,15 @@ namespace boost {
|
||||
typename concurrent_flat_map<K, T, H, P, A>::size_type erase_if(
|
||||
concurrent_flat_map<K, T, H, P, A>& c, Predicate pred);
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class Key, class T, class Hash = boost::hash<Key>,
|
||||
class Pred = std::equal_to<Key> >
|
||||
using concurrent_flat_map = boost::unordered::concurrent_flat_map<Key, T,
|
||||
Hash, Pred, std::pmr::polymorphic_allocator<std::pair<Key const, T> > >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::concurrent_flat_map;
|
||||
|
@ -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 <boost/config.hpp>
|
||||
#include <boost/container_hash/hash_fwd.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
|
||||
@ -44,6 +50,15 @@ namespace boost {
|
||||
typename concurrent_flat_set<K, H, P, A>::size_type erase_if(
|
||||
concurrent_flat_set<K, H, P, A>& c, Predicate pred);
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class Key, class Hash = boost::hash<Key>,
|
||||
class Pred = std::equal_to<Key> >
|
||||
using concurrent_flat_set = boost::unordered::concurrent_flat_set<Key,
|
||||
Hash, Pred, std::pmr::polymorphic_allocator<Key> >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::concurrent_flat_set;
|
||||
|
@ -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 <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
template <class Key, class T, class Hash = boost::hash<Key>,
|
||||
@ -36,6 +41,16 @@ namespace boost {
|
||||
void swap(unordered_flat_map<Key, T, Hash, KeyEqual, Allocator>& lhs,
|
||||
unordered_flat_map<Key, T, Hash, KeyEqual, Allocator>& rhs)
|
||||
noexcept(noexcept(lhs.swap(rhs)));
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class Key, class T, class Hash = boost::hash<Key>,
|
||||
class KeyEqual = std::equal_to<Key> >
|
||||
using unordered_flat_map =
|
||||
boost::unordered::unordered_flat_map<Key, T, Hash, KeyEqual,
|
||||
std::pmr::polymorphic_allocator<std::pair<const Key, T> > >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::unordered_flat_map;
|
||||
|
@ -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 <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
template <class Key, class Hash = boost::hash<Key>,
|
||||
@ -36,6 +41,15 @@ namespace boost {
|
||||
void swap(unordered_flat_set<Key, Hash, KeyEqual, Allocator>& lhs,
|
||||
unordered_flat_set<Key, Hash, KeyEqual, Allocator>& rhs)
|
||||
noexcept(noexcept(lhs.swap(rhs)));
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class Key, class Hash = boost::hash<Key>,
|
||||
class KeyEqual = std::equal_to<Key> >
|
||||
using unordered_flat_set = boost::unordered::unordered_flat_set<Key, Hash,
|
||||
KeyEqual, std::pmr::polymorphic_allocator<Key> >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::unordered_flat_set;
|
||||
|
@ -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 <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
template <class K, class T, class H = boost::hash<K>,
|
||||
@ -58,6 +63,20 @@ namespace boost {
|
||||
|
||||
template <class N, class K, class T, class A> class node_handle_map;
|
||||
template <class Iter, class NodeType> struct insert_return_type_map;
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class K, class T, class H = boost::hash<K>,
|
||||
class P = std::equal_to<K> >
|
||||
using unordered_map = boost::unordered::unordered_map<K, T, H, P,
|
||||
std::pmr::polymorphic_allocator<std::pair<const K, T> > >;
|
||||
|
||||
template <class K, class T, class H = boost::hash<K>,
|
||||
class P = std::equal_to<K> >
|
||||
using unordered_multimap = boost::unordered::unordered_multimap<K, T, H,
|
||||
P, std::pmr::polymorphic_allocator<std::pair<const K, T> > >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::unordered_map;
|
||||
|
@ -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 <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
template <class Key, class T, class Hash = boost::hash<Key>,
|
||||
@ -36,6 +41,16 @@ namespace boost {
|
||||
void swap(unordered_node_map<Key, T, Hash, KeyEqual, Allocator>& lhs,
|
||||
unordered_node_map<Key, T, Hash, KeyEqual, Allocator>& rhs)
|
||||
noexcept(noexcept(lhs.swap(rhs)));
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class Key, class T, class Hash = boost::hash<Key>,
|
||||
class KeyEqual = std::equal_to<Key> >
|
||||
using unordered_node_map =
|
||||
boost::unordered::unordered_node_map<Key, T, Hash, KeyEqual,
|
||||
std::pmr::polymorphic_allocator<std::pair<const Key, T> > >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::unordered_node_map;
|
||||
|
@ -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 <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
template <class Key, class Hash = boost::hash<Key>,
|
||||
@ -36,6 +41,15 @@ namespace boost {
|
||||
void swap(unordered_node_set<Key, Hash, KeyEqual, Allocator>& lhs,
|
||||
unordered_node_set<Key, Hash, KeyEqual, Allocator>& rhs)
|
||||
noexcept(noexcept(lhs.swap(rhs)));
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class Key, class Hash = boost::hash<Key>,
|
||||
class KeyEqual = std::equal_to<Key> >
|
||||
using unordered_node_set = boost::unordered::unordered_node_set<Key, Hash,
|
||||
KeyEqual, std::pmr::polymorphic_allocator<Key> >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::unordered_node_set;
|
||||
|
@ -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 <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
template <class T, class H = boost::hash<T>, class P = std::equal_to<T>,
|
||||
@ -56,6 +61,18 @@ namespace boost {
|
||||
|
||||
template <class N, class T, class A> class node_handle_set;
|
||||
template <class Iter, class NodeType> struct insert_return_type_set;
|
||||
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
namespace pmr {
|
||||
template <class T, class H = boost::hash<T>, class P = std::equal_to<T> >
|
||||
using unordered_set = boost::unordered::unordered_set<T, H, P,
|
||||
std::pmr::polymorphic_allocator<T> >;
|
||||
|
||||
template <class T, class H = boost::hash<T>, class P = std::equal_to<T> >
|
||||
using unordered_multiset = boost::unordered::unordered_multiset<T, H, P,
|
||||
std::pmr::polymorphic_allocator<T> >;
|
||||
} // namespace pmr
|
||||
#endif
|
||||
} // namespace unordered
|
||||
|
||||
using boost::unordered::unordered_multiset;
|
||||
|
Reference in New Issue
Block a user