1#include <xrpl/beast/clock/manual_clock.h> 
    2#include <xrpl/beast/container/aged_map.h> 
    3#include <xrpl/beast/container/aged_multimap.h> 
    4#include <xrpl/beast/container/aged_multiset.h> 
    5#include <xrpl/beast/container/aged_set.h> 
    6#include <xrpl/beast/container/aged_unordered_map.h> 
    7#include <xrpl/beast/container/aged_unordered_multimap.h> 
    8#include <xrpl/beast/container/aged_unordered_multiset.h> 
    9#include <xrpl/beast/container/aged_unordered_set.h> 
   10#include <xrpl/beast/unit_test.h> 
   15#ifndef BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 
   17#define BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 0 
   19#define BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 1 
   23#ifndef BEAST_CONTAINER_EXTRACT_NOREF 
   25#define BEAST_CONTAINER_EXTRACT_NOREF 1 
   27#define BEAST_CONTAINER_EXTRACT_NOREF 1 
   88            return m_eq(lhs, rhs);
 
 
 
  131            return !(*
this == o);
 
 
  137            return static_cast<T*
>(::operator 
new(n * 
sizeof(T)));
 
 
  143            ::operator 
delete(p);
 
 
  146#if !BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 
 
  159    template <
class Base, 
bool IsUnordered>
 
  175    template <
class Base>
 
  193    template <
class Base, 
bool IsMulti>
 
  206    template <
class Base>
 
  219    template <
class Base, 
bool IsMap>
 
  227        static typename Base::Key 
const&
 
 
  255    template <
class Base>
 
  263        static typename Base::Key 
const&
 
 
  292    template <
class Base, 
bool IsUnordered = Base::is_unordered::value>
 
  299            Base::is_multi::value,
 
  303            typename Base::Clock,
 
 
  309    template <
class Base>
 
  317            Base::is_multi::value,
 
  321            typename Base::Clock,
 
 
  336    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  339              MaybeMulti<MaybeMap<TestTraitsBase, IsMap>, IsMulti>,
 
 
  365    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  367                        ContType<TestTraitsHelper<IsUnordered, IsMulti, IsMap>>
 
 
  371    template <
class Cont>
 
  379    template <
class Traits>
 
  384            typename Traits::Value 
const& lhs,
 
  385            typename Traits::Value 
const& rhs)
 
  387            return Traits::extract(lhs) == Traits::extract(rhs);
 
 
 
  391    template <
class Cont>
 
  400    template <
class Container, 
class Values>
 
  402        Container::is_map::value && !Container::is_multi::value>::type
 
  405    template <
class Container, 
class Values>
 
  407        !(Container::is_map::value && !Container::is_multi::value)>::type
 
  413    template <
class C, 
class Values>
 
  418    template <
class C, 
class Values>
 
  425    template <
class C, 
class Values>
 
  429    template <
class Cont, 
class Values>
 
  433    template <
class Cont>
 
  440    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  445    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  450    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  455    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  460    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  465    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  471    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  477    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  482    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  486    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  494    template <
class Container, 
class Values>
 
  498    template <
class Container, 
class Values>
 
  502    template <
class Container, 
class Values>
 
  506    template <
class Container, 
class Values>
 
  510    template <
class Container, 
class Values>
 
  514    template <
class Container, 
class Values>
 
  518    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  524    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  531    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  535    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  544    template <
class Container, 
class Values>
 
  548    template <
class Iter>
 
  554    template <
class Container, 
class Iter>
 
  556    doElementErase(Container& c, Iter 
const beginItr, Iter 
const endItr);
 
  558    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  564    template <
class Container, 
class BeginEndSrc>
 
  566    doRangeErase(Container& c, BeginEndSrc 
const& beginEndSrc);
 
  568    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  575    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  579    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  588    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  593    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  599    template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  603    template <
bool IsUnordered, 
bool IsMulti>
 
  607    template <
bool IsUnordered>
 
 
  616template <
class Container, 
class Values>
 
  618    Container::is_map::value && !Container::is_multi::value>::type
 
  625        BEAST_EXPECT(c.empty());
 
  626        BEAST_EXPECT(c.size() == 0);
 
  633        for (
auto const& e : v)
 
  635        for (
auto const& e : v)
 
  636            BEAST_EXPECT(c.operator[](e.first) == e.second);
 
  640        fail(
"caught exception");
 
 
  645template <
class C, 
class Values>
 
  654        Cont::is_unordered::value,
 
  655        Cont::is_multi::value,
 
  656        Cont::is_map::value>;
 
  657    using size_type = 
typename Cont::size_type;
 
  658    auto const hash(c.hash_function());
 
  659    auto const key_eq(c.key_eq());
 
  660    for (size_type i(0); i < c.bucket_count(); ++i)
 
  662        auto const last(c.end(i));
 
  663        for (
auto iter(c.begin(i)); iter != last; ++iter)
 
  668                [iter](
typename Values::value_type 
const& e) {
 
  669                    return Traits::extract(*iter) == Traits::extract(e);
 
  671            BEAST_EXPECT(match != v.end());
 
  673                key_eq(Traits::extract(*iter), Traits::extract(*match)));
 
  675                hash(Traits::extract(*iter)) == hash(Traits::extract(*match)));
 
 
  680template <
class C, 
class Values>
 
  687    using size_type = 
typename Cont::size_type;
 
  689    BEAST_EXPECT(c.size() == v.size());
 
  690    BEAST_EXPECT(size_type(
std::distance(c.begin(), c.end())) == v.size());
 
  691    BEAST_EXPECT(size_type(
std::distance(c.cbegin(), c.cend())) == v.size());
 
  694            c.chronological.begin(), c.chronological.end())) == v.size());
 
  697            c.chronological.cbegin(), c.chronological.cend())) == v.size());
 
  700            c.chronological.rbegin(), c.chronological.rend())) == v.size());
 
  703            c.chronological.crbegin(), c.chronological.crend())) == v.size());
 
 
  708template <
class Cont, 
class Values>
 
  722        Cont::is_unordered::value,
 
  723        Cont::is_multi::value,
 
  724        Cont::is_map::value>;
 
  725    using Values = 
typename Traits::Values;
 
 
  736template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  741    using Comp = 
typename Traits::Comp;
 
  742    using Alloc = 
typename Traits::Alloc;
 
  743    using MyComp = 
typename Traits::MyComp;
 
  744    using MyAlloc = 
typename Traits::MyAlloc;
 
  745    typename Traits::ManualClock clock;
 
  751        typename Traits::template Cont<Comp, Alloc> c(clock);
 
  756        typename Traits::template Cont<MyComp, Alloc> c(clock, MyComp(1));
 
  761        typename Traits::template Cont<Comp, MyAlloc> c(clock, MyAlloc(1));
 
  766        typename Traits::template Cont<MyComp, MyAlloc> c(
 
  767            clock, MyComp(1), MyAlloc(1));
 
 
  773template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  777    using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
 
  778    using Hash = 
typename Traits::Hash;
 
  779    using Equal = 
typename Traits::Equal;
 
  780    using Alloc = 
typename Traits::Alloc;
 
  781    using MyHash = 
typename Traits::MyHash;
 
  782    using MyEqual = 
typename Traits::MyEqual;
 
  783    using MyAlloc = 
typename Traits::MyAlloc;
 
  784    typename Traits::ManualClock clock;
 
  789        typename Traits::template Cont<Hash, Equal, Alloc> c(clock);
 
  794        typename Traits::template Cont<MyHash, Equal, Alloc> c(
 
  800        typename Traits::template Cont<Hash, MyEqual, Alloc> c(
 
  806        typename Traits::template Cont<Hash, Equal, MyAlloc> c(
 
  812        typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
 
  813            clock, MyHash(1), MyEqual(1));
 
  818        typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
 
  819            clock, MyHash(1), MyAlloc(1));
 
  824        typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
 
  825            clock, MyEqual(1), MyAlloc(1));
 
  830        typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
 
  831            clock, MyHash(1), MyEqual(1), MyAlloc(1));
 
  837template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  842    using Comp = 
