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>
28#include <boost/intrusive/list.hpp>
29#include <boost/intrusive/unordered_set.hpp>
51#ifndef BEAST_NO_CXX14_IS_PERMUTATION
52#define BEAST_NO_CXX14_IS_PERMUTATION 1
112 : boost::intrusive::unordered_set_base_hook<
113 boost::intrusive::link_mode<boost::intrusive::normal_link>>,
114 boost::intrusive::list_base_hook<
115 boost::intrusive::link_mode<boost::intrusive::normal_link>>
233 make_list<element, boost::intrusive::constant_time_size<false>>::type;
237 typename boost::intrusive::make_unordered_multiset<
239 boost::intrusive::constant_time_size<true>,
240 boost::intrusive::hash<ValueHash>,
241 boost::intrusive::equal<KeyValueEqual>,
242 boost::intrusive::cache_begin<true>>::type,
243 typename boost::intrusive::make_unordered_set<
245 boost::intrusive::constant_time_size<true>,
246 boost::intrusive::hash<ValueHash>,
247 boost::intrusive::equal<KeyValueEqual>,
248 boost::intrusive::cache_begin<true>>::type>::type;
254 Allocator>::template rebind_alloc<element>;
259 Allocator>::template rebind_alloc<element>;
303 KeyEqual
const& keyEqual,
304 Allocator
const& alloc_)
314 KeyEqual
const& keyEqual,
315 Allocator
const& alloc_)
372 key_eq() = std::move(other.key_eq());
373 alloc() = std::move(other.alloc());
453 m_vec.
resize(cont_type::suggested_upper_bucket_count(0));
458 m_vec.
resize(cont_type::suggested_upper_bucket_count(0));
491 template <
class Container>
524 template <
class Container>
529 cont_type::suggested_upper_bucket_count(n));
538 template <
class... Args>
552 ElementAllocatorTraits::deallocate(a_.
get(), p, 1);
563 std::forward<Args>(args)...);
596 aged_container_iterator<!IsMap, typename cont_type::iterator>;
598 aged_container_iterator<true, typename cont_type::iterator>;
601 aged_container_iterator<!IsMap, typename cont_type::local_iterator>;
603 aged_container_iterator<true, typename cont_type::local_iterator>;
620 aged_container_iterator<!IsMap, typename list_type::iterator>;
622 aged_container_iterator<true, typename list_type::iterator>;
625 typename list_type::reverse_iterator>;
627 aged_container_iterator<true, typename list_type::reverse_iterator>;
706 "must be standard layout");
707 return list.iterator_to(*
reinterpret_cast<element*
>(
708 reinterpret_cast<uint8_t*
>(&value) -
717 "must be standard layout");
718 return list.iterator_to(*
reinterpret_cast<element const*
>(
719 reinterpret_cast<uint8_t const*
>(&value) -
759 Allocator
const& alloc);
764 Allocator
const& alloc);
770 Allocator
const& alloc);
772 template <
class InputIt>
775 template <
class InputIt>
782 template <
class InputIt>
789 template <
class InputIt>
794 Allocator
const& alloc);
796 template <
class InputIt>
804 template <
class InputIt>
810 Allocator
const& alloc);
812 template <
class InputIt>
818 Allocator
const& alloc);
820 template <
class InputIt>
827 Allocator
const& alloc);
833 Allocator
const& alloc);
839 Allocator
const& alloc);
858 Allocator
const& alloc);
870 Allocator
const& alloc);
876 Allocator
const& alloc);
883 Allocator
const& alloc);
922 bool maybe_multi = IsMulti,
923 bool maybe_map = IsMap,
930 bool maybe_multi = IsMulti,
931 bool maybe_map = IsMap,
934 at(K
const& k)
const;
937 bool maybe_multi = IsMulti,
938 bool maybe_map = IsMap,
944 bool maybe_multi = IsMulti,
945 bool maybe_map = IsMap,
998 reinterpret_cast<uint8_t*
>(&value) -
1007 return m_cont.iterator_to(*
reinterpret_cast<element const*
>(
1008 reinterpret_cast<uint8_t const*
>(&value) -
1046 template <
bool maybe_multi = IsMulti>
1052 template <
bool maybe_multi = IsMulti>
1058 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
1061 !maybe_multi && !maybe_map,
1065 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
1071 template <
bool maybe_multi = IsMulti>
1077 return insert(value).first;
1081 template <
bool maybe_multi = IsMulti>
1091 template <
bool maybe_multi = IsMulti>
1097 return insert(std::move(value)).first;
1101 template <
bool maybe_multi = IsMulti>
1107 return insert(std::move(value));
1111 template <
class P,
bool maybe_map = IsMap>
1115 conditional<IsMulti, iterator, std::pair<iterator, bool>>::type>::
1119 return emplace(std::forward<P>(value));
1123 template <
class P,
bool maybe_map = IsMap>
1127 conditional<IsMulti, iterator, std::pair<iterator, bool>>::type>::
1134 template <
class InputIt>
1151 template <
bool maybe_multi = IsMulti,
class... Args>
1157 template <
bool maybe_multi = IsMulti,
class... Args>
1163 template <
bool maybe_multi = IsMulti,
class... Args>
1169 template <
bool maybe_multi = IsMulti,
class... Args>
1175 return emplace<maybe_multi>(std::forward<Args>(args)...);
1178 template <
bool is_const,
class Iterator>
1182 template <
bool is_const,
class Iterator>
1195 template <
bool is_const,
class Iterator>
1250 auto const r(
m_cont.equal_range(
1262 auto const r(
m_cont.equal_range(
1315 return m_cont.bucket_count();
1327 return m_cont.bucket_size(n);
1335 "beast::detail::aged_unordered_container::bucket : nonzero bucket "
1349 return size() /
static_cast<float>(
m_cont.bucket_count());
1409 class OtherDuration,
1411 class OtherAllocator,
1412 bool maybe_multi = IsMulti>
1422 OtherAllocator>
const& other)
const;
1428 class OtherDuration,
1430 class OtherAllocator,
1431 bool maybe_multi = IsMulti>
1441 OtherAllocator>
const& other)
const;
1448 class OtherDuration,
1450 class OtherAllocator>
1460 OtherAllocator>
const& other)
const
1479 "beast::detail::aged_unordered_container::maybe_rehash : maximum "
1484 template <
bool maybe_multi = IsMulti>
1490 template <
bool maybe_multi = IsMulti>
1495 template <
class InputIt>
1499 for (; first != last; ++first)
1503 template <
class InputIt>
1507 for (; first != last; ++first)
1511 template <
class InputIt>
1520 template <
bool is_const,
class Iterator>
1534 Allocator>::propagate_on_container_swap::value>
1545 Allocator>::propagate_on_container_swap::value>
1582 std::cref(m_config.value_hash()),
1583 std::cref(m_config.key_value_equal()))
1604 Allocator>::aged_unordered_container(
clock_type& clock, Hash
const& hash)
1605 : m_config(clock, hash)
1608 std::cref(m_config.value_hash()),
1609 std::cref(m_config.key_value_equal()))
1631 aged_unordered_container(
clock_type& clock, KeyEqual
const& key_eq)
1632 : m_config(clock, key_eq)
1635 std::cref(m_config.value_hash()),
1636 std::cref(m_config.key_value_equal()))
1658 aged_unordered_container(
clock_type& clock, Allocator
const& alloc)
1659 : m_config(clock, alloc)
1663 std::cref(m_config.value_hash()),
1664 std::cref(m_config.key_value_equal()))
1686 aged_unordered_container(
1689 KeyEqual
const& key_eq)
1690 : m_config(clock, hash, key_eq)
1693 std::cref(m_config.value_hash()),
1694 std::cref(m_config.key_value_equal()))
1716 aged_unordered_container(
1719 Allocator
const& alloc)
1720 : m_config(clock, hash, alloc)
1724 std::cref(m_config.value_hash()),
1725 std::cref(m_config.key_value_equal()))
1747 aged_unordered_container(
1749 KeyEqual
const& key_eq,
1750 Allocator
const& alloc)
1751 : m_config(clock, key_eq, alloc)
1755 std::cref(m_config.value_hash()),
1756 std::cref(m_config.key_value_equal()))
1778 aged_unordered_container(
1781 KeyEqual
const& key_eq,
1782 Allocator
const& alloc)
1783 : m_config(clock, hash, key_eq, alloc)
1787 std::cref(m_config.value_hash()),
1788 std::cref(m_config.key_value_equal()))
1801template <
class InputIt>
1811 aged_unordered_container(InputIt first, InputIt last,
clock_type& clock)
1815 std::cref(m_config.value_hash()),
1816 std::cref(m_config.key_value_equal()))
1830template <
class InputIt>
1840 aged_unordered_container(
1845 : m_config(clock, hash)
1848 std::cref(m_config.value_hash()),
1849 std::cref(m_config.key_value_equal()))
1863template <
class InputIt>
1873 aged_unordered_container(
1877 KeyEqual
const& key_eq)
1878 : m_config(clock, key_eq)
1881 std::cref(m_config.value_hash()),
1882 std::cref(m_config.key_value_equal()))
1896template <
class InputIt>
1906 aged_unordered_container(
1910 Allocator
const& alloc)
1911 : m_config(clock, alloc)
1915 std::cref(m_config.value_hash()),
1916 std::cref(m_config.key_value_equal()))
1930template <
class InputIt>
1940 aged_unordered_container(
1945 KeyEqual
const& key_eq)
1946 : m_config(clock, hash, key_eq)
1949 std::cref(m_config.value_hash()),
1950 std::cref(m_config.key_value_equal()))
1964template <
class InputIt>
1974 aged_unordered_container(
1979 Allocator
const& alloc)
1980 : m_config(clock, hash, alloc)
1984 std::cref(m_config.value_hash()),
1985 std::cref(m_config.key_value_equal()))
1999template <
class InputIt>
2009 aged_unordered_container(
2013 KeyEqual
const& key_eq,
2014 Allocator
const& alloc)
2015 : m_config(clock, key_eq, alloc)
2019 std::cref(m_config.value_hash()),
2020 std::cref(m_config.key_value_equal()))
2034template <
class InputIt>
2044 aged_unordered_container(
2049 KeyEqual
const& key_eq,
2050 Allocator
const& alloc)
2051 : m_config(clock, hash, key_eq, alloc)
2055 std::cref(m_config.value_hash()),
2056 std::cref(m_config.key_value_equal()))
2079 : m_config(other.m_config)
2080 , m_buck(m_config.alloc())
2083 std::cref(m_config.value_hash()),
2084 std::cref(m_config.key_value_equal()))
2107 aged_unordered_container(
2109 Allocator
const& alloc)
2110 : m_config(other.m_config, alloc)
2114 std::cref(m_config.value_hash()),
2115 std::cref(m_config.key_value_equal()))
2138 : m_config(
std::move(other.m_config))
2139 , m_buck(
std::move(other.m_buck))
2140 , m_cont(
std::move(other.m_cont))
2163 aged_unordered_container(
2165 Allocator
const& alloc)
2166 : m_config(
std::move(other.m_config), alloc)
2170 std::cref(m_config.value_hash()),
2171 std::cref(m_config.key_value_equal()))
2173 insert(other.cbegin(), other.cend());
2195 aged_unordered_container(
2201 std::cref(m_config.value_hash()),
2202 std::cref(m_config.key_value_equal()))
2225 aged_unordered_container(
2229 : m_config(clock, hash)
2232 std::cref(m_config.value_hash()),
2233 std::cref(m_config.key_value_equal()))
2256 aged_unordered_container(
2259 KeyEqual
const& key_eq)
2260 : m_config(clock, key_eq)
2263 std::cref(m_config.value_hash()),
2264 std::cref(m_config.key_value_equal()))
2287 aged_unordered_container(
2290 Allocator
const& alloc)
2291 : m_config(clock, alloc)
2295 std::cref(m_config.value_hash()),
2296 std::cref(m_config.key_value_equal()))
2319 aged_unordered_container(
2323 KeyEqual
const& key_eq)
2324 : m_config(clock, hash, key_eq)
2327 std::cref(m_config.value_hash()),
2328 std::cref(m_config.key_value_equal()))
2351 aged_unordered_container(
2355 Allocator
const& alloc)
2356 : m_config(clock, hash, alloc)
2360 std::cref(m_config.value_hash()),
2361 std::cref(m_config.key_value_equal()))
2384 aged_unordered_container(
2387 KeyEqual
const& key_eq,
2388 Allocator
const& alloc)
2389 : m_config(clock, key_eq, alloc)
2393 std::cref(m_config.value_hash()),
2394 std::cref(m_config.key_value_equal()))
2417 aged_unordered_container(
2421 KeyEqual
const& key_eq,
2422 Allocator
const& alloc)
2423 : m_config(clock, hash, key_eq, alloc)
2427 std::cref(m_config.value_hash()),
2428 std::cref(m_config.key_value_equal()))
2450 Allocator>::~aged_unordered_container()
2480 m_config = other.m_config;
2481 m_buck =
Buckets(m_config.alloc());
2483 insert_unchecked(other.begin(), other.end());
2511 m_config = std::move(other.m_config);
2512 m_buck =
Buckets(m_config.alloc());
2514 insert_unchecked(other.begin(), other.end());
2556template <
class K,
bool maybe_multi,
bool maybe_map,
class>
2566 Allocator>::at(K
const& k)
2568 auto const iter(m_cont.find(
2571 std::cref(m_config.key_value_equal())));
2572 if (iter == m_cont.end())
2574 return iter->value.second;
2586template <
class K,
bool maybe_multi,
bool maybe_map,
class>
2596 Allocator>::at(K
const& k)
const
2598 auto const iter(m_cont.find(
2601 std::cref(m_config.key_value_equal())));
2602 if (iter == m_cont.end())
2604 return iter->value.second;
2616template <
bool maybe_multi,
bool maybe_map,
class>
2626 Allocator>::operator[](Key
const& key)
2629 typename cont_type::insert_commit_data d;
2630 auto const result(m_cont.insert_check(
2638 std::piecewise_construct,
2641 m_cont.insert_commit(*p, d);
2642 chronological.list.push_back(*p);
2643 return p->
value.second;
2645 return result.first->value.second;
2657template <
bool maybe_multi,
bool maybe_map,
class>
2667 Allocator>::operator[](Key&& key)
2670 typename cont_type::insert_commit_data d;
2671 auto const result(m_cont.insert_check(
2679 std::piecewise_construct,
2682 m_cont.insert_commit(*p, d);
2683 chronological.list.push_back(*p);
2684 return p->
value.second;
2686 return result.first->value.second;
2711 for (
auto iter(chronological.list.begin());
2712 iter != chronological.list.end();)
2713 unlink_and_delete_element(&*iter++);
2714 chronological.list.clear();
2729template <
bool maybe_multi>
2743 typename cont_type::insert_commit_data d;
2744 auto const result(m_cont.insert_check(
2751 element*
const p(new_element(value));
2752 auto const iter(m_cont.insert_commit(*p, d));
2753 chronological.list.push_back(*p);
2769template <
bool maybe_multi>
2779 Allocator>::insert(value_type
const& value) ->
2783 element*
const p(new_element(value));
2784 chronological.list.push_back(*p);
2785 auto const iter(m_cont.insert(*p));
2786 return iterator(iter);
2799template <
bool maybe_multi,
bool maybe_map>
2801aged_unordered_container<
2811 enable_if<!maybe_multi && !maybe_map, std::pair<iterator, bool>>::type
2814 typename cont_type::insert_commit_data d;
2815 auto const result(m_cont.insert_check(
2822 element*
const p(new_element(std::move(value)));
2823 auto const iter(m_cont.insert_commit(*p, d));
2824 chronological.list.push_back(*p);
2840template <
bool maybe_multi,
bool maybe_map>
2850 Allocator>::insert(value_type&& value) ->
2854 element*
const p(new_element(std::move(value)));
2855 chronological.list.push_back(*p);
2856 auto const iter(m_cont.insert(*p));
2857 return iterator(iter);
2871template <
bool maybe_multi,
class... Args>
2873aged_unordered_container<
2881 Allocator>::emplace(Args&&... args) ->
2887 element*
const p(new_element(std::forward<Args>(args)...));
2888 auto const result(m_cont.insert(*p));
2891 chronological.list.push_back(*p);
2908template <
bool maybe_multi,
class... Args>
2918 Allocator>::emplace(Args&&... args) ->
2924 element*
const p(new_element(std::forward<Args>(args)...));
2925 typename cont_type::insert_commit_data d;
2926 auto const result(m_cont.insert_check(
2933 auto const iter(m_cont.insert_commit(*p, d));
2934 chronological.list.push_back(*p);
2952template <
bool maybe_multi,
class... Args>
2954aged_unordered_container<
2962 Allocator>::emplace(Args&&... args) ->
2966 element*
const p(new_element(std::forward<Args>(args)...));
2967 chronological.list.push_back(*p);
2968 auto const iter(m_cont.insert(*p));
2969 return iterator(iter);
2982template <
bool maybe_multi,
class... Args>
2984aged_unordered_container<
2998 element*
const p(new_element(std::forward<Args>(args)...));
2999 typename cont_type::insert_commit_data d;
3000 auto const result(m_cont.insert_check(
3007 auto const iter(m_cont.insert_commit(*p, d));
3008 chronological.list.push_back(*p);
3024template <
bool is_const,
class Iterator>
3037 unlink_and_delete_element(&*((pos++).
iterator()));
3051template <
bool is_const,
class Iterator>
3066 for (; first != last;)
3067 unlink_and_delete_element(&*((first++).
iterator()));
3094 auto iter(m_cont.find(
3097 std::cref(m_config.key_value_equal())));
3098 if (iter == m_cont.end())
3104 bool const done(m_config(*p, extract(iter->value)));
3105 unlink_and_delete_element(p);
3134 std::swap(chronological, other.chronological);
3159 auto const now(clock().now());
3161 auto const range(equal_range(k));
3162 for (
auto iter : range)
3183 class OtherDuration,
3185 class OtherAllocator,
3205 OtherAllocator>
const& other)
const
3207 if (size() != other.size())
3209 for (
auto iter(cbegin()), last(cend()), olast(other.cend()); iter != last;
3212 auto oiter(other.find(extract(*iter)));
3232 class OtherDuration,
3234 class OtherAllocator,
3254 OtherAllocator>
const& other)
const
3256 if (size() != other.size())
3259 for (
auto iter(cbegin()), last(cend()); iter != last;)
3261 auto const& k(extract(*iter));
3262 auto const eq(equal_range(k));
3263 auto const oeq(other.equal_range(k));
3264#if BEAST_NO_CXX14_IS_PERMUTATION
3290template <
bool maybe_multi>
3303 typename cont_type::insert_commit_data d;
3304 auto const result(m_cont.insert_check(
3311 element*
const p(new_element(value));
3312 auto const iter(m_cont.insert_commit(*p, d));
3313 chronological.list.push_back(*p);
3329template <
bool maybe_multi>
3339 Allocator>::insert_unchecked(value_type
const& value) ->
3342 element*
const p(new_element(value));
3343 chronological.list.push_back(*p);
3344 auto const iter(m_cont.insert(*p));
3345 return iterator(iter);
3406 Allocator>& rhs)
noexcept
3437 auto const expired(c.clock().now() - age);
3438 for (
auto iter(c.chronological.cbegin());
3439 iter != c.chronological.cend() && iter.when() <= expired;)
3441 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