mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
AK: Add IsArithmetic and IsFundamental type traits
Also, make sure to using AK::IsNullPointer
This commit is contained in:
parent
874df07ffd
commit
fe4b44b489
|
@ -511,6 +511,12 @@ constexpr auto DependentFalse = false;
|
|||
template<typename T>
|
||||
using IsUnsigned = IsSame<T, MakeUnsigned<T>>;
|
||||
|
||||
template<typename T>
|
||||
using IsArithmetic = IntegralConstant<bool, IsIntegral<T>::value || IsFloatingPoint<T>::value>;
|
||||
|
||||
template<typename T>
|
||||
using IsFundamental = IntegralConstant<bool, IsArithmetic<T>::value || IsVoid<T>::value || IsNullPointer<T>::value>;
|
||||
|
||||
}
|
||||
|
||||
using AK::AddConst;
|
||||
|
@ -524,9 +530,12 @@ using AK::exchange;
|
|||
using AK::forward;
|
||||
using AK::is_trivial;
|
||||
using AK::is_trivially_copyable;
|
||||
using AK::IsArithmetic;
|
||||
using AK::IsBaseOf;
|
||||
using AK::IsClass;
|
||||
using AK::IsConst;
|
||||
using AK::IsFundamental;
|
||||
using AK::IsNullPointer;
|
||||
using AK::IsSame;
|
||||
using AK::IsUnion;
|
||||
using AK::IsVoid;
|
||||
|
|
Loading…
Reference in a new issue