mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 20:16:02 +00:00
AK: Add the concept of hash-compatible types
This commit is contained in:
parent
92e824afa1
commit
c8bee92fb9
Notes:
sideshowbarker
2024-07-17 22:46:42 +09:00
Author: https://github.com/Hendiadyoin1
Commit: c8bee92fb9
Pull-request: https://github.com/SerenityOS/serenity/pull/10808
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 16 additions and 0 deletions
|
@ -575,6 +575,12 @@ using Decay = typename __decay<T>::type;
|
|||
|
||||
template<typename T, typename U>
|
||||
inline constexpr bool IsPointerOfType = IsPointer<Decay<U>>&& IsSame<T, RemoveCV<RemovePointer<Decay<U>>>>;
|
||||
|
||||
template<typename T, typename U>
|
||||
inline constexpr bool IsHashCompatible = false;
|
||||
template<typename T>
|
||||
inline constexpr bool IsHashCompatible<T, T> = true;
|
||||
|
||||
}
|
||||
using AK::Detail::AddConst;
|
||||
using AK::Detail::AddLvalueReference;
|
||||
|
@ -605,6 +611,7 @@ using AK::Detail::IsEnum;
|
|||
using AK::Detail::IsFloatingPoint;
|
||||
using AK::Detail::IsFunction;
|
||||
using AK::Detail::IsFundamental;
|
||||
using AK::Detail::IsHashCompatible;
|
||||
using AK::Detail::IsIntegral;
|
||||
using AK::Detail::IsLvalueReference;
|
||||
using AK::Detail::IsMoveAssignable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue