1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

AK: Add a 'OneOf' concept

Similar to 'SameAs', but for multiple types.
This commit is contained in:
Ali Mohammad Pur 2022-03-28 16:22:00 +04:30 committed by Andreas Kling
parent 2a1a619eed
commit 06cedf5bae
2 changed files with 8 additions and 0 deletions

View file

@ -36,6 +36,9 @@ concept Enum = IsEnum<T>;
template<typename T, typename U>
concept SameAs = IsSame<T, U>;
template<typename U, typename... Ts>
concept OneOf = IsOneOf<U, Ts...>;
template<typename T, template<typename...> typename S>
concept SpecializationOf = IsSpecializationOf<T, S>;
@ -117,6 +120,7 @@ using AK::Concepts::Integral;
using AK::Concepts::IterableContainer;
using AK::Concepts::IteratorFunction;
using AK::Concepts::IteratorPairWith;
using AK::Concepts::OneOf;
using AK::Concepts::SameAs;
using AK::Concepts::Signed;
using AK::Concepts::SpecializationOf;