Skip to content

Fix noexcept#267

Merged
dietmarkuehl merged 4 commits intomainfrom
fix-noexcept
Apr 27, 2026
Merged

Fix noexcept#267
dietmarkuehl merged 4 commits intomainfrom
fix-noexcept

Conversation

@dietmarkuehl
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 27, 2026 07:49
@dietmarkuehl dietmarkuehl requested a review from camio as a code owner April 27, 2026 07:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to correct and validate noexcept specifications across the execution sender algorithms, and adds/extends tests to cover completion-signature behavior when callbacks are noexcept.

Changes:

  • Add new completion-signature tests for then and starts_on.
  • Tighten noexcept on several core APIs (then overloads, just, run_loop::get_scheduler, product_type::get) and adjust a starts_on internal lambda noexcept predicate.
  • Extend let tests with additional completion/noexcept assertions and add a small brace fix in let exception handling.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/beman/execution/exec-then.test.cpp Adds completion-signature runtime checks for then with throwing vs noexcept callbacks.
tests/beman/execution/exec-starts-on.test.cpp Adds completion-signature runtime checks around starts_on/let_value compositions.
tests/beman/execution/exec-let.test.cpp Adds a receiver type + additional static assertions around noexcept/connectability.
include/beman/execution/detail/then.hpp Adds conditional noexcept to then_t::operator() overloads.
include/beman/execution/detail/starts_on.hpp Adjusts the noexcept(...) condition on the internal lambda used by starts_on.
include/beman/execution/detail/run_loop.hpp Marks run_loop::get_scheduler() as noexcept.
include/beman/execution/detail/product_type.hpp Marks product_type_base::get() overloads as noexcept.
include/beman/execution/detail/let.hpp Adds braces around an if constexpr in exception handling (no behavioral change intended).
include/beman/execution/detail/just.hpp Adds conditional noexcept to just_t::operator().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

::beman::execution::schedule(scheduler),
[new_sender = ::beman::execution::detail::forward_like<Sender>(new_sender)]() mutable noexcept(
::std::is_nothrow_constructible_v<::std::decay_t<Sender>>) { return ::std::move(new_sender); });
::std::is_nothrow_constructible_v<::std::decay_t<Sender>, Sender>) {
test_std::sync_wait(test::completion_test(test_std::starts_on(test_std::inline_scheduler(),
test_std::just())));
test_std::sync_wait(test::completion_test(test_std::just() | test_std::then([]() noexcept {})));
test_std::sync_wait(test::completion_test(test_std::just() | test_std::then([]() noexcept {})));
Comment thread include/beman/execution/detail/then.hpp Outdated
template <::beman::execution::sender Sender, ::beman::execution::detail::movable_value Fun>
auto operator()(Sender&& sender, Fun&& fun) const {
auto operator()(Sender&& sender, Fun&& fun) const
noexcept(::std::is_nothrow_constructible_v<::std::remove_cvref_t<Sender>, Sender> &&
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 27, 2026

Coverage Status

coverage: 95.556% (+0.01%) from 95.542% — fix-noexcept into main

@dietmarkuehl dietmarkuehl merged commit afde940 into main Apr 27, 2026
38 checks passed
@dietmarkuehl dietmarkuehl deleted the fix-noexcept branch April 27, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants