13 template<
typename Tag,
typename Sig,
typename... Tags>
14 struct DispatcherImpl;
16 template<
typename Tag,
typename R, concepts::DecaysTo<This> Self,
typename... Args,
typename... Tags>
17 struct DispatcherImpl<
Tag, R(Self, Args...), Tags...> {
18 using Type = Method<
Tag, R(Self, Args...)>;
20 template<
typename T,
typename F>
21 constexpr static bool is_invocable = concepts::InvocableTo<F const&, R, meta::Like<Self, T>, Args...>;
26 using Invoke = Constexpr<is_invocable<T, F>>;
30 requires(concepts::TagInvocableTo<Tag, R, meta::Like<Self, T>, Args...> ||
31 (concepts::InvocableTo<Tags const&, R, meta::Like<Self, T>, Args...> || ...))
32 constexpr auto operator()(T&& self, Args... args)
const -> R {
33 if constexpr (concepts::TagInvocableTo<Tag, R, meta::Like<Self, T>, Args...>) {
34 auto const tag =
Tag {};
37 using Matching =
meta::Filter<meta::List<Tags...>, Invocable<T>>;
39 auto const tag = Choice {};
46template<
typename Self, concepts::LanguageFunction Sig,
typename... Tags>
47using Dispatcher = detail::DispatcherImpl<Self, Sig, Tags...>;
detail::DispatcherImpl< Self, Sig, Tags... > Dispatcher
Definition dispatcher.h:47
constexpr tag_invoke_detail::TagInvokeFn tag_invoke
Definition tag_invoke.h:22
constexpr auto invoke_r
Definition invoke.h:103
di::meta::Decay< decltype(T)> Tag
Definition tag_invoke.h:28
constexpr auto forward_like(U &&value) -> decltype(auto)
Definition forward_like.h:8
Definition any_storable.h:9