mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 08:18:55 +00:00
AK: Add a 'OneOf' concept
Similar to 'SameAs', but for multiple types.
This commit is contained in:
parent
2a1a619eed
commit
06cedf5bae
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/alimpfard
Commit: 06cedf5bae
Pull-request: https://github.com/SerenityOS/serenity/pull/13310
Reviewed-by: https://github.com/IdanHo
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue