20#ifndef BEAST_CONTAINER_DETAIL_AGED_UNORDERED_CONTAINER_H_INCLUDED
21#define BEAST_CONTAINER_DETAIL_AGED_UNORDERED_CONTAINER_H_INCLUDED
23#include <xrpl/beast/clock/abstract_clock.h>
24#include <xrpl/beast/container/aged_container.h>
25#include <xrpl/beast/container/detail/aged_associative_container.h>
26#include <xrpl/beast/container/detail/aged_container_iterator.h>
27#include <xrpl/beast/container/detail/empty_base_optimization.h>
29#include <boost/intrusive/list.hpp>
30#include <boost/intrusive/unordered_set.hpp>
53#ifndef BEAST_NO_CXX14_IS_PERMUTATION
54#define BEAST_NO_CXX14_IS_PERMUTATION 1
114 : boost::intrusive::unordered_set_base_hook<
115 boost::intrusive::link_mode<boost::intrusive::normal_link>>,
116 boost::intrusive::list_base_hook<
117 boost::intrusive::link_mode<boost::intrusive::normal_link>>
235 make_list<element, boost::intrusive::constant_time_size<false>>::type;
239 typename boost::intrusive::make_unordered_multiset<
241 boost::intrusive::constant_time_size<true>,
242 boost::intrusive::hash<ValueHash>,
243 boost::intrusive::equal<KeyValueEqual>,
244 boost::intrusive::cache_begin<true>>::type,
245 typename boost::intrusive::make_unordered_set<
247 boost::intrusive::constant_time_size<true>,
248 boost::intrusive::hash<ValueHash>,
249 boost::intrusive::equal<KeyValueEqual>,
250 boost::intrusive::cache_begin<true>>::type>::type;
256 Allocator>::template rebind_alloc<element>;
261 Allocator>::template rebind_alloc<element>;
305 KeyEqual
const& keyEqual,
306 Allocator
const& alloc_)
316 KeyEqual
const& keyEqual,
317 Allocator
const& alloc_)
374 key_eq() = std::move(other.key_eq());
375 alloc() = std::move(other.alloc());
455 m_vec.
resize(cont_type::suggested_upper_bucket_count(0));
460 m_vec.
resize(cont_type::suggested_upper_bucket_count(0));
493 template <
class Container>
526 template <
class Container>
531 cont_type::suggested_upper_bucket_count(n));
540 template <
class... Args>
554 ElementAllocatorTraits::deallocate(a_.
get(), p, 1);
565 std::forward<Args>(args)...);
598 aged_container_iterator<!IsMap, typename cont_type::iterator>;
600 aged_container_iterator<true, typename cont_type::iterator>;
603 aged_container_iterator<!IsMap, typename cont_type::local_iterator>;
605 aged_container_iterator<true, typename cont_type::local_iterator>;
622 aged_container_iterator<!IsMap, typename list_type::iterator>;
624 aged_container_iterator<true, typename list_type::iterator>;
627 typename list_type::reverse_iterator>;
629 aged_container_iterator<true, typename list_type::reverse_iterator>;
708 "must be standard layout");
709 return list.iterator_to(*
reinterpret_cast<element*
>(
710 reinterpret_cast<uint8_t*
>(&value) -
719 "must be standard layout");
720 return list.iterator_to(*
reinterpret_cast<element const*
>(
721 reinterpret_cast<uint8_t const*
>(&value) -
761 Allocator
const& alloc);
766 Allocator
const& alloc);
772 Allocator
const& alloc);
774 template <
class InputIt>
777 template <
class InputIt>
784 template <
class InputIt>
791 template <
class InputIt>
796 Allocator
const& alloc);
798 template <
class InputIt>
806 template <
class InputIt>
812 Allocator
const& alloc);
814 template <
class InputIt>
820 Allocator
const& alloc);
822 template <
class InputIt>
829 Allocator
const& alloc);
835 Allocator
const& alloc);
841 Allocator
const& alloc);
860 Allocator
const& alloc);
872 Allocator
const& alloc);
878 Allocator
const& alloc);
885 Allocator
const& alloc);
924 bool maybe_multi = IsMulti,
925 bool maybe_map = IsMap,
932 bool maybe_multi = IsMulti,
933 bool maybe_map = IsMap,
936 at(K
const& k)
const;
939 bool maybe_multi = IsMulti,
940 bool maybe_map = IsMap,
946 bool maybe_multi = IsMulti,
947 bool maybe_map = IsMap,
1000 reinterpret_cast<uint8_t*
>(&value) -
1009 return m_cont.iterator_to(*
reinterpret_cast<element const*
>(
1010 reinterpret_cast<uint8_t const*
>(&value) -
1048 template <
bool maybe_multi = IsMulti>
1054 template <
bool maybe_multi = IsMulti>
1060 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
1063 !maybe_multi && !maybe_map,
1067 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
1073 template <
bool maybe_multi = IsMulti>
1079 return insert(value).first;
1083 template <
bool maybe_multi = IsMulti>
1093 template <
bool maybe_multi = IsMulti>
1099 return insert(std::move(value)).first;
1103 template <
bool maybe_multi = IsMulti>
1109 return insert(std::move(value));
1113 template <
class P,
bool maybe_map = IsMap>
1117 conditional<IsMulti, iterator, std::pair<iterator, bool>>::type>::
1121 return emplace(std::forward<P>(value));
1125 template <
class P,
bool maybe_map = IsMap>
1129 conditional<IsMulti, iterator, std::pair<iterator, bool>>::type>::
1136 template <
class InputIt>
1153 template <
bool maybe_multi = IsMulti,
class... Args>
1159 template <
bool maybe_multi = IsMulti,
class... Args>
1165 template <
bool maybe_multi = IsMulti,
class... Args>
1171 template <
bool maybe_multi = IsMulti,
class... Args>
1177 return emplace<maybe_multi>(std::forward<Args>(args)...);
1180 template <
bool is_const,
class Iterator>
1184 template <
bool is_const,
class Iterator>
1197 template <
bool is_const,
class Iterator>
1252 auto const r(
m_cont.equal_range(
1264 auto const r(
m_cont.equal_range(
1317 return m_cont.bucket_count();
1329 return m_cont.bucket_size(n);
1337 "beast::detail::aged_unordered_container::bucket : nonzero bucket "
1351 return size() /
static_cast<float>(
m_cont.bucket_count());
1411 class OtherDuration,
1413 class OtherAllocator,
1414 bool maybe_multi = IsMulti>
1424 OtherAllocator>
const& other)
const;
1430 class OtherDuration,
1432 class OtherAllocator,
1433 bool maybe_multi = IsMulti>
1443 OtherAllocator>
const& other)
const;
1450 class OtherDuration,
1452 class OtherAllocator>
1462 OtherAllocator>
const& other)
const
1481 "beast::detail::aged_unordered_container::maybe_rehash : maximum "
1486 template <
bool maybe_multi = IsMulti>
1492 template <
bool maybe_multi = IsMulti>
1497 template <
class InputIt>
1501 for (; first != last; ++first)
1505 template <
class InputIt>
1509 for (; first != last; ++first)
1513 template <
class InputIt>
1522 template <
bool is_const,
class Iterator>
1536 Allocator>::propagate_on_container_swap::value>
1547 Allocator>::propagate_on_container_swap::value>
1584 std::cref(m_config.value_hash()),
1585 std::cref(m_config.key_value_equal()))
1606 Allocator>::aged_unordered_container(
clock_type& clock, Hash
const& hash)
1607 : m_config(clock, hash)
1610 std::cref(m_config.value_hash()),
1611 std::cref(m_config.key_value_equal()))
1633 aged_unordered_container(
clock_type& clock, KeyEqual
const& key_eq)
1634 : m_config(clock, key_eq)
1637 std::cref(m_config.value_hash()),
1638 std::cref(m_config.key_value_equal()))
1660 aged_unordered_container(
clock_type& clock, Allocator
const& alloc)
1661 : m_config(clock, alloc)
1665 std::cref(m_config.value_hash()),
1666 std::cref(m_config.key_value_equal()))
1688 aged_unordered_container(
1691 KeyEqual
const& key_eq)
1692 : m_config(clock, hash, key_eq)
1695 std::cref(m_config.value_hash()),
1696 std::cref(m_config.key_value_equal()))
1718 aged_unordered_container(
1721 Allocator
const& alloc)
1722 : m_config(clock, hash, alloc)
1726 std::cref(m_config.value_hash()),
1727 std::cref(m_config.key_value_equal()))
1749 aged_unordered_container(
1751 KeyEqual
const& key_eq,
1752 Allocator
const& alloc)
1753 : m_config(clock, key_eq, alloc)
1757 std::cref(m_config.value_hash()),
1758 std::cref(m_config.key_value_equal()))
1780 aged_unordered_container(
1783 KeyEqual
const& key_eq,
1784 Allocator
const& alloc)
1785 : m_config(clock, hash, key_eq, alloc)
1789 std::cref(m_config.value_hash()),
1790 std::cref(m_config.key_value_equal()))
1803template <
class InputIt>
1813 aged_unordered_container(InputIt first, InputIt last,
clock_type& clock)
1817 std::cref(m_config.value_hash()),
1818 std::cref(m_config.key_value_equal()))
1832template <
class InputIt>
1842 aged_unordered_container(
1847 : m_config(clock, hash)
1850 std::cref(m_config.value_hash()),
1851 std::cref(m_config.key_value_equal()))
1865template <
class InputIt>
1875 aged_unordered_container(
1879 KeyEqual
const& key_eq)
1880 : m_config(clock, key_eq)
1883 std::cref(m_config.value_hash()),
1884 std::cref(m_config.key_value_equal()))
1898template <
class InputIt>
1908 aged_unordered_container(
1912 Allocator
const& alloc)
1913 : m_config(clock, alloc)
1917 std::cref(m_config.value_hash()),
1918 std::cref(m_config.key_value_equal()))
1932template <
class InputIt>
1942 aged_unordered_container(
1947 KeyEqual
const& key_eq)
1948 : m_config(clock, hash, key_eq)
1951 std::cref(m_config.value_hash()),
1952 std::cref(m_config.key_value_equal()))
1966template <
class InputIt>
1976 aged_unordered_container(
1981 Allocator
const& alloc)
1982 : m_config(clock, hash, alloc)
1986 std::cref(m_config.value_hash()),
1987 std::cref(m_config.key_value_equal()))
2001template <
class InputIt>
2011 aged_unordered_container(
2015 KeyEqual
const& key_eq,
2016 Allocator
const& alloc)
2017 : m_config(clock, key_eq, alloc)
2021 std::cref(m_config.value_hash()),
2022 std::cref(m_config.key_value_equal()))
2036template <
class InputIt>
2046 aged_unordered_container(
2051 KeyEqual
const& key_eq,
2052 Allocator
const& alloc)
2053 : m_config(clock, hash, key_eq, alloc)
2057 std::cref(m_config.value_hash()),
2058 std::cref(m_config.key_value_equal()))
2081 : m_config(other.m_config)
2082 , m_buck(m_config.alloc())
2085 std::cref(m_config.value_hash()),
2086 std::cref(m_config.key_value_equal()))
2109 aged_unordered_container(
2111 Allocator
const& alloc)
2112 : m_config(other.m_config, alloc)
2116 std::cref(m_config.value_hash()),
2117 std::cref(m_config.key_value_equal()))
2140 : m_config(
std::move(other.m_config))
2141 , m_buck(
std::move(other.m_buck))
2142 , m_cont(
std::move(other.m_cont))
2165 aged_unordered_container(
2167 Allocator
const& alloc)
2168 : m_config(
std::move(other.m_config), alloc)
2172 std::cref(m_config.value_hash()),
2173 std::cref(m_config.key_value_equal()))
2175 insert(other.cbegin(), other.cend());
2197 aged_unordered_container(
2203 std::cref(m_config.value_hash()),
2204 std::cref(m_config.key_value_equal()))
2227 aged_unordered_container(
2231 : m_config(clock, hash)
2234 std::cref(m_config.value_hash()),
2235 std::cref(m_config.key_value_equal()))
2258 aged_unordered_container(
2261 KeyEqual
const& key_eq)
2262 : m_config(clock, key_eq)
2265 std::cref(m_config.value_hash()),
2266 std::cref(m_config.key_value_equal()))
2289 aged_unordered_container(
2292 Allocator
const& alloc)
2293 : m_config(clock, alloc)
2297 std::cref(m_config.value_hash()),
2298 std::cref(m_config.key_value_equal()))
2321 aged_unordered_container(
2325 KeyEqual
const& key_eq)
2326 : m_config(clock, hash, key_eq)
2329 std::cref(m_config.value_hash()),
2330 std::cref(m_config.key_value_equal()))
2353 aged_unordered_container(
2357 Allocator
const& alloc)
2358 : m_config(clock, hash, alloc)
2362 std::cref(m_config.value_hash()),
2363 std::cref(m_config.key_value_equal()))
2386 aged_unordered_container(
2389 KeyEqual
const& key_eq,
2390 Allocator
const& alloc)
2391 : m_config(clock, key_eq, alloc)
2395 std::cref(m_config.value_hash()),
2396 std::cref(m_config.key_value_equal()))
2419 aged_unordered_container(
2423 KeyEqual
const& key_eq,
2424 Allocator
const& alloc)
2425 : m_config(clock, hash, key_eq, alloc)
2429 std::cref(m_config.value_hash()),
2430 std::cref(m_config.key_value_equal()))
2452 Allocator>::~aged_unordered_container()
2482 m_config = other.m_config;
2483 m_buck =
Buckets(m_config.alloc());
2485 insert_unchecked(other.begin(), other.end());
2513 m_config = std::move(other.m_config);
2514 m_buck =
Buckets(m_config.alloc());
2516 insert_unchecked(other.begin(), other.end());
2558template <
class K,
bool maybe_multi,
bool maybe_map,
class>
2568 Allocator>::at(K
const& k)
2570 auto const iter(m_cont.find(
2573 std::cref(m_config.key_value_equal())));
2574 if (iter == m_cont.end())
2576 return iter->value.second;
2588template <
class K,
bool maybe_multi,
bool maybe_map,
class>
2598 Allocator>::at(K
const& k)
const
2600 auto const iter(m_cont.find(
2603 std::cref(m_config.key_value_equal())));
2604 if (iter == m_cont.end())
2606 return iter->value.second;
2618template <
bool maybe_multi,
bool maybe_map,
class>
2628 Allocator>::operator[](Key
const& key)
2631 typename cont_type::insert_commit_data d;
2632 auto const result(m_cont.insert_check(
2643 m_cont.insert_commit(*p, d);
2644 chronological.list.push_back(*p);
2645 return p->
value.second;
2647 return result.first->value.second;
2659template <
bool maybe_multi,
bool maybe_map,
class>
2669 Allocator>::operator[](Key&& key)
2672 typename cont_type::insert_commit_data d;
2673 auto const result(m_cont.insert_check(
2684 m_cont.insert_commit(*p, d);
2685 chronological.list.push_back(*p);
2686 return p->
value.second;
2688 return result.first->value.second;
2713 for (
auto iter(chronological.list.begin());
2714 iter != chronological.list.end();)
2715 unlink_and_delete_element(&*iter++);
2716 chronological.list.clear();
2731template <
bool maybe_multi>
2745 typename cont_type::insert_commit_data d;
2746 auto const result(m_cont.insert_check(
2753 element*
const p(new_element(value));
2754 auto const iter(m_cont.insert_commit(*p, d));
2755 chronological.list.push_back(*p);
2771template <
bool maybe_multi>
2781 Allocator>::insert(value_type
const& value) ->
2785 element*
const p(new_element(value));
2786 chronological.list.push_back(*p);
2787 auto const iter(m_cont.insert(*p));
2788 return iterator(iter);
2801template <
bool maybe_multi,
bool maybe_map>
2803aged_unordered_container<
2813 enable_if<!maybe_multi && !maybe_map, std::pair<iterator, bool>>::type
2816 typename cont_type::insert_commit_data d;
2817 auto const result(m_cont.insert_check(
2824 element*
const p(new_element(std::move(value)));
2825 auto const iter(m_cont.insert_commit(*p, d));
2826 chronological.list.push_back(*p);
2842template <
bool maybe_multi,
bool maybe_map>
2852 Allocator>::insert(value_type&& value) ->
2856 element*
const p(new_element(std::move(value)));
2857 chronological.list.push_back(*p);
2858 auto const iter(m_cont.insert(*p));
2859 return iterator(iter);
2873template <
bool maybe_multi,
class... Args>
2875aged_unordered_container<
2883 Allocator>::emplace(Args&&... args) ->
2889 element*
const p(new_element(std::forward<Args>(args)...));
2890 auto const result(m_cont.insert(*p));
2893 chronological.list.push_back(*p);
2910template <
bool maybe_multi,
class... Args>
2920 Allocator>::emplace(Args&&... args) ->
2926 element*
const p(new_element(std::forward<Args>(args)...));
2927 typename cont_type::insert_commit_data d;
2928 auto const result(m_cont.insert_check(
2935 auto const iter(m_cont.insert_commit(*p, d));
2936 chronological.list.push_back(*p);
2954template <
bool maybe_multi,
class... Args>
2956aged_unordered_container<
2964 Allocator>::emplace(Args&&... args) ->
2968 element*
const p(new_element(std::forward<Args>(args)...));
2969 chronological.list.push_back(*p);
2970 auto const iter(m_cont.insert(*p));
2971 return iterator(iter);
2984template <
bool maybe_multi,
class... Args>
2986aged_unordered_container<
3000 element*
const p(new_element(std::forward<Args>(args)...));
3001 typename cont_type::insert_commit_data d;
3002 auto const result(m_cont.insert_check(
3009 auto const iter(m_cont.insert_commit(*p, d));
3010 chronological.list.push_back(*p);
3026template <
bool is_const,
class Iterator>
3039 unlink_and_delete_element(&*((pos++).
iterator()));
3053template <
bool is_const,
class Iterator>
3068 for (; first != last;)
3069 unlink_and_delete_element(&*((first++).
iterator()));
3096 auto iter(m_cont.find(
3099 std::cref(m_config.key_value_equal())));
3100 if (iter == m_cont.end())
3106 bool const done(m_config(*p, extract(iter->value)));
3107 unlink_and_delete_element(p);
3136 std::swap(chronological, other.chronological);
3161 auto const now(clock().now());
3163 auto const range(equal_range(k));
3164 for (
auto iter : range)
3185 class OtherDuration,
3187 class OtherAllocator,
3207 OtherAllocator>
const& other)
const
3209 if (size() != other.size())
3211 for (
auto iter(cbegin()), last(cend()), olast(other.cend()); iter != last;
3214 auto oiter(other.find(extract(*iter)));
3234 class OtherDuration,
3236 class OtherAllocator,
3256 OtherAllocator>
const& other)
const
3258 if (size() != other.size())
3261 for (
auto iter(cbegin()), last(cend()); iter != last;)
3263 auto const& k(extract(*iter));
3264 auto const eq(equal_range(k));
3265 auto const oeq(other.equal_range(k));
3266#if BEAST_NO_CXX14_IS_PERMUTATION
3292template <
bool maybe_multi>
3305 typename cont_type::insert_commit_data d;
3306 auto const result(m_cont.insert_check(
3313 element*
const p(new_element(value));
3314 auto const iter(m_cont.insert_commit(*p, d));
3315 chronological.list.push_back(*p);
3331template <
bool maybe_multi>
3341 Allocator>::insert_unchecked(value_type
const& value) ->
3344 element*
const p(new_element(value));
3345 chronological.list.push_back(*p);
3346 auto const iter(m_cont.insert(*p));
3347 return iterator(iter);
3408 Allocator>& rhs)
noexcept
3439 auto const expired(c.clock().now() - age);
3440 for (
auto iter(c.chronological.cbegin());
3441 iter != c.chronological.cend() && iter.when() <= expired;)
3443 iter = c.erase(iter);
Abstract interface to a clock.
typename Clock::time_point time_point
typename Clock::duration duration
Iterator const & iterator() const
float & max_load_factor()
void rehash(size_type count, Container &c)
Buckets(Allocator const &alloc)
void resize(size_type n, Container &c)
float const & max_load_factor() const
size_type max_bucket_count() const
bool operator()(element const &e, Key const &k) const
KeyEqual const & key_eq() const
bool operator()(Key const &k, element const &e) const
KeyValueEqual(KeyEqual const &keyEqual)
bool operator()(element const &lhs, element const &rhs) const
std::size_t operator()(element const &e) const
Hash const & hash_function() const
const_iterator iterator_to(value_type const &value) const
chronological_t(chronological_t const &)=delete
const_reverse_iterator crbegin() const
beast::detail::aged_container_iterator< true, typename list_type::reverse_iterator > const_reverse_iterator
const_iterator end() const
chronological_t(chronological_t &&)=delete
beast::detail::aged_container_iterator<!IsMap, typename list_type::iterator > iterator
const_reverse_iterator rbegin() const
beast::detail::aged_container_iterator< true, typename list_type::iterator > const_iterator
const_iterator cbegin() const
reverse_iterator rbegin()
const_iterator begin() const
beast::detail::aged_container_iterator< !IsMap, typename list_type::reverse_iterator > reverse_iterator
iterator iterator_to(value_type &value)
const_reverse_iterator rend() const
const_reverse_iterator crend() const
const_iterator cend() const
KeyValueEqual & key_value_equal()
config_t(config_t &&other, Allocator const &alloc)
config_t(clock_type &clock_, KeyEqual const &keyEqual)
config_t(clock_type &clock_)
Hash const & hash_function() const
config_t(config_t &&other)
config_t & operator=(config_t const &other)
KeyValueEqual const & key_value_equal() const
ElementAllocator & alloc()
config_t(clock_type &clock_, KeyEqual const &keyEqual, Allocator const &alloc_)
config_t(clock_type &clock_, Hash const &hash, Allocator const &alloc_)
config_t(clock_type &clock_, Allocator const &alloc_)
config_t(clock_type &clock_, Hash const &hash)
std::reference_wrapper< clock_type > clock
config_t(clock_type &clock_, Hash const &hash, KeyEqual const &keyEqual, Allocator const &alloc_)
config_t(config_t const &other, Allocator const &alloc)
config_t(config_t const &other)
ElementAllocator const & alloc() const
ValueHash const & value_hash() const
config_t(clock_type &clock_, Hash const &hash, KeyEqual const &keyEqual)
KeyEqual const & key_eq() const
config_t & operator=(config_t &&other)
Associative container where each element is also indexed by time.
aged_unordered_container(clock_type &clock, Hash const &hash, KeyEqual const &key_eq)
std::conditional< IsMap, T, void * >::type & at(K const &k)
aged_unordered_container(clock_type &clock, KeyEqual const &key_eq, Allocator const &alloc)
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash)
abstract_clock< Clock > clock_type
auto insert(value_type const &value) -> typename std::enable_if<!maybe_multi, std::pair< iterator, bool > >::type
std::enable_if< maybe_map &&std::is_constructible< value_type, P && >::value, typenamestd::conditional< IsMulti, iterator, std::pair< iterator, bool > >::type >::type insert(P &&value)
typename std::allocator_traits< Allocator >::const_pointer const_pointer
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, Hash const &hash, KeyEqual const &key_eq)
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, Allocator const &alloc)
auto erase(K const &k) -> size_type
static Key const & extract(value_type const &value)
beast::detail::aged_container_iterator< false, Iterator > erase(beast::detail::aged_container_iterator< is_const, Iterator > first, beast::detail::aged_container_iterator< is_const, Iterator > last)
bool would_exceed(size_type additional) const
aged_unordered_container & operator=(aged_unordered_container const &other)
aged_unordered_container(clock_type &clock, KeyEqual const &key_eq)
std::enable_if< maybe_multi, iterator >::type insert(const_iterator, value_type const &value)
key_equal const & key_eq() const
const_local_iterator begin(size_type n) const
void insert_unchecked(InputIt first, InputIt last)
size_type max_size() const noexcept
aged_unordered_container(aged_unordered_container const &other)
const_local_iterator cend(size_type n) const
typename boost::intrusive::make_list< element, boost::intrusive::constant_time_size< false > >::type list_type
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, KeyEqual const &key_eq, Allocator const &alloc)
local_iterator end(size_type n)
typename std::allocator_traits< Allocator >::template rebind_alloc< element > ElementAllocator
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, Hash const &hash)
const_local_iterator end(size_type n) const
typename std::allocator_traits< Allocator >::pointer pointer
float load_factor() const
std::enable_if<!maybe_multi, bool >::type operator==(aged_unordered_container< false, OtherIsMap, OtherKey, OtherT, OtherDuration, OtherHash, KeyEqual, OtherAllocator > const &other) const
void max_load_factor(float ml)
const_iterator find(K const &k) const
void insert(std::initializer_list< value_type > init)
std::enable_if<!maybe_multi, iterator >::type insert(const_iterator, value_type const &value)
std::pair< iterator, iterator > equal_range(K const &k)
size_type max_bucket_count() const
typename clock_type::duration duration
float max_load_factor() const
std::enable_if< maybe_multi, iterator >::type emplace_hint(const_iterator, Args &&... args)
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock)
typename cont_type::bucket_type bucket_type
aged_unordered_container(clock_type &clock, Hash const &hash, Allocator const &alloc)
typename std::conditional< IsMap, std::pair< Key const, T >, Key >::type value_type
size_type bucket_count() const
auto insert_unchecked(value_type const &value) -> typename std::enable_if< maybe_multi, iterator >::type
const_iterator iterator_to(value_type const &value) const
std::enable_if<!maybe_propagate >::type swap_data(aged_unordered_container &other) noexcept
auto touch(K const &k) -> size_type
beast::detail::aged_container_iterator<!IsMap, typename cont_type::local_iterator > local_iterator
typename cont_type::bucket_traits bucket_traits
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash, KeyEqual const &key_eq, Allocator const &alloc)
auto insert(value_type &&value) -> typename std::enable_if< maybe_multi &&!maybe_map, iterator >::type
void rehash(size_type count)
local_iterator begin(size_type n)
const_iterator cbegin() const
std::pair< const_iterator, const_iterator > equal_range(K const &k) const
void touch(beast::detail::aged_container_iterator< is_const, Iterator > pos)
typename clock_type::time_point time_point
std::conditional< IsMap, T, void * >::type & operator[](Key const &key)
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, Allocator const &alloc)
std::enable_if<!maybe_multi, iterator >::type insert(const_iterator, value_type &&value)
bool empty() const noexcept
auto emplace(Args &&... args) -> typename std::enable_if< maybe_multi, iterator >::type
std::enable_if< maybe_multi, bool >::type operator==(aged_unordered_container< true, OtherIsMap, OtherKey, OtherT, OtherDuration, OtherHash, KeyEqual, OtherAllocator > const &other) const
size_type bucket(Key const &k) const
void delete_element(element const *p)
std::enable_if< maybe_multi, iterator >::type insert(const_iterator, value_type &&value)
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, Hash const &hash, KeyEqual const &key_eq, Allocator const &alloc)
const_local_iterator cbegin(size_type n) const
const_iterator end() const
const_iterator cend() const
auto insert_unchecked(value_type const &value) -> typename std::enable_if<!maybe_multi, std::pair< iterator, bool > >::type
aged_unordered_container(aged_unordered_container const &other, Allocator const &alloc)
~aged_unordered_container()
allocator_type get_allocator() const
aged_unordered_container(clock_type &clock, Allocator const &alloc)
auto emplace_hint(const_iterator, Args &&... args) -> typename std::enable_if<!maybe_multi, std::pair< iterator, bool > >::type
hasher const & hash_function() const
void touch(beast::detail::aged_container_iterator< is_const, Iterator > pos, typename clock_type::time_point const &now)
void insert(InputIt first, InputIt last)
beast::detail::aged_container_iterator< true, typename cont_type::local_iterator > const_local_iterator
beast::detail::aged_container_iterator< false, Iterator > erase(beast::detail::aged_container_iterator< is_const, Iterator > pos)
void insert(InputIt first, InputIt last, std::input_iterator_tag)
aged_unordered_container & operator=(aged_unordered_container &&other)
beast::detail::aged_container_iterator<!IsMap, typename cont_type::iterator > iterator
iterator find(K const &k)
size_type count(K const &k) const
std::enable_if< maybe_propagate >::type swap_data(aged_unordered_container &other) noexcept
aged_unordered_container & operator=(std::initializer_list< value_type > init)
void unlink_and_delete_element(element const *p)
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, Hash const &hash, Allocator const &alloc)
bool operator!=(aged_unordered_container< OtherIsMulti, OtherIsMap, OtherKey, OtherT, OtherDuration, OtherHash, KeyEqual, OtherAllocator > const &other) const
void insert(InputIt first, InputIt last, std::random_access_iterator_tag)
typename std::conditional< 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 >::type cont_type
aged_unordered_container(clock_type &clock, Hash const &hash)
size_type size() const noexcept
const_iterator begin() const
aged_unordered_container(clock_type &clock, Hash const &hash, KeyEqual const &key_eq, Allocator const &alloc)
auto emplace(Args &&... args) -> typename std::enable_if<!maybe_multi, std::pair< iterator, bool > >::type
std::conditional< IsMap, T, void * >::type const & at(K const &k) const
iterator iterator_to(value_type &value)
aged_unordered_container()=delete
aged_unordered_container(clock_type &clock)
void swap(aged_unordered_container &other) noexcept
void reserve(size_type count)
element * new_element(Args &&... args)
aged_unordered_container(InputIt first, InputIt last, clock_type &clock)
aged_unordered_container(aged_unordered_container &&other)
size_type bucket_size(size_type n) const
beast::detail::aged_container_iterator< true, typename cont_type::iterator > const_iterator
void maybe_rehash(size_type additional)
std::enable_if< maybe_map &&std::is_constructible< value_type, P && >::value, typenamestd::conditional< IsMulti, iterator, std::pair< iterator, bool > >::type >::type insert(const_iterator hint, P &&value)
auto insert(value_type const &value) -> typename std::enable_if< maybe_multi, iterator >::type
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash, KeyEqual const &key_eq)
std::conditional< IsMap, T, void * >::type & operator[](Key &&key)
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, KeyEqual const &key_eq, Allocator const &alloc)
clock_type const & clock() const
aged_unordered_container(InputIt first, InputIt last, clock_type &clock, KeyEqual const &key_eq)
class beast::detail::aged_unordered_container::chronological_t chronological
auto insert(value_type &&value) -> typename std::enable_if< !maybe_multi &&!maybe_map, std::pair< iterator, bool > >::type
typename std::allocator_traits< Allocator >::template rebind_alloc< element > BucketAllocator
value_type const & const_reference
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, KeyEqual const &key_eq)
aged_unordered_container(aged_unordered_container &&other, Allocator const &alloc)
aged_unordered_container(std::initializer_list< value_type > init, clock_type &clock, Hash const &hash, Allocator const &alloc)
ElementAllocator & member() noexcept
T forward_as_tuple(T... args)
T get_allocator(T... args)
T is_permutation(T... args)
std::enable_if< is_aged_container< AgedContainer >::value, std::size_t >::type expire(AgedContainer &c, std::chrono::duration< Rep, Period > const &age)
Expire aged container items past the specified age.
void swap(beast::detail::aged_ordered_container< IsMulti, IsMap, Key, T, Clock, Compare, Allocator > &lhs, beast::detail::aged_ordered_container< IsMulti, IsMap, Key, T, Clock, Compare, Allocator > &rhs) noexcept
typename aged_unordered_container::value_type value_type
typename aged_unordered_container::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)
is_aged_container()=default