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
92 struct element : boost::intrusive::unordered_set_base_hook<
93 boost::intrusive::link_mode<boost::intrusive::normal_link>>,
94 boost::intrusive::list_base_hook<
95 boost::intrusive::link_mode<boost::intrusive::normal_link>>
212 make_list<element, boost::intrusive::constant_time_size<false>>::type;
216 typename boost::intrusive::make_unordered_multiset<
218 boost::intrusive::constant_time_size<true>,
219 boost::intrusive::hash<ValueHash>,
220 boost::intrusive::equal<KeyValueEqual>,
221 boost::intrusive::cache_begin<true>>::type,
222 typename boost::intrusive::make_unordered_set<
224 boost::intrusive::constant_time_size<true>,
225 boost::intrusive::hash<ValueHash>,
226 boost::intrusive::equal<KeyValueEqual>,
227 boost::intrusive::cache_begin<true>>::type>::type;
287 KeyEqual
const& keyEqual,
288 Allocator
const& alloc_)
323 Allocator
const&
alloc)
345 key_eq() = std::move(other.key_eq());
346 alloc() = std::move(other.alloc());
423 m_vec.
resize(cont_type::suggested_upper_bucket_count(0));
428 m_vec.
resize(cont_type::suggested_upper_bucket_count(0));
461 template <
class Container>
494 template <
class Container>
498 size_type const suggested(cont_type::suggested_upper_bucket_count(n));
507 template <
class... Args>
521 ElementAllocatorTraits::deallocate(a_.
get(), p, 1);
666 return list.iterator_to(*
reinterpret_cast<element*
>(
667 reinterpret_cast<uint8_t*
>(&value) -
675 return list.iterator_to(*
reinterpret_cast<element const*
>(
676 reinterpret_cast<uint8_t const*
>(&value) -
718 Allocator
const& alloc);
720 template <
class InputIt>
723 template <
class InputIt>
726 template <
class InputIt>
733 template <
class InputIt>
738 Allocator
const& alloc);
740 template <
class InputIt>
748 template <
class InputIt>
754 Allocator
const& alloc);
756 template <
class InputIt>
762 Allocator
const& alloc);
764 template <
class InputIt>
771 Allocator
const& alloc);
782 Allocator
const& alloc);
799 Allocator
const& alloc);
811 Allocator
const& alloc);
817 Allocator
const& alloc);
824 Allocator
const& alloc);
863 bool maybe_multi = IsMulti,
864 bool maybe_map = IsMap,
871 bool maybe_multi = IsMulti,
872 bool maybe_map = IsMap,
875 at(K
const& k)
const;
878 bool maybe_multi = IsMulti,
879 bool maybe_map = IsMap,
885 bool maybe_multi = IsMulti,
886 bool maybe_map = IsMap,
938 reinterpret_cast<uint8_t*
>(&value) -
947 reinterpret_cast<uint8_t const*
>(&value) -
985 template <
bool maybe_multi = IsMulti>
991 template <
bool maybe_multi = IsMulti>
996 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
1002 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
1008 template <
bool maybe_multi = IsMulti>
1014 return insert(value).first;
1018 template <
bool maybe_multi = IsMulti>
1028 template <
bool maybe_multi = IsMulti>
1034 return insert(std::move(value)).first;
1038 template <
bool maybe_multi = IsMulti>
1044 return insert(std::move(value));
1048 template <
class P,
bool maybe_map = IsMap>
1058 template <
class P,
bool maybe_map = IsMap>
1067 template <
class InputIt>
1081 template <
bool maybe_multi = IsMulti,
class... Args>
1087 template <
bool maybe_multi = IsMulti,
class... Args>
1092 template <
bool maybe_multi = IsMulti,
class... Args>
1098 template <
bool maybe_multi = IsMulti,
class... Args>
1107 template <
bool is_const,
class Iterator>
1111 template <
bool is_const,
class Iterator>
1124 template <
bool is_const,
class Iterator>
1173 auto const r(
m_cont.equal_range(
1183 auto const r(
m_cont.equal_range(
1233 return m_cont.bucket_count();
1245 return m_cont.bucket_size(n);
1253 "beast::detail::aged_unordered_container::bucket : nonzero bucket "
1267 return size() /
static_cast<float>(
m_cont.bucket_count());
1327 class OtherDuration,
1329 class OtherAllocator,
1330 bool maybe_multi = IsMulti>
1340 OtherAllocator>
const& other)
const;
1346 class OtherDuration,
1348 class OtherAllocator,
1349 bool maybe_multi = IsMulti>
1359 OtherAllocator>
const& other)
const;
1366 class OtherDuration,
1368 class OtherAllocator>
1378 OtherAllocator>
const& other)
const
1397 "beast::detail::aged_unordered_container::maybe_rehash : maximum "
1402 template <
bool maybe_multi = IsMulti>
1408 template <
bool maybe_multi = IsMulti>
1413 template <
class InputIt>
1417 for (; first != last; ++first)
1421 template <
class InputIt>
1425 for (; first != last; ++first)
1429 template <
class InputIt>
1438 template <
bool is_const,
class Iterator>
1489 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1504 : m_config(clock, hash)
1505 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1520 : m_config(clock, key_eq)
1521 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1536 : m_config(clock, alloc)
1538 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1553 : m_config(clock, hash, key_eq)
1554 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1569 : m_config(clock, hash, alloc)
1571 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1586 : m_config(clock, key_eq, alloc)
1588 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1605 KeyEqual
const& key_eq,
1606 Allocator
const& alloc)
1607 : m_config(clock, hash, key_eq, alloc)
1609 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1622template <
class InputIt>
1626 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1640template <
class InputIt>
1643 : m_config(clock, hash)
1644 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1658template <
class InputIt>
1661 : m_config(clock, key_eq)
1662 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1676template <
class InputIt>
1679 : m_config(clock, alloc)
1681 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1695template <
class InputIt>
1702 KeyEqual
const& key_eq)
1703 : m_config(clock, hash, key_eq)
1704 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1718template <
class InputIt>
1725 Allocator
const& alloc)
1726 : m_config(clock, hash, alloc)
1728 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1742template <
class InputIt>
1748 KeyEqual
const& key_eq,
1749 Allocator
const& alloc)
1750 : m_config(clock, key_eq, alloc)
1752 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1766template <
class InputIt>
1773 KeyEqual
const& key_eq,
1774 Allocator
const& alloc)
1775 : m_config(clock, hash, key_eq, alloc)
1777 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1793 : m_config(other.m_config)
1794 , m_buck(m_config.alloc())
1795 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1811 : m_config(other.m_config, alloc)
1813 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1829 : m_config(
std::move(other.m_config))
1830 , m_buck(
std::move(other.m_buck))
1831 , m_cont(
std::move(other.m_cont))
1849 Allocator
const& alloc)
1850 : m_config(
std::move(other.m_config), alloc)
1852 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1854 insert(other.cbegin(), other.cend());
1870 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1889 : m_config(clock, hash)
1890 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1908 KeyEqual
const& key_eq)
1909 : m_config(clock, key_eq)
1910 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1928 Allocator
const& alloc)
1929 : m_config(clock, alloc)
1931 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1950 KeyEqual
const& key_eq)
1951 : m_config(clock, hash, key_eq)
1952 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1971 Allocator
const& alloc)
1972 : m_config(clock, hash, alloc)
1974 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
1992 KeyEqual
const& key_eq,
1993 Allocator
const& alloc)
1994 : m_config(clock, key_eq, alloc)
1996 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
2015 KeyEqual
const& key_eq,
2016 Allocator
const& alloc)
2017 : m_config(clock, hash, key_eq, alloc)
2019 , m_cont(m_buck,
std::cref(m_config.value_hash()),
std::cref(m_config.key_value_equal()))
2056 m_config = other.m_config;
2057 m_buck =
Buckets(m_config.alloc());
2059 insert_unchecked(other.begin(), other.end());
2079 m_config = std::move(other.m_config);
2080 m_buck =
Buckets(m_config.alloc());
2082 insert_unchecked(other.begin(), other.end());
2116template <
class K,
bool maybe_multi,
bool maybe_map,
class>
2121 m_cont.find(k,
std::cref(m_config.hash_function()),
std::cref(m_config.key_value_equal())));
2122 if (iter == m_cont.end())
2124 return iter->value.second;
2136template <
class K,
bool maybe_multi,
bool maybe_map,
class>
2142 m_cont.find(k,
std::cref(m_config.hash_function()),
std::cref(m_config.key_value_equal())));
2143 if (iter == m_cont.end())
2145 return iter->value.second;
2157template <
bool maybe_multi,
bool maybe_map,
class>
2163 typename cont_type::insert_commit_data d;
2164 auto const result(m_cont.insert_check(
2165 key,
std::cref(m_config.hash_function()),
std::cref(m_config.key_value_equal()), d));
2170 m_cont.insert_commit(*p, d);
2171 chronological.list.push_back(*p);
2172 return p->
value.second;
2174 return result.first->value.second;
2186template <
bool maybe_multi,
bool maybe_map,
class>
2192 typename cont_type::insert_commit_data d;
2193 auto const result(m_cont.insert_check(
2194 key,
std::cref(m_config.hash_function()),
std::cref(m_config.key_value_equal()), d));
2201 m_cont.insert_commit(*p, d);
2202 chronological.list.push_back(*p);
2203 return p->
value.second;
2205 return result.first->value.second;
2222 for (
auto iter(chronological.list.begin()); iter != chronological.list.end();)
2223 unlink_and_delete_element(&*iter++);
2224 chronological.list.clear();
2239template <
bool maybe_multi>
2246 typename cont_type::insert_commit_data d;
2247 auto const result(m_cont.insert_check(
2254 element*
const p(new_element(value));
2255 auto const iter(m_cont.insert_commit(*p, d));
2256 chronological.list.push_back(*p);
2272template <
bool maybe_multi>
2278 element*
const p(new_element(value));
2279 chronological.list.push_back(*p);
2280 auto const iter(m_cont.insert(*p));
2281 return iterator(iter);
2294template <
bool maybe_multi,
bool maybe_map>
2301 typename cont_type::insert_commit_data d;
2302 auto const result(m_cont.insert_check(
2309 element*
const p(new_element(std::move(value)));
2310 auto const iter(m_cont.insert_commit(*p, d));
2311 chronological.list.push_back(*p);
2327template <
bool maybe_multi,
bool maybe_map>
2333 element*
const p(new_element(std::move(value)));
2334 chronological.list.push_back(*p);
2335 auto const iter(m_cont.insert(*p));
2336 return iterator(iter);
2350template <
bool maybe_multi,
class... Args>
2359 auto const result(m_cont.insert(*p));
2362 chronological.list.push_back(*p);
2379template <
bool maybe_multi,
class... Args>
2388 typename cont_type::insert_commit_data d;
2389 auto const result(m_cont.insert_check(
2396 auto const iter(m_cont.insert_commit(*p, d));
2397 chronological.list.push_back(*p);
2415template <
bool maybe_multi,
class... Args>
2422 chronological.list.push_back(*p);
2423 auto const iter(m_cont.insert(*p));
2424 return iterator(iter);
2437template <
bool maybe_multi,
class... Args>
2447 typename cont_type::insert_commit_data d;
2448 auto const result(m_cont.insert_check(
2455 auto const iter(m_cont.insert_commit(*p, d));
2456 chronological.list.push_back(*p);
2472template <
bool is_const,
class Iterator>
2477 unlink_and_delete_element(&*((pos++).
iterator()));
2490template <
bool is_const,
class Iterator>
2496 for (; first != last;)
2497 unlink_and_delete_element(&*((first++).
iterator()));
2517 m_cont.find(k,
std::cref(m_config.hash_function()),
std::cref(m_config.key_value_equal())));
2518 if (iter == m_cont.end())
2524 bool const done(m_config(*p, extract(iter->value)));
2525 unlink_and_delete_element(p);
2547 std::swap(chronological, other.chronological);
2565 auto const now(clock().now());
2567 auto const range(equal_range(k));
2568 for (
auto iter : range)
2589 class OtherDuration,
2591 class OtherAllocator,
2603 OtherAllocator>
const& other)
const
2605 if (size() != other.size())
2607 for (
auto iter(cbegin()), last(cend()), otherLast(other.cend()); iter != last; ++iter)
2609 auto otherIter(other.find(extract(*iter)));
2610 if (otherIter == otherLast)
2629 class OtherDuration,
2631 class OtherAllocator,
2643 OtherAllocator>
const& other)
const
2645 if (size() != other.size())
2647 for (
auto iter(cbegin()), last(cend()); iter != last;)
2649 auto const& k(extract(*iter));
2650 auto const eq(equal_range(k));
2651 auto const oeq(other.equal_range(k));
2652#if BEAST_NO_CXX14_IS_PERMUTATION
2677template <
bool maybe_multi>
2683 typename cont_type::insert_commit_data d;
2684 auto const result(m_cont.insert_check(
2691 element*
const p(new_element(value));
2692 auto const iter(m_cont.insert_commit(*p, d));
2693 chronological.list.push_back(*p);
2709template <
bool maybe_multi>
2715 element*
const p(new_element(value));
2716 chronological.list.push_back(*p);
2717 auto const iter(m_cont.insert(*p));
2718 return iterator(iter);
2738 aged_unordered_container<IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator>>
2758 aged_unordered_container<IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator>& lhs,
2760 aged_unordered_container<IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator>&
2781 aged_unordered_container<IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator>& c,
2782 std::chrono::duration<Rep, Period> const& age) noexcept
2785 auto const expired(c.clock().now() - age);
2786 for (
auto iter(c.chronological.cbegin());
2787 iter != c.chronological.cend() && iter.when() <= expired;)
2789 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
const_iterator end() const
beast::detail::aged_container_iterator< true, typename list_type::reverse_iterator > const_reverse_iterator
chronological_t(chronological_t &&)=delete
const_reverse_iterator rbegin() const
beast::detail::aged_container_iterator< true, typename list_type::iterator > const_iterator
const_iterator cbegin() const
reverse_iterator rbegin()
beast::detail::aged_container_iterator<!IsMap, typename list_type::iterator > iterator
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.
beast::detail::aged_container_iterator< true, typename cont_type::iterator > const_iterator
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)
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::allocator_traits< Allocator >::template rebind_alloc< element > BucketAllocator
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
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)
beast::detail::aged_container_iterator<!IsMap, typename cont_type::local_iterator > local_iterator
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
beast::detail::aged_container_iterator<!IsMap, typename cont_type::iterator > iterator
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
typename std::allocator_traits< Allocator >::template rebind_alloc< element > ElementAllocator
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< 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)
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
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
beast::detail::aged_container_iterator< true, typename cont_type::local_iterator > const_local_iterator
value_type const & const_reference
auto insert(value_type &&value) -> typename std::enable_if<!maybe_multi &&!maybe_map, std::pair< iterator, bool > >::type
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)
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