mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
AK: Add a OneOfIgnoringCV concept
Some functions want to ignore cv-qualifiers, and it's much easier to constrain the type through a concept than a separate requires clause on the function.
This commit is contained in:
parent
5d1deac9a8
commit
2b79f36148
2 changed files with 12 additions and 0 deletions
|
@ -39,6 +39,9 @@ concept SameAs = IsSame<T, U>;
|
|||
template<typename U, typename... Ts>
|
||||
concept OneOf = IsOneOf<U, Ts...>;
|
||||
|
||||
template<typename U, typename... Ts>
|
||||
concept OneOfIgnoringCV = IsOneOfIgnoringCV<U, Ts...>;
|
||||
|
||||
template<typename T, template<typename...> typename S>
|
||||
concept SpecializationOf = IsSpecializationOf<T, S>;
|
||||
|
||||
|
@ -121,6 +124,7 @@ using AK::Concepts::IterableContainer;
|
|||
using AK::Concepts::IteratorFunction;
|
||||
using AK::Concepts::IteratorPairWith;
|
||||
using AK::Concepts::OneOf;
|
||||
using AK::Concepts::OneOfIgnoringCV;
|
||||
using AK::Concepts::SameAs;
|
||||
using AK::Concepts::Signed;
|
||||
using AK::Concepts::SpecializationOf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue