mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
AK: Add IsScalar
to StdLibExtraDetails.h
This matches the behaviour of `std::is_scalar_v`
This commit is contained in:
parent
0d1ba5c37d
commit
eff9d4881c
Notes:
github-actions[bot]
2025-04-23 03:20:50 +00:00
Author: https://github.com/yyny
Commit: eff9d4881c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4310
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/DanShaders
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 4 additions and 0 deletions
|
@ -407,6 +407,9 @@ inline constexpr bool IsArithmetic = IsIntegral<T> || IsFloatingPoint<T>;
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline constexpr bool IsFundamental = IsArithmetic<T> || IsVoid<T> || IsNullPointer<T>;
|
inline constexpr bool IsFundamental = IsArithmetic<T> || IsVoid<T> || IsNullPointer<T>;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
inline constexpr bool IsScalar = IsArithmetic<T> || IsEnum<T> || IsPointer<T> || IsNullPointer<T> || IsMemberPointer<T>;
|
||||||
|
|
||||||
template<typename T, T... Ts>
|
template<typename T, T... Ts>
|
||||||
struct IntegerSequence {
|
struct IntegerSequence {
|
||||||
using Type = T;
|
using Type = T;
|
||||||
|
@ -705,6 +708,7 @@ using AK::Detail::IsRvalueReference;
|
||||||
using AK::Detail::IsSame;
|
using AK::Detail::IsSame;
|
||||||
using AK::Detail::IsSameIgnoringCV;
|
using AK::Detail::IsSameIgnoringCV;
|
||||||
using AK::Detail::IsSameIgnoringCVReference;
|
using AK::Detail::IsSameIgnoringCVReference;
|
||||||
|
using AK::Detail::IsScalar;
|
||||||
using AK::Detail::IsSigned;
|
using AK::Detail::IsSigned;
|
||||||
using AK::Detail::IsSpecializationOf;
|
using AK::Detail::IsSpecializationOf;
|
||||||
using AK::Detail::IsTemplateBaseOf;
|
using AK::Detail::IsTemplateBaseOf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue