mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
AK: Add the ConvertibleTo
concept
This commit is contained in:
parent
71f5bbab42
commit
e538fa203e
|
@ -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…
Reference in a new issue