diff --git a/Include/auROXTL/auHashUtils.hpp b/Include/auROXTL/auHashUtils.hpp index af5cbb7..d52c1b7 100644 --- a/Include/auROXTL/auHashUtils.hpp +++ b/Include/auROXTL/auHashUtils.hpp @@ -230,6 +230,20 @@ namespace AuHash AuHashCode(AuGet<1>(pair)); } }; + + template + struct hash> + { + constexpr AuUInt operator ()(const AuTuple &tuple) const + { + AuUInt uHashCode {}; + AuTupleForEach(tuple, [&](auto & a /*c++14 poggurs*/) + { + uHashCode ^= AuHashCode(a); + }); + return uHashCode; + } + }; } template diff --git a/Include/auROXTL/auTemplateMeta.hpp b/Include/auROXTL/auTemplateMeta.hpp index 4643c5b..6b687f2 100644 --- a/Include/auROXTL/auTemplateMeta.hpp +++ b/Include/auROXTL/auTemplateMeta.hpp @@ -40,8 +40,7 @@ template using AuToIterator_t = typename T::iterator; template -static AuToIterator_t AuToIterator(const T &a); // intended use case: screwing over nasty ass lines of `AuToIterator_t` or worse. - // example usage: `decltype(AuToIterator(myHashMap)) itr;` +static AuToIterator_t AuToIterator(const T &a); // intended use case: `decltype(AuToIterator(myHashMap)) itr;` template static AuToElementType_t AuToElementType(const T &a); diff --git a/Include/auROXTL/auTupleUtils.hpp b/Include/auROXTL/auTupleUtils.hpp index a872727..657d08f 100644 --- a/Include/auROXTL/auTupleUtils.hpp +++ b/Include/auROXTL/auTupleUtils.hpp @@ -36,6 +36,17 @@ #define AURORA_RUNTIME_APPLY std::apply #endif +template +struct AuIsTuple : AuFalseType +{ }; + +template +struct AuIsTuple> : AuTrueType +{ }; + +template +inline constexpr bool AuIsTuple_v = AuIsTuple::type::value; + template static auto AuMakePair(Args&&... args) {