diff --git a/include/beman/execution/detail/bulk.hpp b/include/beman/execution/detail/bulk.hpp index 0d9f181..ff2f482 100644 --- a/include/beman/execution/detail/bulk.hpp +++ b/include/beman/execution/detail/bulk.hpp @@ -28,13 +28,11 @@ #include #include - #include namespace beman::execution::detail { struct bulk_t { - template requires(::beman::execution::sender && std::is_integral_v && ::beman::execution::detail::movable_value) @@ -56,8 +54,8 @@ struct impls_for : ::beman::execution::detail::default_impls { Index, State& state, Rcvr& rcvr, Tag, Args&&... args) noexcept -> void requires(not::std::same_as || requires(State& s, Args&&... a) { - (s.template get<1>())(s.template get<0>(), ::std::forward(a)...); - }) + (s.template get<1>())(s.template get<0>(), ::std::forward(a)...); + }) { if constexpr (std::same_as) { auto& [shape, f] = state; @@ -98,12 +96,12 @@ struct completion_signatures_for_impl< using make_error_completions = ::beman::execution::completion_signatures<::beman::execution::set_error_t(const std::decay_t&)...>; - // Retrieves the value completion signatures from the Sender using Env, + // Retrieves the value completion signatures from the Sender using Env, // then applies `make_value_completions` to format them and merges all signatures. using value_completions = ::beman::execution:: value_types_of_t; - // Retrieves the error completion signatures from the Sender using Env, + // Retrieves the error completion signatures from the Sender using Env, // then applies make_error_completions to format them. using error_completions = ::beman::execution::error_types_of_t; @@ -111,7 +109,6 @@ struct completion_signatures_for_impl< ::beman::execution::completion_signatures<::beman::execution::set_stopped_t(), ::beman::execution::set_error_t(std::exception_ptr)>; - using type = ::beman::execution::detail::meta::unique< ::beman::execution::detail::meta::combine>; }; diff --git a/tests/beman/execution/exec-bulk.test.cpp b/tests/beman/execution/exec-bulk.test.cpp index 12bf6cc..e24ff98 100644 --- a/tests/beman/execution/exec-bulk.test.cpp +++ b/tests/beman/execution/exec-bulk.test.cpp @@ -7,39 +7,30 @@ #include #include +auto test_bulk() { + auto b0 = test_std::bulk(test_std::just(), 1, [](int) {}); + static_assert(test_std::sender); + int counter = 0; -auto test_bulk(){ - auto b0 = test_std::bulk(test_std::just(), 1, [](int) {}); - - static_assert(test_std::sender); - - int counter = 0; - - auto b1 = test_std::bulk(test_std::just(), 5, [&](int i) { - counter += i; - }); - - static_assert(test_std::sender); - test_std::sync_wait(b1); - ASSERT(counter == 10); + auto b1 = test_std::bulk(test_std::just(), 5, [&](int i) { counter += i; }); + static_assert(test_std::sender); + test_std::sync_wait(b1); + ASSERT(counter == 10); } -TEST(exec_bulk){ +TEST(exec_bulk) { + try { - try { + test_bulk(); - test_bulk(); + } catch (...) { - } catch (...) { - - ASSERT(nullptr == "the bulk tests shouldn't throw"); - } - - return EXIT_SUCCESS; + ASSERT(nullptr == "the bulk tests shouldn't throw"); + } + return EXIT_SUCCESS; } -