typename Traits::Comp;
 
  843    using Alloc = 
typename Traits::Alloc;
 
  844    using MyComp = 
typename Traits::MyComp;
 
  845    using MyAlloc = 
typename Traits::MyAlloc;
 
  846    typename Traits::ManualClock clock;
 
  847    auto const v(Traits::values());
 
  853        typename Traits::template Cont<Comp, Alloc> c(
 
  854            v.begin(), v.end(), clock);
 
  859        typename Traits::template Cont<MyComp, Alloc> c(
 
  860            v.begin(), v.end(), clock, MyComp(1));
 
  865        typename Traits::template Cont<Comp, MyAlloc> c(
 
  866            v.begin(), v.end(), clock, MyAlloc(1));
 
  871        typename Traits::template Cont<MyComp, MyAlloc> c(
 
  872            v.begin(), v.end(), clock, MyComp(1), MyAlloc(1));
 
  879        typename Traits::template Cont<Comp, Alloc> c1(
 
  880            v.begin(), v.end(), clock);
 
  881        typename Traits::template Cont<Comp, Alloc> c2(clock);
 
 
  888template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  892    using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
 
  893    using Hash = 
typename Traits::Hash;
 
  894    using Equal = 
typename Traits::Equal;
 
  895    using Alloc = 
typename Traits::Alloc;
 
  896    using MyHash = 
typename Traits::MyHash;
 
  897    using MyEqual = 
typename Traits::MyEqual;
 
  898    using MyAlloc = 
typename Traits::MyAlloc;
 
  899    typename Traits::ManualClock clock;
 
  900    auto const v(Traits::values());
 
  906        typename Traits::template Cont<Hash, Equal, Alloc> c(
 
  907            v.begin(), v.end(), clock);
 
  912        typename Traits::template Cont<MyHash, Equal, Alloc> c(
 
  913            v.begin(), v.end(), clock, MyHash(1));
 
  918        typename Traits::template Cont<Hash, MyEqual, Alloc> c(
 
  919            v.begin(), v.end(), clock, MyEqual(1));
 
  924        typename Traits::template Cont<Hash, Equal, MyAlloc> c(
 
  925            v.begin(), v.end(), clock, MyAlloc(1));
 
  930        typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
 
  931            v.begin(), v.end(), clock, MyHash(1), MyEqual(1));
 
  936        typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
 
  937            v.begin(), v.end(), clock, MyHash(1), MyAlloc(1));
 
  942        typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
 
  943            v.begin(), v.end(), clock, MyEqual(1), MyAlloc(1));
 
  948        typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
 
  949            v.begin(), v.end(), clock, MyHash(1), MyEqual(1), MyAlloc(1));
 
  955template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  960    typename Traits::ManualClock clock;
 
 
  971template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  975    using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
 
  976    typename Traits::ManualClock clock;
 
  991template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
  996    using Alloc = 
typename Traits::Alloc;
 
  997    typename Traits::ManualClock clock;
 
  998    auto const v(Traits::values());
 
 1006        typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1007        typename Traits::template Cont<> c2(c);
 
 1010        BEAST_EXPECT(c == c2);
 
 1015        typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1016        typename Traits::template Cont<> c2(c, Alloc());
 
 1019        BEAST_EXPECT(c == c2);
 
 1024        typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1025        typename Traits::template Cont<> c2(clock);
 
 1029        BEAST_EXPECT(c == c2);
 
 1036        typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1037        typename Traits::template Cont<> c2(std::move(c));
 
 1042        typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1043        typename Traits::template Cont<> c2(std::move(c), Alloc());
 
 1048        typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1049        typename Traits::template Cont<> c2(clock);
 
 
 1061template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1066    typename Traits::ManualClock clock;
 
 1067    auto const v(Traits::values());
 
 1072    typename Traits::template Cont<> c{clock};
 
 1074    using iterator = 
decltype(c.begin());
 
 1075    using const_iterator = 
