3#include <xrpl/beast/clock/abstract_clock.h>
4#include <xrpl/beast/container/aged_container.h>
5#include <xrpl/beast/container/detail/aged_associative_container.h>
6#include <xrpl/beast/container/detail/aged_container_iterator.h>
7#include <xrpl/beast/container/detail/empty_base_optimization.h>
9#include <boost/intrusive/list.hpp>
10#include <boost/intrusive/unordered_set.hpp>
33#ifndef BEAST_NO_CXX14_IS_PERMUTATION
34#define BEAST_NO_CXX14_IS_PERMUTATION 1
62 class Clock = std::chrono::steady_clock,
63 class Hash = std::hash<Key>,
64 class KeyEqual = std::equal_to<Key>,
65 class Allocator = std::allocator<std::conditional_t<IsMap, std::pair<Key const, T>, Key>>>
91 struct Element : boost::intrusive::unordered_set_base_hook<
92 boost::intrusive::link_mode<boost::intrusive::normal_link>>,
93 boost::intrusive::list_base_hook<
94 boost::intrusive::link_mode<boost::intrusive::normal_link>>
151 [[nodiscard]] Hash
const&
197 [[nodiscard]] KeyEqual
const&
205 boost::intrusive::make_list<Element, boost::intrusive::constant_time_size<false>>
::type;
209 typename boost::intrusive::make_unordered_multiset<
211 boost::intrusive::constant_time_size<true>,
212 boost::intrusive::hash<ValueHash>,
213 boost::intrusive::equal<KeyValueEqual>,
214 boost::intrusive::cache_begin<true>>
::type,
215 typename boost::intrusive::make_unordered_set<
217 boost::intrusive::constant_time_size<true>,
218 boost::intrusive::hash<ValueHash>,
219 boost::intrusive::equal<KeyValueEqual>,
220 boost::intrusive::cache_begin<true>>
::type>;
277 KeyEqual
const& keyEqual,
278 Allocator
const&
alloc)
313 Allocator
const&
alloc)
335 keyEq() = std::move(other.keyEq());
336 alloc() = std::move(other.alloc());
359 [[nodiscard]] Hash
const&
383 [[nodiscard]] KeyEqual
const&
413 vec_.resize(cont_type::suggested_upper_bucket_count(0));
418 vec_.resize(cont_type::suggested_upper_bucket_count(0));
435 return vec_.max_size();
444 [[nodiscard]]
float const&
451 template <
class Container>
484 template <
class Container>
488 size_type const suggested(cont_type::suggested_upper_bucket_count(n));
497 template <
class... Args>
509 operator()(Element* p)
655 reinterpret_cast<uint8_t*
>(&value) -
663 return list_.iterator_to(*
reinterpret_cast<Element const*
>(
664 reinterpret_cast<uint8_t const*
>(&value) -
702 KeyEqual
const&
keyEq,
703 Allocator
const& alloc);
705 template <
class InputIt>
708 template <
class InputIt>
711 template <
class InputIt>
714 template <
class InputIt>
717 template <
class InputIt>
723 KeyEqual
const&
keyEq);
725 template <
class InputIt>
731 Allocator
const& alloc);
733 template <
class InputIt>
738 KeyEqual
const&
keyEq,
739 Allocator
const& alloc);
741 template <
class InputIt>
747 KeyEqual
const&
keyEq,
748 Allocator
const& alloc);
759 Allocator
const& alloc);
771 KeyEqual
const&
keyEq);
776 Allocator
const& alloc);
782 KeyEqual
const&
keyEq);
788 Allocator
const& alloc);
793 KeyEqual
const&
keyEq,
794 Allocator
const& alloc);
800 KeyEqual
const&
keyEq,
801 Allocator
const& alloc);
840 bool MaybeMulti = IsMulti,
841 bool MaybeMap = IsMap,
848 bool MaybeMulti = IsMulti,
849 bool MaybeMap = IsMap,
852 at(K
const& k)
const;
855 bool MaybeMulti = IsMulti,
856 bool MaybeMap = IsMap,
862 bool MaybeMulti = IsMulti,
863 bool MaybeMap = IsMap,
914 return cont_.iterator_to(*
reinterpret_cast<Element*
>(
915 reinterpret_cast<uint8_t*
>(&value) -
923 return cont_.iterator_to(*
reinterpret_cast<Element const*
>(
924 reinterpret_cast<uint8_t const*
>(&value) -
937 return cont_.empty();
962 template <
bool MaybeMulti = IsMulti>
967 template <
bool MaybeMulti = IsMulti>
972 template <
bool MaybeMulti = IsMulti,
bool MaybeMap = IsMap>
978 template <
bool MaybeMulti = IsMulti,
bool MaybeMap = IsMap>
983 template <
bool MaybeMulti = IsMulti>
989 return insert(value).first;
993 template <
bool MaybeMulti = IsMulti>
1003 template <
bool MaybeMulti = IsMulti>
1009 return insert(std::move(value)).first;
1013 template <
bool MaybeMulti = IsMulti>
1019 return insert(std::move(value));
1023 template <
class P,
bool MaybeMap = IsMap>
1033 template <
class P,
bool MaybeMap = IsMap>
1042 template <
class InputIt>
1056 template <
bool MaybeMulti = IsMulti,
class... Args>
1061 template <
bool MaybeMulti = IsMulti,
class... Args>
1066 template <
bool MaybeMulti = IsMulti,
class... Args>
1072 template <
bool MaybeMulti = IsMulti,
class... Args>
1081 template <
bool IsConst,
class Iterator>
1085 template <
bool IsConst,
class Iterator>
1098 template <
bool IsConst,
class Iterator>
1147 auto const r(
cont_.equal_range(
1157 auto const r(
cont_.equal_range(
1207 return cont_.bucket_count();
1213 return buck_.maxBucketCount();
1219 return cont_.bucket_size(n);
1227 "beast::detail::AgedUnorderedContainer::bucket : nonzero bucket "
1241 return size() /
static_cast<float>(
cont_.bucket_count());
1247 return buck_.maxLoadFactor();
1278 return config_.hashFunction();
1301 class OtherDuration,
1303 class OtherAllocator,
1304 bool MaybeMulti = IsMulti>
1314 OtherAllocator>
const& other)
const;
1320 class OtherDuration,
1322 class OtherAllocator,
1323 bool MaybeMulti = IsMulti>
1333 OtherAllocator>
const& other)
const;
1340 class OtherDuration,
1342 class OtherAllocator>
1352 OtherAllocator>
const& other)
const
1371 "beast::detail::AgedUnorderedContainer::maybeRehash : maximum "
1376 template <
bool MaybeMulti = IsMulti>
1382 template <
bool MaybeMulti = IsMulti>
1386 template <
class InputIt>
1390 for (; first != last; ++first)
1394 template <
class InputIt>
1398 for (; first != last; ++first)
1402 template <
class InputIt>
1411 template <
bool IsConst,
class Iterator>
1580 KeyEqual
const&
keyEq,
1581 Allocator
const& alloc)
1597template <
class InputIt>
1615template <
class InputIt>
1633template <
class InputIt>
1651template <
class InputIt>
1670template <
class InputIt>
1677 KeyEqual
const&
keyEq)
1693template <
class InputIt>
1700 Allocator
const& alloc)
1717template <
class InputIt>
1723 KeyEqual
const&
keyEq,
1724 Allocator
const& alloc)
1741template <
class InputIt>
1748 KeyEqual
const&
keyEq,
1749 Allocator
const& alloc)
1824 Allocator
const& alloc)
1829 insert(other.cbegin(), other.cend());
1883 KeyEqual
const&
keyEq)
1903 Allocator
const& alloc)
1925 KeyEqual
const&
keyEq)
1946 Allocator
const& alloc)
1967 KeyEqual
const&
keyEq,
1968 Allocator
const& alloc)
1990 KeyEqual
const&
keyEq,
1991 Allocator
const& alloc)
2054 config_ = std::move(other.config_);
2091template <
class K,
bool MaybeMulti,
bool MaybeMap,
class>
2097 if (iter ==
cont_.end())
2099 return iter->value.second;
2111template <
class K,
bool MaybeMulti,
bool MaybeMap,
class>
2118 if (iter ==
cont_.end())
2120 return iter->value.second;
2132template <
bool MaybeMulti,
bool MaybeMap,
class>
2138 typename cont_type::insert_commit_data d;
2139 auto const result(
cont_.insert_check(
2145 cont_.insert_commit(*p, d);
2147 return p->
value.second;
2149 return result.first->value.second;
2161template <
bool MaybeMulti,
bool MaybeMap,
class>
2167 typename cont_type::insert_commit_data d;
2168 auto const result(
cont_.insert_check(
2176 cont_.insert_commit(*p, d);
2178 return p->
value.second;
2180 return result.first->value.second;
2214template <
bool MaybeMulti>
2220 typename cont_type::insert_commit_data d;
2221 auto const result(
cont_.insert_check(
2226 auto const iter(
cont_.insert_commit(*p, d));
2243template <
bool MaybeMulti>
2251 auto const iter(
cont_.insert(*p));
2265template <
bool MaybeMulti,
bool MaybeMap>
2271 typename cont_type::insert_commit_data d;
2272 auto const result(
cont_.insert_check(
2277 auto const iter(
cont_.insert_commit(*p, d));
2294template <
bool MaybeMulti,
bool MaybeMap>
2302 auto const iter(
cont_.insert(*p));
2317template <
bool MaybeMulti,
class... Args>
2326 auto const result(
cont_.insert(*p));
2346template <
bool maybe_multi,
class... Args>
2355 typename cont_type::insert_commit_data d;
2356 auto const result(m_cont.insert_check(
2363 auto const iter(m_cont.insert_commit(*p, d));
2364 chronological.list.push_back(*p);
2382template <
bool MaybeMulti,
class... Args>
2390 auto const iter(
cont_.insert(*p));
2404template <
bool MaybeMulti,
class... Args>
2414 typename cont_type::insert_commit_data d;
2415 auto const result(
cont_.insert_check(
2422 auto const iter(
cont_.insert_commit(*p, d));
2439template <
bool IsConst,
class Iterator>
2457template <
bool IsConst,
class Iterator>
2463 for (; first != last;)
2484 if (iter ==
cont_.end())
2531 auto const now(
clock().now());
2533 auto const range(equal_range(k));
2534 for (
auto iter : range)
2555 class OtherDuration,
2557 class OtherAllocator,
2569 OtherAllocator>
const& other)
const
2571 if (
size() != other.size())
2573 for (
auto iter(
cbegin()), last(
cend()), otherLast(other.cend()); iter != last; ++iter)
2575 auto otherIter(other.find(
extract(*iter)));
2576 if (otherIter == otherLast)
2595 class OtherDuration,
2597 class OtherAllocator,
2609 OtherAllocator>
const& other)
const
2611 if (
size() != other.size())
2613 for (
auto iter(
cbegin()), last(
cend()); iter != last;)
2615 auto const& k(
extract(*iter));
2617 auto const oeq(other.equalRange(k));
2618#if BEAST_NO_CXX14_IS_PERMUTATION
2643template <
bool MaybeMulti>
2648 typename cont_type::insert_commit_data d;
2649 auto const result(
cont_.insert_check(
2654 auto const iter(
cont_.insert_commit(*p, d));
2671template <
bool MaybeMulti>
2678 auto const iter(
cont_.insert(*p));
2744 auto const expired(c.clock().now() - age);
2745 for (
auto iter(c.chronological.cbegin());
2746 iter != c.chronological.cend() && iter.when() <= expired;)
2748 iter = c.erase(iter);
Abstract interface to a clock.
Clock::time_point time_point
Iterator const & iterator() const
void rehash(size_type count, Container &c)
size_type maxBucketCount() const
std::vector< bucket_type, typename std::allocator_traits< Allocator >::template rebind_alloc< bucket_type > > vec_type
float const & maxLoadFactor() const
Buckets(Allocator const &alloc)
void resize(size_type n, Container &c)
const_reverse_iterator rend() const
const_iterator begin() const
const_reverse_iterator crbegin() const
beast::detail::AgedContainerIterator<!IsMap, typename list_type::reverse_iterator > reverse_iterator
const_reverse_iterator rbegin() const
beast::detail::AgedContainerIterator< true, typename list_type::iterator > const_iterator
ChronologicalT(ChronologicalT &&)=delete
const_iterator cend() const
iterator iteratorTo(value_type &value)
friend class AgedUnorderedContainer
const_iterator end() const
ChronologicalT(ChronologicalT const &)=delete
const_iterator cbegin() const
const_iterator iteratorTo(value_type const &value) const
reverse_iterator rbegin()
const_reverse_iterator crend() const
beast::detail::AgedContainerIterator<!IsMap, typename list_type::iterator > iterator
beast::detail::AgedContainerIterator< true, typename list_type::reverse_iterator > const_reverse_iterator
ConfigT(clock_type &clock, Allocator const &alloc)
Hash const & hashFunction() const
ConfigT(clock_type &clock, Hash const &hash, KeyEqual const &keyEqual, Allocator const &alloc)
ConfigT(ConfigT const &other, Allocator const &alloc)
ElementAllocator const & alloc() const
ConfigT(ConfigT const &other)
KeyValueEqual const & keyValueEqual() const
ConfigT & operator=(ConfigT const &other)
std::reference_wrapper< clock_type > clock
ConfigT(clock_type &clock, Hash const &hash)
ConfigT(clock_type &clock, KeyEqual const &keyEqual)
ValueHash const & valueHash() const
ConfigT(ConfigT &&other, Allocator const &alloc)
ConfigT(clock_type &clock, Hash const &hash, Allocator const &alloc)
ConfigT(clock_type &clock, Hash const &hash, KeyEqual const &keyEqual)
ConfigT(clock_type &clock, KeyEqual const &keyEqual, Allocator const &alloc)
KeyEqual const & keyEq() const
ConfigT & operator=(ConfigT &&other)
KeyValueEqual & keyValueEqual()
ConfigT(clock_type &clock)
ElementAllocator & alloc()
KeyEqual const & keyEq() const
bool operator()(Element const &lhs, Element const &rhs) const
bool operator()(Key const &k, Element const &e) const
KeyValueEqual(KeyEqual const &keyEqual)
Element second_argument_type
bool operator()(Element const &e, Key const &k) const
Hash const & hashFunction() const
std::size_t operator()(Element const &e) const
Associative container where each element is also indexed by time.
auto insert(value_type &&value) -> std::enable_if_t<!MaybeMulti &&!MaybeMap, std::pair< iterator, bool > >
const_local_iterator cbegin(size_type n) const
void insert(std::initializer_list< value_type > init)
auto insertUnchecked(value_type const &value) -> std::enable_if_t<!MaybeMulti, std::pair< iterator, bool > >
std::pair< const_iterator, const_iterator > equalRange(K const &k) const
void rehash(size_type count)
std::enable_if_t< MaybeMap &&std::is_constructible_v< value_type, P && >, std::conditional_t< IsMulti, iterator, std::pair< iterator, bool > > > insert(const_iterator hint, P &&value)
void touch(beast::detail::AgedContainerIterator< IsConst, Iterator > pos, clock_type::time_point const &now)
std::enable_if_t<!MaybePropagate > swapData(AgedUnorderedContainer &other) noexcept
AgedUnorderedContainer(clock_type &clock)
clock_type::time_point time_point
std::integral_constant< bool, IsMulti > is_multi
const_local_iterator end(size_type n) const
local_iterator begin(size_type n)
void maybeRehash(size_type additional)
AgedUnorderedContainer & operator=(AgedUnorderedContainer const &other)
beast::detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator >< uint256, std::unordered_set< Peer::id_t >, ClockType, HardenedHash< strong_hash > >::chronological class beast::detail::AgedUnorderedContainer::ChronologicalT chronological
void deleteElement(Element const *p)
std::integral_constant< bool, IsMap > is_map
bool empty() const noexcept
auto insert(value_type const &value) -> std::enable_if_t< MaybeMulti, iterator >
std::conditional_t< IsMap, T, void * > & at(K const &k)
const_iterator find(K const &k) const
size_type count(K const &k) const
AgedUnorderedContainer(AgedUnorderedContainer const &other)
std::enable_if_t< MaybeMulti, iterator > insert(const_iterator, value_type &&value)
void insert(InputIt first, InputIt last, std::input_iterator_tag)
std::allocator_traits< Allocator >::pointer pointer
void touch(beast::detail::AgedContainerIterator< IsConst, Iterator > pos)
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, Allocator const &alloc)
beast::detail::AgedContainerIterator< false, Iterator > erase(beast::detail::AgedContainerIterator< IsConst, Iterator > first, beast::detail::AgedContainerIterator< IsConst, Iterator > last)
auto insert(value_type &&value) -> std::enable_if_t< MaybeMulti &&!MaybeMap, iterator >
AgedUnorderedContainer(clock_type &clock, Hash const &hash, KeyEqual const &keyEq, Allocator const &alloc)
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, Hash const &hash, Allocator const &alloc)
void swap(AgedUnorderedContainer &other) noexcept
size_type size() const noexcept
size_type bucketSize(size_type n) const
const_local_iterator begin(size_type n) const
std::allocator_traits< ElementAllocator > ElementAllocatorTraits
std::enable_if_t<!MaybeMulti, bool > operator==(AgedUnorderedContainer< false, OtherIsMap, OtherKey, OtherT, OtherDuration, OtherHash, KeyEqual, OtherAllocator > const &other) const
beast::detail::AgedContainerIterator< true, typename cont_type::iterator > const_iterator
std::allocator_traits< Allocator >::template rebind_alloc< Element > BucketAllocator
beast::detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator >< uint256, std::unordered_set< Peer::id_t >, ClockType, HardenedHash< strong_hash > >::clock clock_type & clock()
std::pair< iterator, iterator > equalRange(K const &k)
std::conditional< IsMap, T, void * >::type const & at(K const &k) const
std::conditional_t< IsMap, std::pair< Key const, T >, Key > value_type
std::enable_if_t< MaybeMap &&std::is_constructible_v< value_type, P && >, std::conditional_t< IsMulti, iterator, std::pair< iterator, bool > > > insert(P &&value)
float maxLoadFactor() const
const_iterator cbegin() const
auto insert(value_type const &value) -> std::enable_if_t<!MaybeMulti, std::pair< iterator, bool > >
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, KeyEqual const &keyEq, Allocator const &alloc)
value_type const & const_reference
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash, Allocator const &alloc)
size_type maxBucketCount() const
AgedUnorderedContainer(AgedUnorderedContainer &&other)
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, KeyEqual const &keyEq)
auto emplaceHint(const_iterator, Args &&... args) -> std::enable_if_t<!MaybeMulti, std::pair< iterator, bool > >
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, Hash const &hash, KeyEqual const &keyEq)
std::enable_if_t<!MaybeMulti, iterator > insert(const_iterator, value_type const &value)
std::conditional_t< IsMap, T, void * > & operator[](Key const &key)
cont_type::bucket_traits bucket_traits
auto erase(K const &k) -> size_type
std::enable_if_t<!MaybeMulti, iterator > insert(const_iterator, value_type &&value)
void unlinkAndDeleteElement(Element const *p)
beast::detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator >< uint256, std::unordered_set< Peer::id_t >, ClockType, HardenedHash< strong_hash > >::buck_ Buckets buck_
clock_type const & clock() const
void insertUnchecked(InputIt first, InputIt last)
beast::detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator >< uint256, std::unordered_set< Peer::id_t >, ClockType, HardenedHash< strong_hash > >::keyEq key_equal const & keyEq() const
size_type bucket(Key const &k) const
boost::intrusive::make_list< Element, boost::intrusive::constant_time_size< false > >::type list_type
AgedUnorderedContainer(AgedUnorderedContainer &&other, Allocator const &alloc)
beast::detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator >< uint256, std::unordered_set< Peer::id_t >, ClockType, HardenedHash< strong_hash > >::config_ ConfigT config_
std::ptrdiff_t difference_type
std::conditional_t< IsMulti, typename boost::intrusive::make_unordered_multiset< Element, boost::intrusive::constant_time_size< true >, boost::intrusive::hash< ValueHash >, boost::intrusive::equal< KeyValueEqual >, boost::intrusive::cache_begin< true > >::type, typename boost::intrusive::make_unordered_set< Element, boost::intrusive::constant_time_size< true >, boost::intrusive::hash< ValueHash >, boost::intrusive::equal< KeyValueEqual >, boost::intrusive::cache_begin< true > >::type > cont_type
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, KeyEqual const &keyEq)
AgedUnorderedContainer(clock_type &clock, KeyEqual const &keyEq, Allocator const &alloc)
AgedUnorderedContainer(clock_type &clock, KeyEqual const &keyEq)
bool operator!=(AgedUnorderedContainer< OtherIsMulti, OtherIsMap, OtherKey, OtherT, OtherDuration, OtherHash, KeyEqual, OtherAllocator > const &other) const
beast::detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator >< uint256, std::unordered_set< Peer::id_t >, ClockType, HardenedHash< strong_hash > >::cont_ cont_type cont_
~AgedUnorderedContainer()
AgedUnorderedContainer(clock_type &clock, Hash const &hash, Allocator const &alloc)
auto touch(K const &k) -> size_type
iterator iteratorTo(value_type &value)
const_iterator end() const
bool wouldExceed(size_type additional) const
std::enable_if_t< MaybeMulti, bool > operator==(AgedUnorderedContainer< true, OtherIsMap, OtherKey, OtherT, OtherDuration, OtherHash, KeyEqual, OtherAllocator > const &other) const
AbstractClock< Clock > clock_type
beast::detail::AgedContainerIterator<!IsMap, typename cont_type::local_iterator > local_iterator
const_iterator cend() const
void insert(InputIt first, InputIt last, std::random_access_iterator_tag)
beast::detail::AgedContainerIterator< true, typename cont_type::local_iterator > const_local_iterator
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash)
AgedUnorderedContainer & operator=(AgedUnorderedContainer &&other)
std::true_type is_unordered
std::enable_if_t< MaybeMulti, iterator > emplaceHint(const_iterator, Args &&... args)
static Key const & extract(value_type const &value)
iterator find(K const &k)
void reserve(size_type count)
AgedUnorderedContainer & operator=(std::initializer_list< value_type > init)
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock)
void maxLoadFactor(float ml)
std::enable_if_t< MaybeMulti, iterator > insert(const_iterator, value_type const &value)
const_local_iterator cend(size_type n) const
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock)
AgedUnorderedContainer(clock_type &clock, Allocator const &alloc)
local_iterator end(size_type n)
std::allocator_traits< Allocator >::template rebind_alloc< Element > ElementAllocator
auto insertUnchecked(value_type const &value) -> std::enable_if_t< MaybeMulti, iterator >
size_type bucketCount() const
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, KeyEqual const &keyEq, Allocator const &alloc)
AgedUnorderedContainer()=delete
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, Hash const &hash, KeyEqual const &keyEq, Allocator const &alloc)
cont_type::bucket_type bucket_type
allocator_type getAllocator() const
const_iterator iteratorTo(value_type const &value) const
hasher const & hashFunction() const
Element * newElement(Args &&... args)
AgedUnorderedContainer(AgedUnorderedContainer const &other, Allocator const &alloc)
std::allocator_traits< BucketAllocator > BucketAllocatorTraits
auto emplace(Args &&... args) -> std::enable_if_t<!MaybeMulti, std::pair< iterator, bool > >
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, Hash const &hash)
std::enable_if_t< MaybePropagate > swapData(AgedUnorderedContainer &other) noexcept
AgedUnorderedContainer(clock_type &clock, Hash const &hash, KeyEqual const &keyEq)
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash, KeyEqual const &keyEq, Allocator const &alloc)
std::conditional_t< IsMap, T, void * > & operator[](Key &&key)
AgedUnorderedContainer(clock_type &clock, Hash const &hash)
clock_type::duration duration
const_iterator begin() const
void insert(InputIt first, InputIt last)
beast::detail::AgedContainerIterator<!IsMap, typename cont_type::iterator > iterator
std::allocator_traits< Allocator >::const_pointer const_pointer
auto emplace(Args &&... args) -> std::enable_if_t< MaybeMulti, iterator >
AgedUnorderedContainer(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash, KeyEqual const &keyEq)
size_type maxSize() const noexcept
AgedUnorderedContainer(InputIt first, InputIt last, clock_type &clock, Allocator const &alloc)
beast::detail::AgedContainerIterator< false, Iterator > erase(beast::detail::AgedContainerIterator< IsConst, Iterator > pos)
EmptyBaseOptimization()=default
T forward_as_tuple(T... args)
T is_permutation(T... args)
std::enable_if_t< IsAgedContainer< AgedContainer >::value, std::size_t > expire(AgedContainer &c, std::chrono::duration< Rep, Period > const &age)
Expire aged container items past the specified age.
void swap(beast::detail::AgedOrderedContainer< IsMulti, IsMap, Key, T, Clock, Compare, Allocator > &lhs, beast::detail::AgedOrderedContainer< IsMulti, IsMap, Key, T, Clock, Compare, Allocator > &rhs) noexcept
IsAgedContainer()=default
AgedUnorderedContainer::value_type value_type
AgedUnorderedContainer::time_point time_point
Element(time_point const &when, value_type const &value)
Element(time_point const &when, value_type &&value)
Element(time_point const &when, Args &&... args)