mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Add a IsSpecializationOf<T, Template> type trait
This commit is contained in:
parent
dcf795085b
commit
c6a137dbac
Notes:
sideshowbarker
2024-07-18 07:04:18 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/c6a137dbac4 Pull-request: https://github.com/SerenityOS/serenity/pull/9278
1 changed files with 8 additions and 0 deletions
|
@ -532,6 +532,13 @@ inline constexpr bool IsMoveAssignable = IsAssignable<AddLvalueReference<T>, Add
|
|||
|
||||
template<typename T>
|
||||
inline constexpr bool IsTriviallyMoveAssignable = IsTriviallyAssignable<AddLvalueReference<T>, AddRvalueReference<T>>;
|
||||
|
||||
template<typename T, template<typename...> typename U>
|
||||
inline constexpr bool IsSpecializationOf = false;
|
||||
|
||||
template<template<typename...> typename U, typename... Us>
|
||||
inline constexpr bool IsSpecializationOf<U<Us...>, U> = true;
|
||||
|
||||
}
|
||||
using AK::Detail::AddConst;
|
||||
using AK::Detail::AddLvalueReference;
|
||||
|
@ -570,6 +577,7 @@ using AK::Detail::IsPointer;
|
|||
using AK::Detail::IsRvalueReference;
|
||||
using AK::Detail::IsSame;
|
||||
using AK::Detail::IsSigned;
|
||||
using AK::Detail::IsSpecializationOf;
|
||||
using AK::Detail::IsTrivial;
|
||||
using AK::Detail::IsTriviallyAssignable;
|
||||
using AK::Detail::IsTriviallyConstructible;
|
||||
|
|
Loading…
Reference in a new issue