Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-15 08:51:09

0001 /* Fast open-addressing concurrent hashset.
0002  *
0003  * Copyright 2023 Christian Mazakas.
0004  * Copyright 2023 Joaquin M Lopez Munoz.
0005  * Copyright 2024 Braden Ganetsky.
0006  * Distributed under the Boost Software License, Version 1.0.
0007  * (See accompanying file LICENSE_1_0.txt or copy at
0008  * http://www.boost.org/LICENSE_1_0.txt)
0009  *
0010  * See https://www.boost.org/libs/unordered for library home page.
0011  */
0012 
0013 #ifndef BOOST_UNORDERED_CONCURRENT_FLAT_SET_FWD_HPP
0014 #define BOOST_UNORDERED_CONCURRENT_FLAT_SET_FWD_HPP
0015 
0016 #include <boost/config.hpp>
0017 #include <boost/container_hash/hash_fwd.hpp>
0018 
0019 #include <functional>
0020 #include <memory>
0021 
0022 #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
0023 #include <memory_resource>
0024 #endif
0025 
0026 namespace boost {
0027   namespace unordered {
0028 
0029     template <class Key, class Hash = boost::hash<Key>,
0030       class Pred = std::equal_to<Key>,
0031       class Allocator = std::allocator<Key> >
0032     class concurrent_flat_set;
0033 
0034     template <class Key, class Hash, class KeyEqual, class Allocator>
0035     bool operator==(
0036       concurrent_flat_set<Key, Hash, KeyEqual, Allocator> const& lhs,
0037       concurrent_flat_set<Key, Hash, KeyEqual, Allocator> const& rhs);
0038 
0039     template <class Key, class Hash, class KeyEqual, class Allocator>
0040     bool operator!=(
0041       concurrent_flat_set<Key, Hash, KeyEqual, Allocator> const& lhs,
0042       concurrent_flat_set<Key, Hash, KeyEqual, Allocator> const& rhs);
0043 
0044     template <class Key, class Hash, class Pred, class Alloc>
0045     void swap(concurrent_flat_set<Key, Hash, Pred, Alloc>& x,
0046       concurrent_flat_set<Key, Hash, Pred, Alloc>& y)
0047       noexcept(noexcept(x.swap(y)));
0048 
0049     template <class K, class H, class P, class A, class Predicate>
0050     typename concurrent_flat_set<K, H, P, A>::size_type erase_if(
0051       concurrent_flat_set<K, H, P, A>& c, Predicate pred);
0052 
0053 #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
0054     namespace pmr {
0055       template <class Key, class Hash = boost::hash<Key>,
0056         class Pred = std::equal_to<Key> >
0057       using concurrent_flat_set = boost::unordered::concurrent_flat_set<Key,
0058         Hash, Pred, std::pmr::polymorphic_allocator<Key> >;
0059     } // namespace pmr
0060 #endif
0061 
0062   } // namespace unordered
0063 
0064   using boost::unordered::concurrent_flat_set;
0065 } // namespace boost
0066 
0067 #endif // BOOST_UNORDERED_CONCURRENT_FLAT_SET_FWD_HPP