Fix various detail#101
Merged
Merged
Conversation
dietmarkuehl
requested review from
bretbrownjr,
steve-downey and
wusatosi
as code owners
July 19, 2026 15:09
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes the public include surface by introducing an umbrella header for the task library (<beman/task.hpp>) and then migrating tests, documentation, and examples away from nested include paths (e.g. <beman/task/task.hpp>, <beman/execution/execution.hpp>) toward the new umbrella-style headers. It also updates several examples to use ex::write_env (instead of ex::detail::write_env) and adjusts some sender completion-signature plumbing for into_optional.
Changes:
- Add
include/beman/task.hppand install/export it via the task library’s header file set. - Update includes and Doxygen
\headerfilereferences to the new<beman/task.hpp>(and related umbrella headers in examples/docs/tests). - Update examples/CMakeLists to build previously disabled examples (query/stop/cppnow_query/cppnow_stop_token) and adjust example code to match the updated execution API surface.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/beman/task/task.test.cpp | Switch test includes to <beman/task.hpp> / <beman/execution.hpp>. |
| src/beman/task/CMakeLists.txt | Add include/beman/task.hpp to exported header file set. |
| README.md | Update documentation snippets to use umbrella includes and refresh CE link. |
| include/beman/task/task.hpp | Update dependency include to <beman/execution.hpp>. |
| include/beman/task/detail/with_error.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/task_scheduler.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/sub_visit.hpp | Update Doxygen \headerfile references to <beman/task.hpp>. |
| include/beman/task/detail/scheduler_of.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/result_type.hpp | Update Doxygen \headerfile references to <beman/task.hpp>. |
| include/beman/task/detail/promise_base.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/poly.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/into_optional.hpp | Refactor completion signature computation for into_optional. |
| include/beman/task/detail/find_allocator.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/allocator_support.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task/detail/allocator_of.hpp | Update Doxygen \headerfile reference to <beman/task.hpp>. |
| include/beman/task.hpp | Add new umbrella header that includes <beman/task/task.hpp>. |
| examples/task_scheduler.cpp | Switch includes to umbrella headers. |
| examples/stop.cpp | Switch includes to umbrella headers and update write_env call site. |
| examples/rvalue_task.cpp | Switch includes to umbrella headers. |
| examples/result_example.cpp | Switch includes to umbrella headers. |
| examples/query.cpp | Switch includes to umbrella headers and update write_env call sites. |
| examples/loop.cpp | Switch includes to umbrella headers. |
| examples/into_optional.cpp | Switch includes to umbrella headers and tweak example sender signatures/usage. |
| examples/friendly.cpp | Switch includes to umbrella headers. |
| examples/escaped_exception.cpp | Switch includes to umbrella headers. |
| examples/error.cpp | Switch includes to umbrella headers. |
| examples/environment.cpp | Switch includes to umbrella headers (task/execution/net). |
| examples/dangling_references.cpp | Switch includes to umbrella headers. |
| examples/customize.cpp | Switch includes to umbrella headers. |
| examples/cppnow_with_error.cpp | Switch includes to umbrella headers. |
| examples/cppnow_stop_token.cpp | Switch includes to umbrella headers and update write_env call site. |
| examples/cppnow_return.cpp | Switch includes to umbrella headers. |
| examples/cppnow_result_types.cpp | Switch includes to umbrella headers. |
| examples/cppnow_query.cpp | Switch includes to umbrella headers and adjust env-writing call sites. |
| examples/cppnow_errors.cpp | Switch includes to umbrella headers. |
| examples/cppnow_cancel.cpp | Switch includes to umbrella headers. |
| examples/cppnow_basic.cpp | Switch includes to umbrella headers. |
| examples/cppnow_allocator.cpp | Switch includes to umbrella headers. |
| examples/cppnow_affinity.cpp | Switch includes to umbrella headers (including stop_token). |
| examples/container.cpp | Switch includes to umbrella headers. |
| examples/co_await_result.cpp | Switch includes to umbrella headers. |
| examples/CMakeLists.txt | Enable building additional examples previously marked FIXME. |
| examples/async_lock.cpp | Switch includes to umbrella headers. |
| examples/alloc.cpp | Switch includes to umbrella headers. |
| examples/aggregate_return.cpp | Switch includes to umbrella headers. |
| examples/affinity.cpp | Switch includes to umbrella headers. |
Comments suppressed due to low confidence (1)
include/beman/task/detail/into_optional.hpp:73
get_completion_signatures()callsmake_signatures<Env>(...)with three arguments, butmake_signaturesis declared to take only twotype_listparameters. This makes the completion-signature computation ill-formed and will break compilation when this sender’s completion signatures are queried.
template <typename Env, typename... E, typename... S>
static consteval auto make_signatures(type_list<E...>, type_list<S...>) {
return ::beman::execution::completion_signatures<::beman::execution::set_value_t(
decltype(get_type<Env>())),
::beman::execution::set_error_t(E)...,
S...>();
}
template <typename, typename Env>
static consteval auto get_completion_signatures() {
static_assert(::beman::execution::sender<Upstream>);
static_assert(::beman::execution::sender_in<Upstream>);
static_assert(::beman::execution::sender_in<Upstream, Env>);
return make_signatures<Env>(
::beman::execution::value_types_of_t<Upstream, std::remove_cvref_t<Env>, type_list>{},
::beman::execution::error_types_of_t<Upstream, std::remove_cvref_t<Env>, type_list>{},
std::conditional_t<::beman::execution::sends_stopped<Upstream, std::remove_cvref_t<Env>>,
type_list<::beman::execution::set_stopped_t()>,
type_list<>>{});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.