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>
86 struct element : boost::intrusive::set_base_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>>,
87 boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>>
129 return Compare::operator()(lhs.first, rhs.first);
194 using list_type =
typename boost::intrusive::make_list<element, boost::intrusive::constant_time_size<false>>::type;
198 typename boost::intrusive::make_multiset<
200 boost::intrusive::constant_time_size<true>,
201 boost::intrusive::compare<KeyValueCompare>>::type,
202 typename boost::intrusive::
203 make_set<element, boost::intrusive::constant_time_size<true>, boost::intrusive::compare<KeyValueCompare>>::
275 compare() = std::move(other.compare());
276 alloc() = std::move(other.alloc());
320 template <
class... Args>
334 ElementAllocatorTraits::deallocate(a_.
get(), p, 1);
471 return list.iterator_to(*
reinterpret_cast<element*
>(
479 return list.iterator_to(*
reinterpret_cast<element const*
>(
511 template <
class InputIt>
514 template <
class InputIt>
517 template <
class InputIt>
520 template <
class InputIt>
541 Allocator
const& alloc);
580 bool maybe_multi = IsMulti,
581 bool maybe_map = IsMap,
588 bool maybe_multi = IsMulti,
589 bool maybe_map = IsMap,
592 at(K
const& k)
const;
595 bool maybe_multi = IsMulti,
596 bool maybe_map = IsMap,
602 bool maybe_multi = IsMulti,
603 bool maybe_map = IsMap,
736 template <
bool maybe_multi = IsMulti>
741 template <
bool maybe_multi = IsMulti>
746 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
751 template <
bool maybe_multi = IsMulti,
bool maybe_map = IsMap>
758 template <
bool maybe_multi = IsMulti>
763 template <
bool maybe_multi = IsMulti>
772 template <
bool maybe_multi = IsMulti>
777 template <
bool maybe_multi = IsMulti>
782 return insert(std::move(value));
786 template <
class P,
bool maybe_map = IsMap>
796 template <
class P,
bool maybe_map = IsMap>
805 template <
class InputIt>
809 for (; first != last; ++first)
820 template <
bool maybe_multi = IsMulti,
class... Args>
825 template <
bool maybe_multi = IsMulti,
class... Args>
830 template <
bool maybe_multi = IsMulti,
class... Args>
836 template <
bool maybe_multi = IsMulti,
class... Args>
845 template <bool is_const, class Iterator, class = std::enable_if_t<!is_boost_reverse_iterator<Iterator>::value>>
851 template <bool is_const, class Iterator, class = std::enable_if_t<!is_boost_reverse_iterator<Iterator>::value>>
867 template <bool is_const, class Iterator, class = std::enable_if_t<!is_boost_reverse_iterator<Iterator>::value>>
987 template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
993 template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
1002 template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
1012 template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
1018 return !(other < *
this);
1021 template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
1027 return other < *
this;
1030 template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
1036 return !(*
this < other);
1041 template <bool is_const, class Iterator, class = std::enable_if_t<!is_boost_reverse_iterator<Iterator>::value>>
1045 template <bool maybe_propagate = std::allocator_traits<Allocator>::propagate_on_container_swap::value>
1049 template <bool maybe_propagate = std::allocator_traits<Allocator>::propagate_on_container_swap::value>
1060template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1066template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1069 Compare
const& comp)
1070 : m_config(clock, comp), m_cont(comp)
1074template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1077 Allocator
const& alloc)
1078 : m_config(clock, alloc)
1082template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1085 Compare
const& comp,
1086 Allocator
const& alloc)
1087 : m_config(clock, comp, alloc), m_cont(comp)
1091template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1092template <
class InputIt>
1102template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1103template <
class InputIt>
1108 Compare
const& comp)
1109 : m_config(clock, comp), m_cont(comp)
1114template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1115template <
class InputIt>
1120 Allocator
const& alloc)
1121 : m_config(clock, alloc)
1126template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1127template <
class InputIt>
1132 Compare
const& comp,
1133 Allocator
const& alloc)
1134 : m_config(clock, comp, alloc), m_cont(comp)
1139template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1142 : m_config(other.m_config)
1143#if BOOST_VERSION >= 108000
1144 , m_cont(other.m_cont.get_comp())
1146 , m_cont(other.m_cont.comp())
1152template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1155 Allocator
const& alloc)
1156 : m_config(other.m_config, alloc)
1157#if BOOST_VERSION >= 108000
1158 , m_cont(other.m_cont.get_comp())
1160 , m_cont(other.m_cont.comp())
1166template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1169 : m_config(
std::move(other.m_config)), m_cont(
std::move(other.m_cont))
1174template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1177 Allocator
const& alloc)
1178 : m_config(
std::move(other.m_config), alloc)
1179#if BOOST_VERSION >= 108000
1180 , m_cont(
std::move(other.m_cont.get_comp()))
1182 , m_cont(
std::move(other.m_cont.comp()))
1186 insert(other.cbegin(), other.cend());
1190template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1199template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1203 Compare
const& comp)
1204 : m_config(clock, comp), m_cont(comp)
1209template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1213 Allocator
const& alloc)
1214 : m_config(clock, alloc)
1219template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1223 Compare
const& comp,
1224 Allocator
const& alloc)
1225 : m_config(clock, comp, alloc), m_cont(comp)
1230template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1236template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1244 this->m_config = other.m_config;
1245 insert(other.begin(), other.end());
1250template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1256 this->m_config = std::move(other.m_config);
1257 insert(other.begin(), other.end());
1262template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1274template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1275template <
class K,
bool maybe_multi,
bool maybe_map,
class>
1279 auto const iter(m_cont.find(k,
std::cref(m_config.key_compare())));
1280 if (iter == m_cont.end())
1282 return iter->value.second;
1285template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1286template <
class K,
bool maybe_multi,
bool maybe_map,
class>
1290 auto const iter(m_cont.find(k,
std::cref(m_config.key_compare())));
1291 if (iter == m_cont.end())
1293 return iter->value.second;
1296template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1297template <
bool maybe_multi,
bool maybe_map,
class>
1301 typename cont_type::insert_commit_data d;
1302 auto const result(m_cont.insert_check(key,
std::cref(m_config.key_compare()), d));
1306 m_cont.insert_commit(*p, d);
1307 chronological.list.push_back(*p);
1308 return p->
value.second;
1310 return result.first->value.second;
1313template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1314template <
bool maybe_multi,
bool maybe_map,
class>
1318 typename cont_type::insert_commit_data d;
1319 auto const result(m_cont.insert_check(key,
std::cref(m_config.key_compare()), d));
1324 m_cont.insert_commit(*p, d);
1325 chronological.list.push_back(*p);
1326 return p->
value.second;
1328 return result.first->value.second;
1333template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1337 for (
auto iter(chronological.list.begin()); iter != chronological.list.end();)
1338 delete_element(&*iter++);
1339 chronological.list.clear();
1344template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1345template <
bool maybe_multi>
1350 typename cont_type::insert_commit_data d;
1351 auto const result(m_cont.insert_check(extract(value),
std::cref(m_config.key_compare()), d));
1354 element*
const p(new_element(value));
1355 auto const iter(m_cont.insert_commit(*p, d));
1356 chronological.list.push_back(*p);
1363template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1364template <
bool maybe_multi>
1369 auto const before(m_cont.upper_bound(extract(value),
std::cref(m_config.key_compare())));
1370 element*
const p(new_element(value));
1371 chronological.list.push_back(*p);
1372 auto const iter(m_cont.insert_before(before, *p));
1373 return iterator(iter);
1377template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1378template <
bool maybe_multi,
bool maybe_map>
1383 typename cont_type::insert_commit_data d;
1384 auto const result(m_cont.insert_check(extract(value),
std::cref(m_config.key_compare()), d));
1387 element*
const p(new_element(std::move(value)));
1388 auto const iter(m_cont.insert_commit(*p, d));
1389 chronological.list.push_back(*p);
1396template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1397template <
bool maybe_multi,
bool maybe_map>
1402 auto const before(m_cont.upper_bound(extract(value),
std::cref(m_config.key_compare())));
1403 element*
const p(new_element(std::move(value)));
1404 chronological.list.push_back(*p);
1405 auto const iter(m_cont.insert_before(before, *p));
1406 return iterator(iter);
1412template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1413template <
bool maybe_multi>
1419 typename cont_type::insert_commit_data d;
1420 auto const result(m_cont.insert_check(hint.iterator(), extract(value),
std::cref(m_config.key_compare()), d));
1423 element*
const p(new_element(value));
1424 auto const iter(m_cont.insert_commit(*p, d));
1425 chronological.list.push_back(*p);
1432template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1433template <
bool maybe_multi>
1439 typename cont_type::insert_commit_data d;
1440 auto const result(m_cont.insert_check(hint.iterator(), extract(value),
std::cref(m_config.key_compare()), d));
1443 element*
const p(new_element(std::move(value)));
1444 auto const iter(m_cont.insert_commit(*p, d));
1445 chronological.list.push_back(*p);
1452template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1453template <
bool maybe_multi,
class... Args>
1461 typename cont_type::insert_commit_data d;
1462 auto const result(m_cont.insert_check(extract(p->
value),
std::cref(m_config.key_compare()), d));
1465 auto const iter(m_cont.insert_commit(*p, d));
1466 chronological.list.push_back(*p);
1474template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1475template <
bool maybe_multi,
class... Args>
1481 auto const before(m_cont.upper_bound(extract(p->value),
std::cref(m_config.key_compare())));
1482 chronological.list.push_back(*p);
1483 auto const iter(m_cont.insert_before(before, *p));
1484 return iterator(iter);
1488template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1489template <
bool maybe_multi,
class... Args>
1498 typename cont_type::insert_commit_data d;
1499 auto const result(m_cont.insert_check(hint.iterator(), extract(p->
value),
std::cref(m_config.key_compare()), d));
1502 auto const iter(m_cont.insert_commit(*p, d));
1503 chronological.list.push_back(*p);
1510template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1511template <
bool is_const,
class Iterator,
class>
1516 unlink_and_delete_element(&*((pos++).
iterator()));
1520template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1521template <
bool is_const,
class Iterator,
class>
1527 for (; first != last;)
1528 unlink_and_delete_element(&*((first++).
iterator()));
1533template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1538 auto iter(m_cont.find(k,
std::cref(m_config.key_compare())));
1539 if (iter == m_cont.end())
1545 bool const done(m_config(*p, extract(iter->value)));
1546 unlink_and_delete_element(p);
1554template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1559 std::swap(chronological, other.chronological);
1565template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1570 auto const now(clock().now());
1572 auto const range(equal_range(k));
1573 for (
auto iter : range)
1583template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1584template <
bool OtherIsMulti,
bool OtherIsMap,
class OtherT,
class OtherDuration,
class OtherAllocator>
1591 if (size() != other.
size())
1599 [&eq, &other](
value_type const& lhs,
typename Other::value_type
const& rhs) {
1600 return eq(extract(lhs), other.extract(rhs));
1606template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1607template <
bool is_const,
class Iterator,
class>
1615 chronological.list.erase(chronological.list.iterator_to(e));
1616 chronological.list.push_back(e);
1619template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1620template <
bool maybe_propagate>
1625 std::swap(m_config.key_compare(), other.m_config.key_compare());
1626 std::swap(m_config.alloc(), other.m_config.alloc());
1627 std::swap(m_config.clock, other.m_config.clock);
1630template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1631template <
bool maybe_propagate>
1636 std::swap(m_config.key_compare(), other.m_config.key_compare());
1637 std::swap(m_config.clock, other.m_config.clock);
1644template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1653template <
bool IsMulti,
bool IsMap,
class Key,
class T,
class Clock,
class Compare,
class Allocator>
1679 auto const expired(c.
clock().
now() - age);
1682 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)
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
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 boost::intrusive::make_list< element, boost::intrusive::constant_time_size< false > >::type list_type
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
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
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