AK: Add a IsSpecializationOf<T, Template> type trait

This commit is contained in:
Ali Mohammad Pur 2021-08-09 02:52:35 +04:30 committed by Andreas Kling
parent dcf795085b
commit c6a137dbac
Notes: sideshowbarker 2024-07-18 07:04:18 +09:00

View file

@ -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;