Fix noexcept#267
Merged
dietmarkuehl merged 4 commits intomainfrom Apr 27, 2026
Merged
Conversation
There was a problem hiding this comment.
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
thenandstarts_on. - Tighten
noexcepton several core APIs (thenoverloads,just,run_loop::get_scheduler,product_type::get) and adjust astarts_oninternal lambdanoexceptpredicate. - Extend
lettests with additional completion/noexcept assertions and add a small brace fix inletexception 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 {}))); |
| 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> && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.