From 97aa246b277197b288752423b3e5ff60db7a041a Mon Sep 17 00:00:00 2001 From: Cra3z <3324654761@qq.com> Date: Sat, 15 Aug 2026 16:15:54 +0800 Subject: [PATCH 1/3] Fix some typos --- README.md | 5 ++-- include/beman/execution/detail/set_value.hpp | 13 --------- .../execution/exec-schedule-from.test.cpp | 2 +- tests/beman/execution/exec-snd-expos.test.cpp | 29 ------------------- tests/beman/execution/exec-stop-when.test.cpp | 5 ++-- 5 files changed, 5 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 12b78952..86227bbb 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ e.g.: specified scheduler`. - `let_value(sender, fun)` to produce a sender based on `sender`'s results. -- `on(scheduler, sender)` to execute `sender` on `scheduler`. -- `transfer(sender, scheduler)` to complete with with `sender`'s +- `starts_on(scheduler, sender)` to start `sender` on `scheduler`. +- `continues_on(sender, scheduler)` to complete with with `sender`'s results on `scheduler`. - `when_all(sender ...)` to complete when all `sender`s have completed. @@ -57,7 +57,6 @@ This project requires at least the following to build: * A C++ compiler that conforms to the C++23 standard or greater * CMake 3.30 or later -* (Test Only) GoogleTest You can disable building tests by setting CMake option `BEMAN_EXECUTION_BUILD_TESTS` to `OFF` when configuring the project. diff --git a/include/beman/execution/detail/set_value.hpp b/include/beman/execution/detail/set_value.hpp index c2e4bdc4..541ee22e 100644 --- a/include/beman/execution/detail/set_value.hpp +++ b/include/beman/execution/detail/set_value.hpp @@ -12,19 +12,6 @@ import std; #include #endif -// ---------------------------------------------------------------------------- - -#define BEMAN_EXECUTION_SET_VALUE(rcvr, expr) \ - [&]() noexcept(noexcept((expr))) -> void { \ - if constexpr (::std::same_as) { \ - (expr), ::beman::execution::set_value(::std::move((rcvr))); \ - } else { \ - ::beman::execution::set_value(::std::move((rcvr)), (expr)); \ - } \ - }() - -// ---------------------------------------------------------------------------- - namespace beman::execution { /*! * \brief Type of the customization point object for successful completions. diff --git a/tests/beman/execution/exec-schedule-from.test.cpp b/tests/beman/execution/exec-schedule-from.test.cpp index f8fb27e3..66f95879 100644 --- a/tests/beman/execution/exec-schedule-from.test.cpp +++ b/tests/beman/execution/exec-schedule-from.test.cpp @@ -11,7 +11,7 @@ import std; #ifdef BEMAN_HAS_MODULES import beman.execution; #else -#include +#include #include #endif diff --git a/tests/beman/execution/exec-snd-expos.test.cpp b/tests/beman/execution/exec-snd-expos.test.cpp index dcdde83c..e65642fe 100644 --- a/tests/beman/execution/exec-snd-expos.test.cpp +++ b/tests/beman/execution/exec-snd-expos.test.cpp @@ -192,34 +192,6 @@ struct receiver { auto set_stopped() noexcept -> void {} }; -// ------------------------------------------------------------------------ - -template -struct set_value_test_receiver { - using receiver_concept = test_std::receiver_tag; - T& single_arg; - bool& no_arg; - auto set_value(auto&& value) noexcept -> void { - no_arg = false; - single_arg = value; - } -}; - -auto test_set_value_macro() -> void { -#ifdef BEMAN_EXECUTION_SET_VALUE - int value{42}; - bool no_arg{false}; - ASSERT(value == 42); - ASSERT(not no_arg); - BEMAN_EXECUTION_SET_VALUE(set_value_test_receiver{value, no_arg}, []() noexcept { return 43; }()); - ASSERT(value == 43); - ASSERT(not no_arg); - BEMAN_EXECUTION_SET_VALUE(set_value_test_receiver{value, no_arg}, []() noexcept {}()); - ASSERT(value == 43); - ASSERT(no_arg); -#endif -} - template auto test_fwd_env_helper() -> void { env e{42}; @@ -1293,7 +1265,6 @@ auto test_child_type() -> void { } // namespace TEST(exec_snd_expos) { - test_set_value_macro(); test_fwd_env(); test_make_env(); test_join_env(); diff --git a/tests/beman/execution/exec-stop-when.test.cpp b/tests/beman/execution/exec-stop-when.test.cpp index 9af65747..eb8296d9 100644 --- a/tests/beman/execution/exec-stop-when.test.cpp +++ b/tests/beman/execution/exec-stop-when.test.cpp @@ -17,7 +17,6 @@ import beman.execution; import beman.execution.detail; #else #include -#include #include #include #include @@ -143,7 +142,7 @@ TEST(exec_stop_when) { test_std::inplace_stop_source source2; completion comp{completion::none}; auto state{test_std::connect(test_detail::stop_when(sender{}, source1.get_token()), - receiver{source2.get_token(), comp})}; + receiver{source2.get_token(), comp})}; ASSERT(comp == completion::none); test_std::start(state); ASSERT(comp == completion::none); @@ -156,7 +155,7 @@ TEST(exec_stop_when) { test_std::inplace_stop_source source2; completion comp{completion::none}; auto state{test_std::connect(test_detail::stop_when(sender{}, source1.get_token()), - receiver{source2.get_token(), comp})}; + receiver{source2.get_token(), comp})}; ASSERT(comp == completion::none); test_std::start(state); ASSERT(comp == completion::none); From 2e7a797de9b3b568aad2d8418ac0193b2f7fdc4f Mon Sep 17 00:00:00 2001 From: Cra3z <3324654761@qq.com> Date: Sat, 15 Aug 2026 17:00:31 +0800 Subject: [PATCH 2/3] Format code --- tests/beman/execution/exec-stop-when.test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/beman/execution/exec-stop-when.test.cpp b/tests/beman/execution/exec-stop-when.test.cpp index eb8296d9..7b836af7 100644 --- a/tests/beman/execution/exec-stop-when.test.cpp +++ b/tests/beman/execution/exec-stop-when.test.cpp @@ -142,7 +142,7 @@ TEST(exec_stop_when) { test_std::inplace_stop_source source2; completion comp{completion::none}; auto state{test_std::connect(test_detail::stop_when(sender{}, source1.get_token()), - receiver{source2.get_token(), comp})}; + receiver{source2.get_token(), comp})}; ASSERT(comp == completion::none); test_std::start(state); ASSERT(comp == completion::none); @@ -155,7 +155,7 @@ TEST(exec_stop_when) { test_std::inplace_stop_source source2; completion comp{completion::none}; auto state{test_std::connect(test_detail::stop_when(sender{}, source1.get_token()), - receiver{source2.get_token(), comp})}; + receiver{source2.get_token(), comp})}; ASSERT(comp == completion::none); test_std::start(state); ASSERT(comp == completion::none); From 6365b854a72db18dbcaf9a982b71ea9f0dd54bd8 Mon Sep 17 00:00:00 2001 From: Cra3z <3324654761@qq.com> Date: Sat, 15 Aug 2026 17:10:25 +0800 Subject: [PATCH 3/3] Remove duplicated word --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86227bbb..65302974 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ e.g.: - `let_value(sender, fun)` to produce a sender based on `sender`'s results. - `starts_on(scheduler, sender)` to start `sender` on `scheduler`. -- `continues_on(sender, scheduler)` to complete with with `sender`'s +- `continues_on(sender, scheduler)` to complete with `sender`'s results on `scheduler`. - `when_all(sender ...)` to complete when all `sender`s have completed.