refactor(*): make the template class concept indistinguishable from cv-qualified
This commit is contained in:
parent
9a3c957b38
commit
f96c000b9e
@ -501,7 +501,7 @@ template <CAnyCustomStorage StorageType> struct TIsTAny<TAny<StorageType>> : FTr
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T>
|
||||
concept CTAny = NAMESPACE_PRIVATE::TIsTAny<T>::Value;
|
||||
concept CTAny = NAMESPACE_PRIVATE::TIsTAny<TRemoveCV<T>>::Value;
|
||||
|
||||
using FAny = TAny<>;
|
||||
|
||||
|
@ -35,9 +35,9 @@ template <typename F> struct TIsTUniqueFunction<TUniqueFunction<F>> : FTrue { }
|
||||
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T> concept CTFunctionRef = NAMESPACE_PRIVATE::TIsTFunctionRef<T>::Value;
|
||||
template <typename T> concept CTFunction = NAMESPACE_PRIVATE::TIsTFunction<T>::Value;
|
||||
template <typename T> concept CTUniqueFunction = NAMESPACE_PRIVATE::TIsTUniqueFunction<T>::Value;
|
||||
template <typename T> concept CTFunctionRef = NAMESPACE_PRIVATE::TIsTFunctionRef<TRemoveCV<T>>::Value;
|
||||
template <typename T> concept CTFunction = NAMESPACE_PRIVATE::TIsTFunction<TRemoveCV<T>>::Value;
|
||||
template <typename T> concept CTUniqueFunction = NAMESPACE_PRIVATE::TIsTUniqueFunction<TRemoveCV<T>>::Value;
|
||||
|
||||
NAMESPACE_PRIVATE_BEGIN
|
||||
|
||||
|
@ -309,7 +309,7 @@ template <typename T> struct TIsTOptional<TOptional<T>> : FTrue { };
|
||||
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T> concept CTOptional = NAMESPACE_PRIVATE::TIsTOptional<T>::Value;
|
||||
template <typename T> concept CTOptional = NAMESPACE_PRIVATE::TIsTOptional<TRemoveCV<T>>::Value;
|
||||
|
||||
NAMESPACE_MODULE_END(Utility)
|
||||
NAMESPACE_MODULE_END(Redcraft)
|
||||
|
@ -116,7 +116,7 @@ template <typename T> struct TUnwrapRefDecayImpl { using Type = typename TUnwrap
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T>
|
||||
concept CTReferenceWrapper = NAMESPACE_PRIVATE::TIsTReferenceWrapperImpl<T>::Value;
|
||||
concept CTReferenceWrapper = NAMESPACE_PRIVATE::TIsTReferenceWrapperImpl<TRemoveCV<T>>::Value;
|
||||
|
||||
template <typename T>
|
||||
using TUnwrapReference = typename NAMESPACE_PRIVATE::TUnwrapReferenceImpl<T>::Type;
|
||||
|
@ -289,16 +289,16 @@ public:
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T>
|
||||
concept CTTuple = NAMESPACE_PRIVATE::TIsTTuple<T>::Value;
|
||||
concept CTTuple = NAMESPACE_PRIVATE::TIsTTuple<TRemoveCV<T>>::Value;
|
||||
|
||||
template <typename TupleType>
|
||||
inline constexpr size_t TTupleArity = NAMESPACE_PRIVATE::TTupleArityImpl<TupleType>::Value;
|
||||
template <CTTuple T>
|
||||
inline constexpr size_t TTupleArity = NAMESPACE_PRIVATE::TTupleArityImpl<T>::Value;
|
||||
|
||||
template <typename T, typename TupleType>
|
||||
inline constexpr size_t TTupleIndex = NAMESPACE_PRIVATE::TTupleIndexImpl<T, TupleType>::Value;
|
||||
template <typename T, CTTuple U>
|
||||
inline constexpr size_t TTupleIndex = NAMESPACE_PRIVATE::TTupleIndexImpl<T, U>::Value;
|
||||
|
||||
template <size_t I, typename TupleType>
|
||||
using TTupleElement = typename NAMESPACE_PRIVATE::TTupleElementImpl<I, TupleType>::Type;
|
||||
template <size_t I, CTTuple U>
|
||||
using TTupleElement = typename NAMESPACE_PRIVATE::TTupleElementImpl<I, U>::Type;
|
||||
|
||||
template <typename... Ts>
|
||||
class TTuple : public NAMESPACE_PRIVATE::TTupleImpl<TIndexSequenceFor<Ts...>, Ts...>
|
||||
@ -607,10 +607,10 @@ constexpr TCommonComparisonCategory<TSynthThreeWayResult<LHSTypes, RHSTypes>...>
|
||||
return NAMESPACE_PRIVATE::TTupleThreeWay<R, TMakeIndexSequence<sizeof...(LHSTypes)>>::F(LHS, RHS);
|
||||
}
|
||||
|
||||
template <typename F> requires (CInvocable<F>)
|
||||
template <typename F>
|
||||
constexpr void VisitTuple(F&& Func) { }
|
||||
|
||||
template <typename F, typename FirstTupleType, typename... TupleTypes>
|
||||
template <typename F, typename FirstTupleType, typename... TupleTypes> requires (CTTuple<TRemoveReference<FirstTupleType>> && (true && ... && CTTuple<TRemoveReference<TupleTypes>>))
|
||||
constexpr void VisitTuple(F&& Func, FirstTupleType&& FirstTuple, TupleTypes&&... Tuples)
|
||||
{
|
||||
NAMESPACE_PRIVATE::TTupleVisitImpl<TMakeIndexSequence<TTupleArity<TRemoveReference<FirstTupleType>>>>
|
||||
|
@ -137,16 +137,16 @@ struct TVariantSelectedType<T>
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T>
|
||||
concept CTVariant = NAMESPACE_PRIVATE::TIsTVariant<T>::Value;
|
||||
concept CTVariant = NAMESPACE_PRIVATE::TIsTVariant<TRemoveCV<T>>::Value;
|
||||
|
||||
template <typename VariantType>
|
||||
inline constexpr size_t TVariantNum = NAMESPACE_PRIVATE::TVariantNumImpl<VariantType>::Value;
|
||||
template <CTVariant T>
|
||||
inline constexpr size_t TVariantNum = NAMESPACE_PRIVATE::TVariantNumImpl<T>::Value;
|
||||
|
||||
template <typename T, typename VariantType>
|
||||
inline constexpr size_t TVariantIndex = NAMESPACE_PRIVATE::TVariantIndexImpl<T, VariantType>::Value;
|
||||
template <typename T, CTVariant U>
|
||||
inline constexpr size_t TVariantIndex = NAMESPACE_PRIVATE::TVariantIndexImpl<T, U>::Value;
|
||||
|
||||
template <size_t I, typename VariantType>
|
||||
using TVariantAlternative = typename NAMESPACE_PRIVATE::TVariantAlternativeImpl<I, VariantType>::Type;
|
||||
template <size_t I, CTVariant U>
|
||||
using TVariantAlternative = typename NAMESPACE_PRIVATE::TVariantAlternativeImpl<I, U>::Type;
|
||||
|
||||
template <typename... Ts> requires (sizeof...(Ts) > 0 && (true && ... && CDestructible<Ts>))
|
||||
class TVariant
|
||||
|
@ -17,8 +17,8 @@ template <size_t I> struct TIsTInPlaceIndex<TInPlaceIndex<I>> : FTrue { };
|
||||
|
||||
NAMESPACE_PRIVATE_END
|
||||
|
||||
template <typename T> concept CTInPlaceType = NAMESPACE_PRIVATE::TIsTInPlaceType<T>::Value;
|
||||
template <typename T> concept CTInPlaceIndex = NAMESPACE_PRIVATE::TIsTInPlaceIndex<T>::Value;
|
||||
template <typename T> concept CTInPlaceType = NAMESPACE_PRIVATE::TIsTInPlaceType<TRemoveCV<T>>::Value;
|
||||
template <typename T> concept CTInPlaceIndex = NAMESPACE_PRIVATE::TIsTInPlaceIndex<TRemoveCV<T>>::Value;
|
||||
|
||||
NAMESPACE_MODULE_END(Utility)
|
||||
NAMESPACE_MODULE_END(Redcraft)
|
||||
|
Loading…
Reference in New Issue
Block a user