decltype(c.cbegin());
 
 1078    iterator nnIt_0{c.begin()};
 
 1079    iterator nnIt_1{nnIt_0};
 
 1080    BEAST_EXPECT(nnIt_0 == nnIt_1);
 
 1083    BEAST_EXPECT(nnIt_1 == nnIt_2);
 
 1087    const_iterator ccIt_0{c.cbegin()};
 
 1088    const_iterator ccIt_1{ccIt_0};
 
 1089    BEAST_EXPECT(ccIt_0 == ccIt_1);
 
 1090    const_iterator ccIt_2;
 
 1092    BEAST_EXPECT(ccIt_1 == ccIt_2);
 
 1095    BEAST_EXPECT(nnIt_0 == ccIt_0);
 
 1096    BEAST_EXPECT(ccIt_1 == nnIt_1);
 
 1099    const_iterator ncIt_3{c.begin()};
 
 1100    const_iterator ncIt_4{nnIt_0};
 
 1101    BEAST_EXPECT(ncIt_3 == ncIt_4);
 
 1102    const_iterator ncIt_5;
 
 1104    BEAST_EXPECT(ncIt_5 == ncIt_4);
 
 
 1117template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1122    typename Traits::ManualClock clock;
 
 1123    auto const v(Traits::values());
 
 1128    typename Traits::template Cont<> c{clock};
 
 1130    using iterator = 
decltype(c.begin());
 
 1131    using reverse_iterator = 
decltype(c.rbegin());
 
 1132    using const_reverse_iterator = 
decltype(c.crbegin());
 
 1143    reverse_iterator rNrNit_0{c.rbegin()};
 
 1144    reverse_iterator rNrNit_1{rNrNit_0};
 
 1145    BEAST_EXPECT(rNrNit_0 == rNrNit_1);
 
 1146    reverse_iterator xXrNit_2;
 
 1147    xXrNit_2 = rNrNit_1;
 
 1148    BEAST_EXPECT(rNrNit_1 == xXrNit_2);
 
 1152    const_reverse_iterator rCrCit_0{c.crbegin()};
 
 1153    const_reverse_iterator rCrCit_1{rCrCit_0};
 
 1154    BEAST_EXPECT(rCrCit_0 == rCrCit_1);
 
 1155    const_reverse_iterator xXrCit_2;
 
 1156    xXrCit_2 = rCrCit_1;
 
 1157    BEAST_EXPECT(rCrCit_1 == xXrCit_2);
 
 1160    BEAST_EXPECT(rNrNit_0 == rCrCit_0);
 
 1161    BEAST_EXPECT(rCrCit_1 == rNrNit_1);
 
 1165    const_reverse_iterator rNrCit_0{c.rbegin()};
 
 1166    const_reverse_iterator rNrCit_1{rNrNit_0};
 
 1167    BEAST_EXPECT(rNrCit_0 == rNrCit_1);
 
 1168    xXrCit_2 = rNrNit_1;
 
 1169    BEAST_EXPECT(rNrCit_1 == xXrCit_2);
 
 1177    reverse_iterator fNrNit_0{c.begin()};
 
 1178    const_reverse_iterator fNrCit_0{c.begin()};
 
 1179    BEAST_EXPECT(fNrNit_0 == fNrCit_0);
 
 1180    const_reverse_iterator fCrCit_0{c.cbegin()};
 
 1181    BEAST_EXPECT(fNrCit_0 == fCrCit_0);
 
 
 1202template <
class Container, 
class Values>
 
 1208    for (
auto const& e : v)
 
 
 1213template <
class Container, 
class Values>
 
 1221        c.insert(std::move(e));
 
 
 1225template <
class Container, 
class Values>
 
 1231    for (
auto const& e : v)
 
 1232        c.insert(c.cend(), e);
 
 
 1236template <
class Container, 
class Values>
 
 1244        c.insert(c.cend(), std::move(e));
 
 
 1248template <
class Container, 
class Values>
 
 1254    for (
auto const& e : v)
 
 
 1259template <
