refactor(typetraits): replaces template class type traits with concepts for TypeTraits/CompositeType.h

This commit is contained in:
2022-05-15 23:10:02 +08:00
parent 1dcd3dc3b3
commit 22fe906eda
10 changed files with 59 additions and 73 deletions

View File

@ -42,7 +42,7 @@ NAMESPACE_PRIVATE_BEGIN
template <typename T>
constexpr bool FunctionIsBound(const T& Func)
{
if constexpr (CPointer<T> || TIsMemberPointer<T>::Value || TIsTFunctionRef<T>::Value || TIsTFunction<T>::Value || TIsTUniqueFunction<T>::Value)
if constexpr (CPointer<T> || CMemberPointer<T> || TIsTFunctionRef<T>::Value || TIsTFunction<T>::Value || TIsTUniqueFunction<T>::Value)
{
return !!Func;
}
@ -171,7 +171,7 @@ protected:
Callable = [](StorageRef Storage, Types&&... Args) -> ResultType
{
using InvokeType = typename TConditional<
TIsReference<CVRef>::Value,
CReference<CVRef>,
typename TCopyCVRef<CVRef, CallableType>::Type,
typename TCopyCVRef<CVRef, CallableType>::Type&
>::Type;