12template<
typename T,
typename U>
16 template<
typename T,
typename U>
19 template<
typename... Types>
20 struct CommonErrorHelper {};
23 struct CommonErrorHelper<T> : CommonErrorHelper<T, T> {};
25 template<
typename... Ts,
typename... Us>
26 struct CommonErrorHelper<Variant<Ts...>, Variant<Us...>>
27 : TypeConstant<AsTemplate<Variant, Unique<List<Ts..., Us...>>>> {};
29 template<
typename... Ts,
typename U>
30 struct CommonErrorHelper<Variant<Ts...>, U> : CommonErrorHelper<Variant<Ts...>, Variant<U>> {};
32 template<
typename T,
typename... Us>
33 struct CommonErrorHelper<T, Variant<Us...>> : CommonErrorHelper<Variant<Us...>, T> {};
35 template<
typename T,
typename U>
36 requires(HasCustomCommonError<T, U>)
37 struct CommonErrorHelper<T, U> : CustomCommonError<T, U> {};
39 template<
typename T,
typename U>
40 requires(!HasCustomCommonError<T, U> && concepts::CommonWith<T, U>)
41 struct CommonErrorHelper<T, U> : TypeConstant<
CommonType<T, U>> {};
44 concept ConvertibleToError = concepts::ConvertibleTo<T, Error>;
46 template<
typename T,
typename U>
47 concept CommonErrorIsError = ConvertibleToError<T> && ConvertibleToError<U>;
49 template<
typename T,
typename U>
50 requires(!HasCustomCommonError<T, U> && !concepts::CommonWith<T, U> && CommonErrorIsError<T, U>)
51 struct CommonErrorHelper<T, U> : TypeConstant<
Error> {};
53 template<
typename T,
typename U>
54 requires(!HasCustomCommonError<T, U> && !concepts::CommonWith<T, U> && !CommonErrorIsError<T, U>)
55 struct CommonErrorHelper<T, U> : TypeConstant<Variant<T, U>> {};
57 template<
typename T,
typename U,
typename W,
typename... Rest>
58 requires(
requires {
typename CommonErrorHelper<T, U>::Type; })
59 struct CommonErrorHelper<T, U, W, Rest...>
60 : CommonErrorHelper<typename CommonErrorHelper<T, U>::Type, W, Rest...> {};
63template<
typename... Types>
64requires(
requires {
typename detail::CommonErrorHelper<Types...>
::Type; })
69template<
typename T,
typename U>
Definition common_error.h:70
Definition any_storable.h:9
StatusCode< Erased< long > > Error
Definition error.h:8
auto declval() -> meta::AddRValueReference< T >
Definition declval.h:8