mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:27:35 +00:00
AK: Add a IsSpecializationOf<T, Template> type trait
This commit is contained in:
parent
dcf795085b
commit
c6a137dbac
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…
Add table
Add a link
Reference in a new issue