[+] AuTupleCountOf_v
This commit is contained in:
parent
5205cf1785
commit
681581486e
@ -66,6 +66,9 @@ static auto AuTupleApply(F &&f, Tuple &&t)
|
||||
return AURORA_RUNTIME_APPLY(f, t);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline constexpr AuUInt AuTupleCountOf_v = AURORA_RUNTIME_TUPLE_SIZE<AuRemoveConst_t<AuRemoveReference_t<T>>>::value;
|
||||
|
||||
namespace __audetail
|
||||
{
|
||||
template <AuUInt Offset, class Tuple, AuUInt... Is>
|
||||
@ -78,13 +81,13 @@ namespace __audetail
|
||||
template <class... Ts>
|
||||
static auto AuTuplePopFront(const AuTuple<Ts...> &tuple)
|
||||
{
|
||||
return __audetail::AuTuplePopImpl<1>(tuple, AuMakeIndexSequence<AURORA_RUNTIME_TUPLE_SIZE<tuple>::value - 1>());
|
||||
return __audetail::AuTuplePopImpl<1>(tuple, AuMakeIndexSequence<AuTupleCountOf_v<decltype(tuple)> -1>());
|
||||
}
|
||||
|
||||
template <class... Ts>
|
||||
static auto AuTuplePopBack(const AuTuple<Ts...> &tuple)
|
||||
{
|
||||
return __audetail::AuTuplePopImpl<0>(tuple, AuMakeIndexSequence<AURORA_RUNTIME_TUPLE_SIZE<tuple>::value - 1>());
|
||||
return __audetail::AuTuplePopImpl<0>(tuple, AuMakeIndexSequence<AuTupleCountOf_v<decltype(tuple)> - 1>());
|
||||
}
|
||||
|
||||
template <class T, class... Ts>
|
||||
|
Loading…
Reference in New Issue
Block a user