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/set.hpp>
11#include <boost/version.hpp>
87 struct element : boost::intrusive::set_base_hook<
88 boost::intrusive::link_mode<boost::intrusive::normal_link>>,
89 boost::intrusive::list_base_hook<
90 boost::intrusive::link_mode<boost::intrusive::normal_link>>
135 return Compare::operator()(lhs.first, rhs.first);
201 make_list<element, boost::intrusive::constant_time_size<false>>::type;
205 typename boost::intrusive::make_multiset<
207 boost::intrusive::constant_time_size<true>,
208 boost::intrusive::compare<KeyValueCompare>>::type,
209 typename boost::intrusive::make_set<
211 boost::intrusive::constant_time_size<true>,
212 boost::intrusive::compare<KeyValueCompare>>::type>::type;
267 Allocator
const&
alloc)
289 compare() = std::move(other.compare());
290 alloc() = std::move(other.alloc());
334 template <
class... Args>
348 ElementAllocatorTraits::deallocate(a_.
get(), p, 1);
492 return list.iterator_to(*
reinterpret_cast<element*
>(
493 reinterpret_cast<uint8_t*
>(&value) -
501 return list.iterator_to(*
reinterpret_cast<element const*
>(
502 reinterpret_cast<uint8_t const*
>(&value) -
534 template <
class InputIt>
537 template <
class InputIt>
540 template <
class InputIt>
543 template <
class InputIt>
549 Allocator
const& alloc);
560 Allocator
const& alloc);
567 Compare
const& comp);
572 Allocator
const& alloc);
578 Allocator
const& alloc);
617 bool maybe_multi = IsMulti,
618 bool maybe_map = IsMap,
625 bool maybe_multi = IsMulti,
626 bool maybe_map = IsMap,
629 at(K
const& k)
const;
632 bool maybe_multi = IsMulti,
633 bool maybe_map = IsMap,
639 bool maybe_multi = IsMulti,
640 bool maybe_map = IsMap,
728 reinterpret_cast<uint8_t*
>(&value) -
737 reinterpret_cast<uint8_t const*
>(&value) -
775 template <
bool maybe_multi = IsMulti>
781 template <
bool maybe_multi = IsMulti>
786 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
792 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
800 template <
bool maybe_multi = IsMulti>
806 template <
bool maybe_multi = IsMulti>
815 template <
bool maybe_multi = IsMulti>
821 template <
bool maybe_multi = IsMulti>
826 return insert(std::move(value));
830 template <
class P,
bool maybe_map = IsMap>
840 template <
class P,
bool maybe_map = IsMap>
849 template <
class InputIt>
853 for (; first != last; ++first)
864 template <
bool maybe_multi = IsMulti,
class... Args>
870 template <
bool maybe_multi = IsMulti,
class... Args>
875 template <
bool maybe_multi = IsMulti,
class... Args>
881 template <
bool maybe_multi = IsMulti,
class... Args>
1045 class OtherDuration,
1046 class OtherAllocator>
1055 OtherAllocator>
const& other)
const;
1061 class OtherDuration,
1062 class OtherAllocator>
1071 OtherAllocator>
const& other)
const
1080 class OtherDuration,
1081 class OtherAllocator>
1090 OtherAllocator>
const& other)
const
1100 class OtherDuration,
1101 class OtherAllocator>
1110 OtherAllocator>
const& other)
const
1112 return !(other < *
this);
1119 class OtherDuration,
1120 class OtherAllocator>
1129 OtherAllocator>
const& other)
const
1131 return other < *
this;
1138 class OtherDuration,
1139 class OtherAllocator>
1148 OtherAllocator>
const& other)
const
1150 return !(*
this < other);
1181template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1188template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1191 Compare
const& comp)
1192 : m_config(clock, comp), m_cont(comp)
1196template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1199 Allocator
const& alloc)
1200 : m_config(clock, alloc)
1204template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1207 Compare
const& comp,
1208 Allocator
const& alloc)
1209 : m_config(clock, comp, alloc), m_cont(comp)
1213template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1214template <
class InputIt>
1224template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1225template <
class InputIt>
1230 Compare
const& comp)
1231 : m_config(clock, comp), m_cont(comp)
1236template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1237template <
class InputIt>
1242 Allocator
const& alloc)
1243 : m_config(clock, alloc)
1248template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1249template <
class InputIt>
1254 Compare
const& comp,
1255 Allocator
const& alloc)
1256 : m_config(clock, comp, alloc), m_cont(comp)
1261template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1264 : m_config(other.m_config)
1265#if BOOST_VERSION >= 108000
1266 , m_cont(other.m_cont.get_comp())
1268 , m_cont(other.m_cont.comp())
1274template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1277 Allocator
const& alloc)
1278 : m_config(other.m_config, alloc)
1279#if BOOST_VERSION >= 108000
1280 , m_cont(other.m_cont.get_comp())
1282 , m_cont(other.m_cont.comp())
1288template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1291 : m_config(
std::move(other.m_config)), m_cont(
std::move(other.m_cont))
1296template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1299 Allocator
const& alloc)
1300 : m_config(
std::move(other.m_config), alloc)
1301#if BOOST_VERSION >= 108000
1302 , m_cont(
std::move(other.m_cont.get_comp()))
1304 , m_cont(
std::move(other.m_cont.comp()))
1308 insert(other.cbegin(), other.cend());
1312template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1321template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1325 Compare
const& comp)
1326 : m_config(clock, comp), m_cont(comp)
1331template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1335 Allocator
const& alloc)
1336 : m_config(clock, alloc)
1341template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1345 Compare
const& comp,
1346 Allocator
const& alloc)
1347 : m_config(clock, comp, alloc), m_cont(comp)
1352template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1358template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1366 this->m_config = other.m_config;
1367 insert(other.begin(), other.end());
1372template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1378 this->m_config = std::move(other.m_config);
1379 insert(other.begin(), other.end());
1384template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1396template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1397template <
class K,
bool maybe_multi,
bool maybe_map,
class>
1401 auto const iter(m_cont.find(k,
std::cref(m_config.key_compare())));
1402 if (iter == m_cont.end())
1404 return iter->value.second;
1407template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1408template <
class K,
bool maybe_multi,
bool maybe_map,
class>
1412 auto const iter(m_cont.find(k,
std::cref(m_config.key_compare())));
1413 if (iter == m_cont.end())
1415 return iter->value.second;
1418template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1419template <
bool maybe_multi,
bool maybe_map,
class>
1424 typename cont_type::insert_commit_data d;
1425 auto const result(m_cont.insert_check(key,
std::cref(m_config.key_compare()), d));
1430 m_cont.insert_commit(*p, d);
1431 chronological.list.push_back(*p);
1432 return p->
value.second;
1434 return result.first->value.second;
1437template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1438template <
bool maybe_multi,
bool maybe_map,
class>
1442 typename cont_type::insert_commit_data d;
1443 auto const result(m_cont.insert_check(key,
std::cref(m_config.key_compare()), d));
1450 m_cont.insert_commit(*p, d);
1451 chronological.list.push_back(*p);
1452 return p->
value.second;
1454 return result.first->value.second;
1459template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1463 for (
auto iter(chronological.list.begin()); iter != chronological.list.end();)
1464 delete_element(&*iter++);
1465 chronological.list.clear();
1470template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1471template <
bool maybe_multi>
1477 typename cont_type::insert_commit_data d;
1478 auto const result(m_cont.insert_check(extract(value),
std::cref(m_config.key_compare()), d));
1481 element*
const p(new_element(value));
1482 auto const iter(m_cont.insert_commit(*p, d));
1483 chronological.list.push_back(*p);
1490template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1491template <
bool maybe_multi>
1496 auto const before(m_cont.upper_bound(extract(value),
std::cref(m_config.key_compare())));
1497 element*
const p(new_element(value));
1498 chronological.list.push_back(*p);
1499 auto const iter(m_cont.insert_before(before, *p));
1500 return iterator(iter);
1504template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1505template <
bool maybe_multi,
bool maybe_map>
1511 typename cont_type::insert_commit_data d;
1512 auto const result(m_cont.insert_check(extract(value),
std::cref(m_config.key_compare()), d));
1515 element*
const p(new_element(std::move(value)));
1516 auto const iter(m_cont.insert_commit(*p, d));
1517 chronological.list.push_back(*p);
1524template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1525template <
bool maybe_multi,
bool maybe_map>
1530 auto const before(m_cont.upper_bound(extract(value),
std::cref(m_config.key_compare())));
1531 element*
const p(new_element(std::move(value)));
1532 chronological.list.push_back(*p);
1533 auto const iter(m_cont.insert_before(before, *p));
1534 return iterator(iter);
1540template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1541template <
bool maybe_multi>
1547 typename cont_type::insert_commit_data d;
1549 m_cont.insert_check(hint.iterator(), extract(value),
std::cref(m_config.key_compare()), d));
1552 element*
const p(new_element(value));
1553 auto const iter(m_cont.insert_commit(*p, d));
1554 chronological.list.push_back(*p);
1561template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1562template <
bool maybe_multi>
1568 typename cont_type::insert_commit_data d;
1570 m_cont.insert_check(hint.iterator(), extract(value),
std::cref(m_config.key_compare()), d));
1573 element*
const p(new_element(std::move(value)));
1574 auto const iter(m_cont.insert_commit(*p, d));
1575 chronological.list.push_back(*p);
1582template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1583template <
bool maybe_multi,
class... Args>
1591 typename cont_type::insert_commit_data d;
1592 auto const result(m_cont.insert_check(extract(p->
value),
std::cref(m_config.key_compare()), d));
1595 auto const iter(m_cont.insert_commit(*p, d));
1596 chronological.list.push_back(*p);
1604template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1605template <
bool maybe_multi,
class... Args>
1611 auto const before(m_cont.upper_bound(extract(p->value),
std::cref(m_config.key_compare())));
1612 chronological.list.push_back(*p);
1613 auto const iter(m_cont.insert_before(before, *p));
1614 return iterator(iter);
1618template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1619template <
bool maybe_multi,
class... Args>
1628 typename cont_type::insert_commit_data d;
1629 auto const result(m_cont.insert_check(
1630 hint.iterator(), extract(p->
value),
std::cref(m_config.key_compare()), d));
1633 auto const iter(m_cont.insert_commit(*p, d));
1634 chronological.list.push_back(*p);
1641template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1642template <
bool is_const,
class Iterator,
class>
1647 unlink_and_delete_element(&*((pos++).
iterator()));
1651template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1652template <
bool is_const,
class Iterator,
class>
1658 for (; first != last;)
1659 unlink_and_delete_element(&*((first++).
iterator()));
1664template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1670 auto iter(m_cont.find(k,
std::cref(m_config.key_compare())));
1671 if (iter == m_cont.end())
1677 bool const done(m_config(*p, extract(iter->value)));
1678 unlink_and_delete_element(p);
1686template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1692 std::swap(chronological, other.chronological);
1698template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1704 auto const now(clock().now());
1706 auto const range(equal_range(k));
1707 for (
auto iter : range)
1717template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1722 class OtherDuration,
1723 class OtherAllocator>
1733 OtherAllocator>
const& other)
const
1743 if (size() != other.size())
1751 [&eq, &other](
value_type const& lhs,
typename Other::value_type
const& rhs) {
1752 return eq(extract(lhs), other.extract(rhs));
1758template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1759template <
bool is_const,
class Iterator,
class>
1767 chronological.list.erase(chronological.list.iterator_to(e));
1768 chronological.list.push_back(e);
1771template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1772template <
bool maybe_propagate>
1777 std::swap(m_config.key_compare(), other.m_config.key_compare());
1778 std::swap(m_config.alloc(), other.m_config.alloc());
1779 std::swap(m_config.clock, other.m_config.clock);
1782template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1783template <
bool maybe_propagate>
1788 std::swap(m_config.key_compare(), other.m_config.key_compare());
1789 std::swap(m_config.clock, other.m_config.clock);
1796template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1806template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1833 auto const expired(c.
clock().
now() - age);
1837 iter = c.
erase(iter);
Abstract interface to a clock.
typename Clock::time_point time_point
virtual time_point now() const =0
Returns the current time.
typename Clock::duration duration
time_point const & when() const
Iterator const & iterator() const
bool operator()(element const &e, Key const &k) const
Compare const & compare() const
bool operator()(element const &x, element const &y) const
KeyValueCompare(Compare const &compare)
KeyValueCompare()=default
bool operator()(Key const &k, element const &e) const
const_iterator iterator_to(value_type const &value) const
const_reverse_iterator rbegin() const
const_reverse_iterator crbegin() const
const_iterator cbegin() const
const_reverse_iterator crend() const
beast::detail::aged_container_iterator< true, typename list_type::reverse_iterator > const_reverse_iterator
chronological_t(chronological_t const &)=delete
beast::detail::aged_container_iterator<!IsMap, typename list_type::reverse_iterator > reverse_iterator
reverse_iterator rbegin()
beast::detail::aged_container_iterator<!IsMap, typename list_type::iterator > iterator
const_iterator end() const
const_reverse_iterator rend() const
const_iterator cend() const
iterator iterator_to(value_type &value)
chronological_t(chronological_t &&)=delete
const_iterator begin() const
beast::detail::aged_container_iterator< true, typename list_type::iterator > const_iterator
KeyValueCompare & key_compare()
config_t(config_t const &other, Allocator const &alloc)
ElementAllocator & alloc()
config_t(clock_type &clock_, Allocator const &alloc_)
KeyValueCompare const & key_compare() const
Compare const & compare() const
config_t & operator=(config_t &&other)
config_t(clock_type &clock_)
ElementAllocator const & alloc() const
config_t(config_t const &other)
std::reference_wrapper< clock_type > clock
config_t(clock_type &clock_, Compare const &comp, Allocator const &alloc_)
config_t & operator=(config_t const &other)
config_t(config_t &&other, Allocator const &alloc)
config_t(clock_type &clock_, Compare const &comp)
config_t(config_t &&other)
pair_value_compare(pair_value_compare const &other)
friend aged_ordered_container
value_type second_argument
bool operator()(value_type const &lhs, value_type const &rhs) const
pair_value_compare(Compare const &compare)
value_type first_argument
Associative container where each element is also indexed by time.
std::conditional< IsMap, T, void * >::type & operator[](Key const &key)
aged_ordered_container(aged_ordered_container &&other, Allocator const &alloc)
size_type touch(K const &k)
std::enable_if< maybe_multi, iterator >::type emplace_hint(const_iterator, Args &&... args)
typename std::allocator_traits< Allocator >::const_pointer const_pointer
aged_ordered_container(aged_ordered_container &&other)
value_compare value_comp() const
clock_type const & clock() const
auto insert(const_iterator hint, value_type const &value) -> typename std::enable_if<!maybe_multi, iterator >::type
aged_ordered_container(clock_type &clock)
std::conditional< IsMap, T, void * >::type & at(K const &k)
typename std::allocator_traits< Allocator >::pointer pointer
aged_ordered_container & operator=(std::initializer_list< value_type > init)
typename std::allocator_traits< Allocator >::template rebind_alloc< element > ElementAllocator
auto insert(value_type const &value) -> typename std::enable_if< maybe_multi, iterator >::type
const_iterator find(K const &k) const
reverse_iterator rbegin()
beast::detail::aged_container_iterator< true, typename cont_type::reverse_iterator > const_reverse_iterator
typename std::conditional< IsMap, pair_value_compare, Compare >::type value_compare
const_iterator cend() const
void swap(aged_ordered_container &other) noexcept
beast::detail::aged_container_iterator< false, Iterator > erase(beast::detail::aged_container_iterator< is_const, Iterator > pos)
auto insert(value_type &&value) -> typename std::enable_if<!maybe_multi &&!maybe_map, std::pair< iterator, bool > >::type
const_reverse_iterator rbegin() const
aged_ordered_container(clock_type &clock, Compare const &comp)
~aged_ordered_container()
aged_ordered_container(aged_ordered_container const &other, Allocator const &alloc)
aged_ordered_container(std::initializer_list< value_type > init, clock_type &clock, Compare const &comp, Allocator const &alloc)
aged_ordered_container(std::initializer_list< value_type > init, clock_type &clock, Allocator const &alloc)
bool operator<=(aged_ordered_container< OtherIsMulti, OtherIsMap, Key, OtherT, OtherDuration, Compare, OtherAllocator > const &other) const
aged_ordered_container(std::initializer_list< value_type > init, clock_type &clock)
aged_ordered_container & operator=(aged_ordered_container const &other)
aged_ordered_container(InputIt first, InputIt last, clock_type &clock, Allocator const &alloc)
bool operator>(aged_ordered_container< OtherIsMulti, OtherIsMap, Key, OtherT, OtherDuration, Compare, OtherAllocator > const &other) const
void insert(InputIt first, InputIt last)
const_reverse_iterator crend() const
std::pair< iterator, iterator > equal_range(K const &k)
bool operator==(aged_ordered_container< OtherIsMulti, OtherIsMap, Key, OtherT, OtherDuration, Compare, OtherAllocator > const &other) const
aged_ordered_container(clock_type &clock, Compare const &comp, Allocator const &alloc)
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)
void insert(std::initializer_list< value_type > init)
aged_ordered_container(aged_ordered_container const &other)
value_type const & const_reference
beast::detail::aged_container_iterator<!IsMap, typename cont_type::iterator > iterator
void unlink_and_delete_element(element const *p)
aged_ordered_container(std::initializer_list< value_type > init, clock_type &clock, Compare const &comp)
const_iterator end() const
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)
const_iterator cbegin() const
const_iterator lower_bound(K const &k) const
typename std::conditional< IsMulti, typename boost::intrusive::make_multiset< element, boost::intrusive::constant_time_size< true >, boost::intrusive::compare< KeyValueCompare > >::type, typename boost::intrusive::make_set< element, boost::intrusive::constant_time_size< true >, boost::intrusive::compare< KeyValueCompare > >::type >::type cont_type
const_iterator upper_bound(K const &k) const
bool operator!=(aged_ordered_container< OtherIsMulti, OtherIsMap, Key, OtherT, OtherDuration, Compare, OtherAllocator > const &other) const
const_iterator iterator_to(value_type const &value) const
std::enable_if< maybe_propagate >::type swap_data(aged_ordered_container &other) noexcept
allocator_type get_allocator() const
aged_ordered_container()=delete
auto insert(value_type &&value) -> typename std::enable_if< maybe_multi &&!maybe_map, iterator >::type
auto insert(value_type const &value) -> typename std::enable_if<!maybe_multi, std::pair< iterator, bool > >::type
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)
std::enable_if< maybe_multi, iterator >::type insert(const_iterator, value_type const &value)
auto emplace(Args &&... args) -> typename std::enable_if< maybe_multi, iterator >::type
bool operator<(aged_ordered_container< OtherIsMulti, OtherIsMap, Key, OtherT, OtherDuration, Compare, OtherAllocator > const &other) const
key_compare key_comp() const
iterator lower_bound(K const &k)
typename clock_type::duration duration
auto insert(const_iterator hint, value_type &&value) -> typename std::enable_if<!maybe_multi, iterator >::type
element * new_element(Args &&... args)
void touch(beast::detail::aged_container_iterator< is_const, Iterator > pos, typename clock_type::time_point const &now)
auto erase(K const &k) -> size_type
void touch(beast::detail::aged_container_iterator< is_const, Iterator > pos)
class beast::detail::aged_ordered_container::chronological_t chronological
size_type size() const noexcept
size_type count(K const &k) const
aged_ordered_container(clock_type &clock, Allocator const &alloc)
void delete_element(element const *p)
aged_ordered_container(InputIt first, InputIt last, clock_type &clock, Compare const &comp)
size_type max_size() const noexcept
beast::detail::aged_container_iterator<!IsMap, typename cont_type::reverse_iterator > reverse_iterator
const_iterator begin() const
aged_ordered_container(InputIt first, InputIt last, clock_type &clock, Compare const &comp, Allocator const &alloc)
aged_ordered_container & operator=(aged_ordered_container &&other)
std::enable_if< maybe_multi, iterator >::type insert(const_iterator, value_type &&value)
beast::detail::aged_container_iterator< true, typename cont_type::iterator > const_iterator
bool operator>=(aged_ordered_container< OtherIsMulti, OtherIsMap, Key, OtherT, OtherDuration, Compare, OtherAllocator > const &other) const
abstract_clock< Clock > clock_type
typename boost::intrusive::make_list< element, boost::intrusive::constant_time_size< false > >::type list_type
iterator upper_bound(K const &k)
const_reverse_iterator crbegin() const
auto emplace_hint(const_iterator hint, 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
aged_ordered_container(InputIt first, InputIt last, clock_type &clock)
iterator find(K const &k)
typename std::conditional< IsMap, std::pair< Key const, T >, Key >::type value_type
auto emplace(Args &&... args) -> typename std::enable_if<!maybe_multi, std::pair< iterator, bool > >::type
std::conditional< IsMap, T, void * >::type & operator[](Key &&key)
const_reverse_iterator rend() const
static Key const & extract(value_type const &value)
bool empty() const noexcept
std::pair< const_iterator, const_iterator > equal_range(K const &k) const
iterator iterator_to(value_type &value)
typename clock_type::time_point time_point
T forward_as_tuple(T... args)
T lexicographical_compare(T... args)
int compare(SemanticVersion const &lhs, SemanticVersion const &rhs)
Compare two SemanticVersions against each other.
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_ordered_container::time_point time_point
typename aged_ordered_container::value_type value_type
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_boost_reverse_iterator()=default
is_boost_reverse_iterator()=default
is_aged_container()=default