8#include "../../executor/prev_access_specs.hpp"
9#include "../traits.hpp"
14template <
typename...
Specs>
43template <
typename...
Specs>
48template <
typename Spec,
typename...
Rest>
51 using spec_t = std::remove_cvref_t<Spec>;
55 using type = std::conditional_t<
58 std::is_void_v<rest_t>,
64template <
typename...
Specs>
68template <
typename T,
typename Arg,
typename Spec>
71 std::is_same_v<typename normalized_prev_access_spec_traits<Spec>::payload_type,
T> &&
72 std::is_same_v<Arg, T&>);
74template <
typename T,
typename F,
typename...
Specs, std::size_t...
I>
80 std::remove_cvref_t<Specs>>) &&
84template <
typename T,
typename F,
typename...
Specs>
88template <
typename T,
typename F,
typename...
Specs>
91 std::index_sequence_for<
Specs...> {});
93template <
typename T,
typename F,
typename ReceiverSpec>
109 std::remove_cvref_t<Specs>>) &&
120 std::index_sequence_for<
Specs...> {});
122template <
typename T,
typename F,
typename...
Specs>
124 using fn_t = std::remove_cvref_t<F>;
126 if constexpr (std::is_reference_v<T> || std::is_void_v<T>) {
136 }
else if constexpr (!(std::is_void_v<result_t<fn_t>> ||
150template <
typename T,
typename F,
typename...
Specs>
154 std::type_identity<T>,
155 std::type_identity<std::remove_cvref_t<F>>,
156 std::type_identity<std::remove_cvref_t<Specs>>...>;
162 "bind_forward_prev<T>(...) requires a non-void owned payload type T");
165 "bind_forward_prev<T>(...) does not support member function pointers in v1");
168 "bind_forward_prev<T>(...) does not accept callables with yorch::direct_out<T>; use bind_into(...) for direct-output materialization");
171 "bind_forward_prev<T>(...) requires a callable with one non-overloaded concrete signature");
174 "bind_forward_prev<T>(...) requires exactly one spec per function parameter");
177 "bind_forward_prev<T>(...) callable must return void or yorch::step_result");
180 "bind_forward_prev<T>(...) requires exactly one prev-access binding");
183 "bind_forward_prev<T>(...) requires the forwarded prev payload type to match T exactly");
186 "bind_forward_prev<T>(...) only supports borrow_prev_mut<T>() -> T&");
192 using fn_t = std::remove_cvref_t<F>;
194 if constexpr (std::is_reference_v<T> || std::is_void_v<T>) {
202 }
else if constexpr (!(std::is_void_v<member_result_t<fn_t>> ||
203 std::is_same_v<member_result_t<fn_t>,
step_result>)) {
210 std::decay_t<ReceiverSpec>,
211 std::decay_t<Specs>...>) {
216 std::decay_t<ReceiverSpec>,
217 std::decay_t<Specs>...>) {
228 std::type_identity<T>,
229 std::type_identity<std::remove_cvref_t<F>>,
230 std::type_identity<std::remove_cvref_t<ReceiverSpec>>,
231 std::type_identity<std::remove_cvref_t<Specs>>...>;
237 "bind_forward_prev_member<T>(...) requires a non-void owned payload type T");
240 "bind_forward_prev_member(...) requires a non-static member function pointer");
243 "bind_forward_prev_member(...) does not accept direct-output member functions; use bind_into_member(...) instead");
246 "bind_forward_prev_member(...) requires one receiver binding plus exactly one spec per member-function parameter");
249 "bind_forward_prev_member(...) callable must return void or yorch::step_result");
252 "bind_forward_prev_member<T>(...) requires exactly one prev-access binding across receiver and member-function parameters");
255 "bind_forward_prev_member<T>(...) requires the forwarded prev payload type to match T exactly");
258 "bind_forward_prev_member<T>(...) only supports borrow_prev_mut<T>() -> T&");
typename member_function_traits< std::remove_cvref_t< F > >::template arg< I > member_nth_arg_t
consteval void emit_bind_forward_prev_member_diagnostic()
constexpr bool forward_prev_member_receiver_binding_supported_v
consteval bind_forward_prev_error validate_bind_forward_prev()
constexpr bool is_prev_access_spec_v
typename function_traits< std::remove_cvref_t< F > >::template arg< I > nth_arg_t
@ prev_access_count_invalid
@ member_callable_not_supported
@ direct_output_callable_not_supported
@ binding_mode_not_supported
constexpr bool forward_prev_spec_matches_binding_v
constexpr std::size_t forward_prev_prev_access_count_v
bind_forward_prev_member_error
@ prev_access_count_invalid
@ direct_output_member_not_supported
@ binding_mode_not_supported
consteval bool forward_prev_bindings_supported_impl(std::index_sequence< I... >)
constexpr bool member_receiver_prev_access_valid_v
consteval bind_forward_prev_member_error validate_bind_forward_prev_member()
constexpr bool bind_forward_prev_bindings_supported_v
consteval bool forward_prev_member_bindings_supported_impl(std::index_sequence< I... >)
typename forward_prev_unique_prev_payload< Specs... >::type forward_prev_unique_prev_payload_t
consteval void emit_bind_forward_prev_diagnostic()
constexpr bool bind_forward_prev_payload_matches_v
constexpr bool bind_forward_prev_member_bindings_supported_v
constexpr bool is_borrow_prev_mut_spec_v
constexpr bool is_adapter_descriptor_v
constexpr bool bind_forward_prev_member_payload_matches_v
std::conditional_t< is_prev_access_spec_v< spec_t >, std::conditional_t< std::is_void_v< rest_t >, typename normalized_prev_access_spec_traits< spec_t >::payload_type, void >, rest_t > type
Extracts the canonical function signature information of a callable.
Represents the basic outcome of a task step.