class Container, 
class Values>
 
 1265    for (
auto const& e : v)
 
 1266        c.emplace_hint(c.cend(), e);
 
 
 1270template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1275    typename Traits::ManualClock clock;
 
 1276    auto const v(Traits::values());
 
 1283        typename Traits::template Cont<> c(clock);
 
 1288        typename Traits::template Cont<> c(clock);
 
 1293        typename Traits::template Cont<> c(clock);
 
 1298        typename Traits::template Cont<> c(clock);
 
 1303        typename Traits::template Cont<> c(clock);
 
 1308        typename Traits::template Cont<> c(clock);
 
 1313        typename Traits::template Cont<> c(clock);
 
 1318        typename Traits::template Cont<> c(clock);
 
 
 1329template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1334    typename Traits::ManualClock clock;
 
 1335    auto const v(Traits::values());
 
 1340    typename Traits::template Cont<> c(v.begin(), v.end(), clock);
 
 1343        c.chronological.cbegin(),
 
 1344        c.chronological.cend(),
 
 1350    for (
auto iter(v.crbegin()); iter != v.crend(); ++iter)
 
 1352        using iterator = 
typename decltype(c)::iterator;
 
 1353        iterator found(c.find(Traits::extract(*iter)));
 
 1355        BEAST_EXPECT(found != c.cend());
 
 1356        if (found == c.cend())
 
 1362        c.chronological.cbegin(),
 
 1363        c.chronological.cend(),
 
 1369    for (
auto iter(v.cbegin()); iter != v.cend(); ++iter)
 
 1371        using const_iterator = 
typename decltype(c)::const_iterator;
 
 1372        const_iterator found(c.find(Traits::extract(*iter)));
 
 1374        BEAST_EXPECT(found != c.cend());
 
 1375        if (found == c.cend())
 
 1381        c.chronological.cbegin(),
 
 1382        c.chronological.cend(),
 
 
 1402template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1407    typename Traits::ManualClock clock;
 
 1408    auto v(Traits::values());
 
 1415        typename Traits::template Cont<> c(clock);
 
 1417            c[e.first] = e.second;
 
 1423        typename Traits::template Cont<> c(clock);
 
 1425            c[std::move(e.first)] = e.second;
 
 
 1436template <
class Container, 
class Values>
 
 1440    Values 
const& values)
 
 1448    ManualClock& clk(
dynamic_cast<ManualClock&
>(c.clock()));
 
 
 1464template <
class Iter>
 
 1470    if (beginIter == endIter)
 
 1472        fail(
"Internal test failure. Cannot advance beginIter");
 
 1477    Iter nextToEnd = beginIter;
 
 1480        nextToEnd = beginIter++;
 
 1481    } 
while (beginIter != endIter);
 
 
 1498template <
class Container, 
class Iter>
 
 1502    Iter 
const beginItr,
 
 1506    size_t count = c.size();
 
 1507    while (it != endItr)
 
 1515            fail(
"Unexpected returned iterator from element erase");
 
 1520        if (count != c.size())
 
 1522            fail(
"Failed to erase element");
 
 1530                fail(
"Erase of last element didn't produce end");
 
 
 1544template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1554    typename Traits::ManualClock clock;
 
 1555    typename Traits::template Cont<> c{clock};
 
 1560        auto tempContainer(c);
 
 1562                tempContainer, tempContainer.cbegin(), tempContainer.cend()))
 
 1565        BEAST_EXPECT(tempContainer.empty());
 
 1570        auto tempContainer(c);
 
 1571        auto& chron(tempContainer.chronological);
 
 1575        BEAST_EXPECT(tempContainer.empty());
 
 1580        auto tempContainer(c);
 
 1581        BEAST_EXPECT(tempContainer.size() > 2);
 
 1584                ++tempContainer.begin(),
 
 1588        BEAST_EXPECT(tempContainer.size() == 2);
 
 1593        auto tempContainer(c);
 
 1594        BEAST_EXPECT(tempContainer.size() > 2);
 
 1595        auto& chron(tempContainer.chronological);
 
 1602        BEAST_EXPECT(tempContainer.size() == 2);
 
 1606        auto tempContainer(c);
 
 1607        BEAST_EXPECT(tempContainer.size() > 4);
 
 
 1632template <
