mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
AK: Add a 'OneOf' concept
Similar to 'SameAs', but for multiple types.
This commit is contained in:
parent
2a1a619eed
commit
06cedf5bae
2 changed files with 8 additions and 0 deletions
|
@ -572,6 +572,9 @@ inline constexpr bool IsHashCompatible = false;
|
|||
template<typename T>
|
||||
inline constexpr bool IsHashCompatible<T, T> = true;
|
||||
|
||||
template<typename T, typename... Ts>
|
||||
inline constexpr bool IsOneOf = (IsSame<T, Ts> || ...);
|
||||
|
||||
}
|
||||
using AK::Detail::AddConst;
|
||||
using AK::Detail::AddLvalueReference;
|
||||
|
@ -607,6 +610,7 @@ using AK::Detail::IsLvalueReference;
|
|||
using AK::Detail::IsMoveAssignable;
|
||||
using AK::Detail::IsMoveConstructible;
|
||||
using AK::Detail::IsNullPointer;
|
||||
using AK::Detail::IsOneOf;
|
||||
using AK::Detail::IsPOD;
|
||||
using AK::Detail::IsPointer;
|
||||
using AK::Detail::IsRvalueReference;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue