mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
AK: Add the ConvertibleTo
concept
This commit is contained in:
parent
71f5bbab42
commit
e538fa203e
Notes:
sideshowbarker
2024-07-17 08:38:37 +09:00
Author: https://github.com/LucasChollet
Commit: e538fa203e
Pull-request: https://github.com/SerenityOS/serenity/pull/17090
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,9 @@ concept Enum = IsEnum<T>;
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
concept SameAs = IsSame<T, U>;
|
concept SameAs = IsSame<T, U>;
|
||||||
|
|
||||||
|
template<class From, class To>
|
||||||
|
concept ConvertibleTo = IsConvertible<From, To>;
|
||||||
|
|
||||||
template<typename U, typename... Ts>
|
template<typename U, typename... Ts>
|
||||||
concept OneOf = IsOneOf<U, Ts...>;
|
concept OneOf = IsOneOf<U, Ts...>;
|
||||||
|
|
||||||
|
@ -139,6 +142,7 @@ namespace AK {
|
||||||
#endif
|
#endif
|
||||||
using AK::Concepts::Arithmetic;
|
using AK::Concepts::Arithmetic;
|
||||||
using AK::Concepts::ArrayLike;
|
using AK::Concepts::ArrayLike;
|
||||||
|
using AK::Concepts::ConvertibleTo;
|
||||||
using AK::Concepts::DerivedFrom;
|
using AK::Concepts::DerivedFrom;
|
||||||
using AK::Concepts::Enum;
|
using AK::Concepts::Enum;
|
||||||
using AK::Concepts::FallibleFunction;
|
using AK::Concepts::FallibleFunction;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue