Skip to content

Fix various detail#101

Merged
dietmarkuehl merged 5 commits into
mainfrom
fix-various-detail
Jul 19, 2026
Merged

Fix various detail#101
dietmarkuehl merged 5 commits into
mainfrom
fix-various-detail

Conversation

@dietmarkuehl

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 19, 2026 15:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.hpp and install/export it via the task library’s header file set.
  • Update includes and Doxygen \headerfile references 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() calls make_signatures<Env>(...) with three arguments, but make_signatures is declared to take only two type_list parameters. 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.

@coveralls

coveralls commented Jul 19, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.248% (+0.4%) from 92.857% — fix-various-detail into main

@dietmarkuehl
dietmarkuehl merged commit 43ab22f into main Jul 19, 2026
36 checks passed
@dietmarkuehl
dietmarkuehl deleted the fix-various-detail branch July 19, 2026 15:42
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