class Container, 
class BeginEndSrc>
 
 1636    BeginEndSrc 
const& beginEndSrc)
 
 1638    BEAST_EXPECT(c.size() > 2);
 
 1639    auto itBeginPlusOne(beginEndSrc.begin());
 
 1640    auto const valueFront = *itBeginPlusOne;
 
 1644    auto itBack(
nextToEndIter(itBeginPlusOne, beginEndSrc.end()));
 
 1645    auto const valueBack = *itBack;
 
 1648    auto const retIter = c.erase(itBeginPlusOne, itBack);
 
 1650    BEAST_EXPECT(c.size() == 2);
 
 1651    BEAST_EXPECT(valueFront == *(beginEndSrc.begin()));
 
 1652    BEAST_EXPECT(valueBack == *(++beginEndSrc.begin()));
 
 1653    BEAST_EXPECT(retIter == (++beginEndSrc.begin()));
 
 
 1662template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1672    typename Traits::ManualClock clock;
 
 1673    typename Traits::template Cont<> c{clock};
 
 1678        auto tempContainer(c);
 
 1682        auto tempContainer(c);
 
 1683        doRangeErase(tempContainer, tempContainer.chronological);
 
 
 1694template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1699    typename Traits::ManualClock clock;
 
 1700    auto const v(Traits::values());
 
 1705    typename Traits::template Cont<> c1(v.begin(), v.end(), clock);
 
 1707    typename Traits::template Cont<> c2(v.begin(), v.end(), clock);
 
 1708    c2.erase(c2.cbegin());
 
 
 1725template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1730    typename Traits::ManualClock clock;
 
 1735    typename Traits::template Cont<> c(clock);
 
 
 1743template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1747    using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
 
 1748    typename Traits::ManualClock clock;
 
 1753    typename Traits::template Cont<> c(clock);
 
 1766template <
bool IsUnordered, 
bool IsMulti, 
bool IsMap>
 
 1770    testConstructEmpty<IsUnordered, IsMulti, IsMap>();
 
 1771    testConstructRange<IsUnordered, IsMulti, IsMap>();
 
 1772    testConstructInitList<IsUnordered, IsMulti, IsMap>();
 
 1773    testCopyMove<IsUnordered, IsMulti, IsMap>();
 
 1774    testIterator<IsUnordered, IsMulti, IsMap>();
 
 1775    testReverseIterator<IsUnordered, IsMulti, IsMap>();
 
 1776    testModifiers<IsUnordered, IsMulti, IsMap>();
 
 1777    testChronological<IsUnordered, IsMulti, IsMap>();
 
 1778    testArrayCreate<IsUnordered, IsMulti, IsMap>();
 
 1779    testElementErase<IsUnordered, IsMulti, IsMap>();
 
 1780    testRangeErase<IsUnordered, IsMulti, IsMap>();
 
 1781    testCompare<IsUnordered, IsMulti, IsMap>();
 
 1782    testObservers<IsUnordered, IsMulti, IsMap>();
 
 
 1799        "bad alias: aged_set");
 
 1805        "bad alias: aged_multiset");
 
 1811        "bad alias: aged_map");
 
 1817        "bad alias: aged_multimap");
 
 1823        "bad alias: aged_unordered_set");
 
 1829        "bad alias: aged_unordered_multiset");
 
 1835        "bad alias: aged_unordered_map");
 
 1841        "bad alias: aged_unordered_multimap");
 
 1846        testMaybeUnorderedMultiMap<false, false, false>();
 
 
 
 1856        testMaybeUnorderedMultiMap<false, false, true>();
 
 
 
 1866        testMaybeUnorderedMultiMap<false, true, false>();
 
 
 
 1876        testMaybeUnorderedMultiMap<false, true, true>();
 
 
 
 1886        testMaybeUnorderedMultiMap<true, false, false>();
 
 
 
 1896        testMaybeUnorderedMultiMap<true, false, true>();
 
 
 
 1906        testMaybeUnorderedMultiMap<true, true, false>();
 
 
 
 1916        testMaybeUnorderedMultiMap<true, true, true>();
 
 
 
