7#include "../traits.hpp"
44template <
typename F,
typename...
Specs>
46 using fn_t = std::remove_cvref_t<F>;
59template <
typename F,
typename...
Specs>
63 std::type_identity<std::remove_cvref_t<F>>,
64 std::type_identity<std::remove_cvref_t<Specs>>...>;
70 "bind(...) does not accept member function pointers; use bind_member(...) instead");
73 "bind(...) requires a callable with one non-overloaded concrete signature");
76 "bind(...) requires exactly one spec per function parameter");
80template <
typename T,
typename F,
typename...
Specs>
82 using fn_t = std::remove_cvref_t<F>;
84 if constexpr (std::is_reference_v<T> || std::is_void_v<T>) {
94 }
else if constexpr (!std::is_same_v<
95 std::remove_cvref_t<last_arg_t<fn_t>>,
103template <
typename T,
typename F,
typename...
Specs>
107 std::type_identity<T>,
108 std::type_identity<std::remove_cvref_t<F>>,
109 std::type_identity<std::remove_cvref_t<Specs>>...>;
115 "bind_into<T>(...) requires a non-void owned payload type T");
118 "bind_into(...) does not accept member function pointers; use bind_into_member(...) instead");
121 "bind_into(...) requires a callable with one non-overloaded concrete signature");
124 "bind_into(...) requires a callable whose last parameter is yorch::direct_out<T>");
127 "bind_into(...) requires exactly one spec per non-output function parameter");
130 "bind_into(...) callable must take yorch::direct_out<T> as its last parameter");
136 using fn_t = std::remove_cvref_t<F>;
153 std::type_identity<std::remove_cvref_t<F>>,
154 std::type_identity<std::remove_cvref_t<ReceiverSpec>>,
155 std::type_identity<std::remove_cvref_t<Specs>>...>;
161 "bind_member(...) requires a non-static member function pointer");
164 "bind_member(...) does not accept direct-output member functions; use bind_into_member(...) instead");
167 "bind_member(...) requires one receiver binding plus exactly one spec per member-function parameter");
173 using fn_t = std::remove_cvref_t<F>;
175 if constexpr (std::is_reference_v<T> || std::is_void_v<T>) {
183 }
else if constexpr (!std::is_same_v<
184 std::remove_cvref_t<member_last_arg_t<fn_t>>,
196 std::type_identity<T>,
197 std::type_identity<std::remove_cvref_t<F>>,
198 std::type_identity<std::remove_cvref_t<ReceiverSpec>>,
199 std::type_identity<std::remove_cvref_t<Specs>>...>;
205 "bind_into_member<T>(...) requires a non-void owned payload type T");
208 "bind_into_member(...) requires a non-static member function pointer");
211 "bind_into_member(...) requires a member function whose last parameter is yorch::direct_out<T>");
214 "bind_into_member(...) requires one receiver binding plus exactly one spec per non-output member-function parameter");
217 "bind_into_member(...) callable must take yorch::direct_out<T> as its last parameter");
@ member_callable_not_supported
consteval bind_member_error validate_bind_member()
consteval bind_into_error validate_bind_into()
consteval bind_error validate_bind()
consteval void emit_bind_member_diagnostic()
@ missing_output_parameter
@ last_parameter_not_direct_out
@ member_callable_not_supported
@ member_callable_not_supported
consteval void emit_bind_into_member_diagnostic()
@ direct_output_member_not_supported
consteval bind_into_member_error validate_bind_into_member()
consteval void emit_bind_diagnostic()
@ missing_output_parameter
@ last_parameter_not_direct_out
constexpr bool is_adapter_descriptor_v
@ direct_output_member_not_supported
consteval void emit_bind_into_diagnostic()
Extracts the canonical function signature information of a callable.
Output sink passed to direct-output tasks.