diff --git a/libc/utils/CPP/TypeTraits.h b/libc/utils/CPP/TypeTraits.h --- a/libc/utils/CPP/TypeTraits.h +++ b/libc/utils/CPP/TypeTraits.h @@ -26,27 +26,11 @@ static constexpr bool Value = false; }; -template struct IsIntegral : public FalseValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; -template <> struct IsIntegral : public TrueValue {}; - -template struct IsPointerType : public FalseValue {}; -template struct IsPointerType : public TrueValue {}; +template struct TypeIdentity { typedef T Type; }; template struct IsSame : public FalseValue {}; template struct IsSame : public TrueValue {}; -template struct TypeIdentity { typedef T Type; }; template struct RemoveCV : public TypeIdentity {}; template struct RemoveCV : public TypeIdentity {}; @@ -56,6 +40,25 @@ template using RemoveCVType = typename RemoveCV::Type; +template struct IsIntegral { + static constexpr bool Value = + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value || + IsSame>::Value; +}; + +template struct IsPointerType : public FalseValue {}; +template struct IsPointerType : public TrueValue {}; + template struct IsFloatingPointType { static constexpr bool Value = IsSame>::Value || IsSame>::Value ||