std::size_t operator()(T const &t) const
 
static std::string name_map_part()
 
static Base::Key const & extract(Value const &value)
 
static std::string name_map_part()
 
static Base::Key const & extract(Value const &value)
 
std::vector< Value > Values
 
static std::string name_multi_part()
 
static std::string name_multi_part()
 
static std::string name_ordered_part()
 
static std::string name_ordered_part()
 
std::enable_if< IsMap &&!IsMulti >::type testArrayCreate()
 
std::enable_if<!std::remove_reference< C >::type::is_unordered::value >::type checkUnorderedContentsRefRef(C &&, Values const &)
 
void checkInsertHintMove(Container &c, Values const &v)
 
void checkInsertCopy(Container &c, Values const &v)
 
std::enable_if<!IsUnordered >::type testReverseIterator()
 
std::enable_if<!(Container::is_map::value &&!Container::is_multi::value)>::type checkMapContents(Container, Values const &)
 
void checkInsertHintCopy(Container &c, Values const &v)
 
void checkContentsRefRef(C &&c, Values const &v)
 
void checkEmplace(Container &c, Values const &v)
 
static std::vector< typename Cont::value_type > make_list(Cont const &c)
 
std::enable_if< IsUnordered >::type testReverseIterator()
 
std::enable_if<!IsUnordered >::type testCompare()
 
std::enable_if< Container::is_map::value &&!Container::is_multi::value >::type checkMapContents(Container &c, Values const &v)
 
static std::string name(Cont const &)
 
std::enable_if<!IsUnordered >::type testConstructRange()
 
void testMaybeUnorderedMulti()
 
bool doElementErase(Container &c, Iter const beginItr, Iter const endItr)
 
std::enable_if< IsUnordered >::type testCompare()
 
std::enable_if<!IsUnordered >::type testObservers()
 
Iter nextToEndIter(Iter const beginIter, Iter const endItr)
 
void testMaybeUnorderedMultiMap()
 
std::enable_if<!IsUnordered >::type testConstructEmpty()
 
void reverseFillAgedContainer(Container &c, Values const &v)
 
std::enable_if< std::remove_reference< C >::type::is_unordered::value >::type checkUnorderedContentsRefRef(C &&c, Values const &v)
 
std::enable_if<!IsUnordered >::type testConstructInitList()
 
std::enable_if<!(IsMap &&!IsMulti)>::type testArrayCreate()
 
void testMaybeUnordered()
 
void checkContents(Cont &c, Values const &v)
 
void doRangeErase(Container &c, BeginEndSrc const &beginEndSrc)
 
void checkEmplaceHint(Container &c, Values const &v)
 
void checkInsertMove(Container &c, Values const &v)
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
void run() override
Runs the suite.
 
Associative container where each element is also indexed by time.
 
Associative container where each element is also indexed by time.
 
Manual clock implementation.
 
void pass()
Record a successful test condition.
 
bool unexpected(Condition shouldBeFalse, String const &reason)
 
testcase_t testcase
Memberspace for declaring test cases.
 
bool expect(Condition const &shouldBeTrue)
Evaluate a test condition.
 
void fail(String const &reason, char const *file, int line)
Record a failure.
 
T * allocate(std::size_t n, T const *=0)
 
AllocT(AllocT< U > const &)
 
void deallocate(T *p, std::size_t)
 
bool operator==(AllocT< U > const &) const
 
bool operator!=(AllocT< U > const &o) const
 
AllocT(AllocT const &)=default
 
bool operator()(T const &lhs, T const &rhs) const
 
bool operator()(T const &lhs, T const &rhs) const
 
manual_clock< Clock > ManualClock
 
static std::string name()
 
bool operator()(typename Traits::Value const &lhs, typename Traits::Value const &rhs)