aboutsummaryrefslogtreecommitdiff
path: root/libc/utils/CPP/TypeTraits.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/utils/CPP/TypeTraits.h')
-rw-r--r--libc/utils/CPP/TypeTraits.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/utils/CPP/TypeTraits.h b/libc/utils/CPP/TypeTraits.h
index 9b121c0..1f2c85a 100644
--- a/libc/utils/CPP/TypeTraits.h
+++ b/libc/utils/CPP/TypeTraits.h
@@ -49,7 +49,8 @@ template <typename Type> struct IsIntegral {
IsSameV<unsigned short, TypeNoCV> || IsSameV<int, TypeNoCV> ||
IsSameV<unsigned int, TypeNoCV> || IsSameV<long, TypeNoCV> ||
IsSameV<unsigned long, TypeNoCV> || IsSameV<long long, TypeNoCV> ||
- IsSameV<unsigned long long, TypeNoCV> || IsSameV<bool, TypeNoCV>;
+ IsSameV<unsigned long long, TypeNoCV> || IsSameV<bool, TypeNoCV> ||
+ IsSameV<__uint128_t, TypeNoCV>;
};
template <typename T> struct IsPointerTypeNoCV : public FalseValue {};
@@ -65,6 +66,11 @@ template <typename Type> struct IsFloatingPointType {
IsSame<long double, TypeNoCV>::Value;
};
+template <typename Type> struct IsArithmetic {
+ static constexpr bool Value =
+ IsIntegral<Type>::Value || IsFloatingPointType<Type>::Value;
+};
+
} // namespace cpp
} // namespace __llvm_libc