3#include <xrpl/beast/hash/uhash.h>
4#include <xrpl/beast/utility/instrumentation.h>
16template <
typename Key>
27 return ::beast::uhash<>{}(key);
60 typename partition_map_type::iterator
ait_;
61 typename map_type::iterator
mit_;
120 return !(lhs == rhs);
129 typename partition_map_type::iterator
ait_;
130 typename map_type::iterator
mit_;
196 return !(lhs == rhs);
211 it.ait_ = it.map_->end();
212 it.mit_ = it.map_->back().end();
219 for (it.ait_ = it.map_->begin(); it.ait_ != it.map_->end(); ++it.ait_)
221 if (it.ait_->begin() == it.ait_->end())
223 it.mit_ = it.ait_->begin();
238 "xrpl::partitioned_unordered_map::partitioned_unordered_map : "
239 "nonzero partitions");
304 it.mit_ = it.ait_->find(key);
305 if (it.mit_ == it.ait_->end())
326 template <
class T,
class U>
333 auto [eit, inserted] =
336 return {it, inserted};
339 template <
class T,
class U>
347 return {it, inserted};
std::size_t partitioner(Key const &key) const
partition_map_type & map()
std::vector< map_type > partition_map_type
iterator find(key_type const &key)
value_type const * const_pointer
const_iterator begin() const
const_iterator cend() const
const_iterator cbegin() const
std::size_t partitions() const
partitioned_unordered_map(std::optional< std::size_t > partitions=std::nullopt)
iterator erase(const_iterator position)
Value & operator[](Key const &key)
value_type const & const_reference
std::pair< iterator, bool > emplace(std::piecewise_construct_t const &, T &&keyTuple, U &&valueTuple)
const_iterator end() const
std::pair< iterator, bool > emplace(T &&key, U &&val)
void find(key_type const &key, T &it) const
const_iterator find(key_type const &key) const
T hardware_concurrency(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::size_t extract(uint256 const &key)
const_pointer operator->() const
friend bool operator!=(const_iterator const &lhs, const_iterator const &rhs)
const_iterator(partition_map_type *map)
const_reference operator*() const
partition_map_type::iterator ait_
const_iterator operator++(int)
friend bool operator==(const_iterator const &lhs, const_iterator const &rhs)
const_iterator & operator++()
const_iterator(iterator const &orig)
partition_map_type * map_
friend bool operator!=(iterator const &lhs, iterator const &rhs)
partition_map_type::iterator ait_
pointer operator->() const
reference operator*() const
iterator(partition_map_type *map)
partition_map_type * map_
friend bool operator==(iterator const &lhs, iterator const &rhs)