Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
aa8d882
Add debug and static-member-fn support to sequence-sender
kirkshoop Sep 30, 2025
4e37d4d
switch `__seqexpr` to use static-member-fn to customize `subscribe` a…
kirkshoop Sep 30, 2025
fef35d8
add `__well_formed_sequence_sender` constraints to `ignore_all_values…
kirkshoop Sep 30, 2025
f7da526
improve debugging for `transform_each`
kirkshoop Sep 30, 2025
082a9e4
move sequence ERROR structs into exec namespace
kirkshoop Sep 30, 2025
4cca273
add `merge` algorithm for sequence-senders
kirkshoop Sep 30, 2025
ef85ae8
fix bugs in merge and transform_each
kirkshoop Oct 12, 2025
86c2afb
apply PR feedback
kirkshoop Oct 12, 2025
b3ca212
remove requires clause that was preventing diagnosis of failed type c…
kirkshoop Oct 12, 2025
bb09c37
diagnostics improvements for sequence sender
kirkshoop Oct 12, 2025
3f1ba21
add merge_each sequence sender adaptor
kirkshoop Oct 12, 2025
5117f8b
provide aliases for exec::materialize_t and exec::dematerialize_t
kirkshoop Oct 18, 2025
d63efcf
fix compiler error construction in merge
kirkshoop Oct 18, 2025
41a2f09
fix some ordering and error handling issues in merge_each
kirkshoop Oct 18, 2025
28d9367
improve compile errors for sequence senders
kirkshoop Oct 18, 2025
be05244
prevent trailing return types from causing subscribe, get_completion_…
kirkshoop Oct 18, 2025
b1b1614
add the option to specify a scheduler to iterate.
kirkshoop Oct 18, 2025
84b041f
add test_scheduler and marble and notification
kirkshoop Oct 18, 2025
b70a136
Merge branch 'main' into addmerge
ericniebler Oct 19, 2025
da25787
remove windows-only compilation error debug aid that is breaking wind…
kirkshoop Oct 21, 2025
54e46e2
replace static_thread_pool with single_thread_context. static_thread_…
kirkshoop Oct 29, 2025
3229813
Merge branch 'main' into addmerge
ericniebler Oct 29, 2025
8364f1a
clang-format changes
kirkshoop Oct 29, 2025
f58736e
remove _t from concept name
kirkshoop Oct 29, 2025
431c67c
simplify meta expression at the behest of Visual Studio
kirkshoop Oct 29, 2025
825110f
compile time debug changes
kirkshoop Oct 29, 2025
73d3cb0
Merge branch 'addmerge' into add-merge_each
kirkshoop Oct 29, 2025
9c71ef2
fix crash in delays_each_on
kirkshoop Oct 31, 2025
71da7d9
Merge remote-tracking branch 'origin/addmerge' into add-merge_each
kirkshoop Oct 31, 2025
36b00e2
clang-format changes
kirkshoop Oct 31, 2025
3cbf83b
fix bad copy/paste
kirkshoop Oct 31, 2025
ec14797
clang-format changes
kirkshoop Oct 31, 2025
dbd27ac
Merge branch 'add-merge_each' into marbletesting
kirkshoop Oct 31, 2025
09c57f3
update transform_iterate to work with specified scheduler support in …
kirkshoop Nov 1, 2025
6bed02b
silence visual studio unreachable warnings
kirkshoop Nov 1, 2025
9fd303d
fix visual studio errors
kirkshoop Nov 1, 2025
a309693
fixes visual studio compile errors and runtime crashes
kirkshoop Nov 1, 2025
3d93782
fix delays_each_on
kirkshoop Nov 1, 2025
175e734
fix clang19 build
kirkshoop Nov 1, 2025
ff06ec6
Merge remote-tracking branch 'upstream/main' into add-merge_each
kirkshoop Nov 1, 2025
f8841c5
fix bad merge
kirkshoop Nov 1, 2025
0fc8423
Merge branch 'add-merge_each' into marbletesting
kirkshoop Nov 1, 2025
2b48dfe
how did this ever compile?
kirkshoop Nov 1, 2025
ce05c8f
remove checks in multithreaded tests that cause test failures on slow…
kirkshoop Nov 1, 2025
23ab4b8
Merge branch 'add-merge_each' into marbletesting
kirkshoop Nov 1, 2025
850a25c
fixes warnings and errors in clang16
kirkshoop Nov 2, 2025
50d6ce7
get nvhpc compiling
kirkshoop Nov 6, 2025
307ead3
Merge branch 'add-merge_each' into marbletesting
kirkshoop Nov 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/exec/sequence/ignore_all_values.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ namespace exec {
static constexpr auto connect =
[]<class _Sender, receiver _Receiver>(_Sender&& __sndr, _Receiver __rcvr) noexcept(
__nothrow_callable<__sexpr_apply_t, _Sender, __connect_fn<_Receiver>>)
-> __call_result_t<__sexpr_apply_t, _Sender, __connect_fn<_Receiver>>
{
-> __call_result_t<__sexpr_apply_t, _Sender, __connect_fn<_Receiver>> {
static_assert(sender_expr_for<_Sender, ignore_all_values_t>);
return __sexpr_apply(static_cast<_Sender&&>(__sndr), __connect_fn<_Receiver>{__rcvr});
};
Expand Down
20 changes: 13 additions & 7 deletions include/exec/sequence/merge_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,15 +727,21 @@ namespace exec {

template <class _Sequence, class _Sender, class... _Env>
struct __arg_of_t {

template <class... _Args>
static constexpr bool __valid_args = sizeof...(_Args) == 1
&& (has_sequence_item_types<_Args, _Env...> && ...
&& true);

template <class... _Args>
using __f = stdexec::__meval<
stdexec::__if_c<
sizeof...(_Args) == 1 && (has_sequence_item_types<_Args, _Env...> && ...),
stdexec::__q<stdexec::__types>,
__value_completions_error<_Sequence, _Sender, _Env...>
>::template __f,
_Args...
using __checked_eval_t = stdexec::__if_c<
__valid_args<_Args...>,
stdexec::__types<_Args...>,
__value_completions_error<_Sequence, _Sender, _Env...>
>;

template <class... _Args>
using __f = __checked_eval_t<_Args...>;
};

template <class _Sequence, class _Sender, class... _Env>
Expand Down
81 changes: 44 additions & 37 deletions include/exec/sequence/transform_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ namespace exec {

template <class... _Items>
auto operator()(item_types<_Items...>*) -> decltype((
stdexec::__msuccess(), ..., __try_adaptor_for_item(static_cast<_Items*>(nullptr))));
stdexec::__msuccess(),
...,
__try_adaptor_for_item(static_cast<_Items*>(nullptr))));
};

template <class _Adaptor, class _Items>
using __try_adaptor_calls_result_t = __call_result_t<__try_adaptor_calls_t<stdexec::__decay_t<_Adaptor>>, _Items>;
using __try_adaptor_calls_result_t =
__call_result_t<__try_adaptor_calls_t<stdexec::__decay_t<_Adaptor>>, _Items>;

template <class _Adaptor, class _Items>
concept __callable_adaptor_for = requires(_Items* __items) {
Expand All @@ -150,7 +153,7 @@ namespace exec {
template <sender _Sequence, __sender_adaptor_closure _Adaptor>
auto operator()(_Sequence&& __sndr, _Adaptor&& __adaptor) const
noexcept(__nothrow_decay_copyable<_Sequence> && __nothrow_decay_copyable<_Adaptor>)
-> __well_formed_sequence_sender auto {
-> __well_formed_sequence_sender auto {
return make_sequence_expr<transform_each_t>(
static_cast<_Adaptor&&>(__adaptor), static_cast<_Sequence&&>(__sndr));
}
Expand All @@ -166,8 +169,8 @@ namespace exec {
using __completion_sigs_t = __sequence_completion_signatures_of_t<__child_of<_Self>, _Env...>;

template <sender_expr_for<transform_each_t> _Self, class... _Env>
static auto
get_completion_signatures(_Self&&, _Env&&...) noexcept -> __completion_sigs_t<_Self, _Env...> {
static auto get_completion_signatures(_Self&&, _Env&&...) noexcept
-> __completion_sigs_t<_Self, _Env...> {
return {};
}

Expand All @@ -180,57 +183,61 @@ namespace exec {
__item_types_of_t<__child_of<_Self>, _Env...>
>;

template<class _Transform>
struct _TRANSFORM_EACH_ADAPTOR_INVOCATION_FAILED_ {};
template <class _Transform>
struct _TRANSFORM_EACH_ADAPTOR_INVOCATION_FAILED_ { };

template <sender_expr_for<transform_each_t> _Self, class... _Env>
requires (!__mvalid<__item_types_t, _Self, _Env...>)
&& __mvalid<__item_types_of_t, __child_of<_Self>, _Env...>
&& (!__callable_adaptor_for<
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>
>)
static auto get_item_types(_Self&&, _Env&&...) noexcept -> __mexception<
_TRANSFORM_EACH_ADAPTOR_INVOCATION_FAILED_<_Self>,
_WITH_SEQUENCE_<__child_of<_Self>>,
_WITH_ENVIRONMENT_<_Env...>,
_WITH_TYPE_<__try_adaptor_calls_result_t<
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>>>>;

template<class _Transform>
struct _TRANSFORM_EACH_ITEM_TYPES_OF_THE_CHILD_ARE_INVALID_ {};
template <sender_expr_for<transform_each_t> _Self, class... _Env>
requires(!__mvalid<__item_types_t, _Self, _Env...>)
&& __mvalid<__item_types_of_t, __child_of<_Self>, _Env...>
&& (!__callable_adaptor_for<
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>
>)
static auto get_item_types(_Self&&, _Env&&...) noexcept -> __mexception<
_TRANSFORM_EACH_ADAPTOR_INVOCATION_FAILED_<_Self>,
_WITH_SEQUENCE_<__child_of<_Self>>,
_WITH_ENVIRONMENT_<_Env...>,
_WITH_TYPE_<__try_adaptor_calls_result_t<
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>
>>
>;

template <class _Transform>
struct _TRANSFORM_EACH_ITEM_TYPES_OF_THE_CHILD_ARE_INVALID_ { };

template <sender_expr_for<transform_each_t> _Self, class... _Env>
requires (!__mvalid<__item_types_t, _Self, _Env...>)
&& (!__mvalid<__item_types_of_t, __child_of<_Self>, _Env...>)
requires(!__mvalid<__item_types_t, _Self, _Env...>)
&& (!__mvalid<__item_types_of_t, __child_of<_Self>, _Env...>)
static auto get_item_types(_Self&&, _Env&&...) noexcept -> __mexception<
_TRANSFORM_EACH_ITEM_TYPES_OF_THE_CHILD_ARE_INVALID_<_Self>,
_WITH_SEQUENCE_<__child_of<_Self>>,
_WITH_ENVIRONMENT_<_Env...>>;
_WITH_ENVIRONMENT_<_Env...>
>;

template<class _Transform>
struct _TRANSFORM_EACH_ITEM_TYPES_CALCULATION_FAILED_ {};
template <class _Transform>
struct _TRANSFORM_EACH_ITEM_TYPES_CALCULATION_FAILED_ { };

template <sender_expr_for<transform_each_t> _Self, class... _Env>
requires (!__mvalid<__item_types_t, _Self, _Env...>)
&& __mvalid<__item_types_of_t, __child_of<_Self>, _Env...>
&& __callable_adaptor_for<
requires(!__mvalid<__item_types_t, _Self, _Env...>)
&& __mvalid<__item_types_of_t, __child_of<_Self>, _Env...>
&& __callable_adaptor_for<
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>
>
>
static auto get_item_types(_Self&&, _Env&&...) noexcept -> __mexception<
_TRANSFORM_EACH_ITEM_TYPES_CALCULATION_FAILED_<_Self>,
_WITH_SEQUENCE_<__child_of<_Self>>,
_WITH_ENVIRONMENT_<_Env...>>;
_WITH_ENVIRONMENT_<_Env...>
>;

template <sender_expr_for<transform_each_t> _Self, class... _Env>
requires __mvalid<__item_types_t, _Self, _Env...>
&& __mvalid<__item_types_of_t, __child_of<_Self>, _Env...>
&& __callable_adaptor_for<
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>
>
__data_of<_Self>,
__item_types_of_t<__child_of<_Self>, _Env...>
>
static auto get_item_types(_Self&&, _Env&&...) noexcept -> __item_types_t<_Self, _Env...> {
return {};
}
Expand Down
8 changes: 4 additions & 4 deletions include/exec/sequence_senders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ namespace exec {
tag_invocable<get_item_types_t, __tfx_sequence_t<_Sequence, _Env>, _Env>;

template <class _Sequence, class _Env>
using __member_alias_t = typename __decay_t<__tfx_sequence_t<_Sequence, _Env>>::item_types;
using __member_alias_t = __decay_t<__tfx_sequence_t<_Sequence, _Env>>::item_types;

template <class _Sequence, class _Env>
concept __with_member_alias = __mvalid<__member_alias_t, _Sequence, _Env>;
Expand Down Expand Up @@ -813,13 +813,13 @@ namespace exec {
static_assert(
__well_formed_item_senders<_Sequence>,
STDEXEC_ERROR_GET_ITEM_TYPES_HAS_INVALID_RETURN_TYPE);
} else {
stdexec::__diagnose_sender_concept_failure<_Sequence, _Env...>();
//} else {
// stdexec::__diagnose_sender_concept_failure<_Sequence, _Env...>();
}
#if STDEXEC_MSVC() || STDEXEC_NVHPC()
// MSVC and NVHPC need more encouragement to print the type of the
// error.
_Completions __what = 0;
// _Completions __what = 0;
#endif
}
}
Expand Down
Loading