From b9205c214cc0da6e52e97618b6f087e2fd9b7ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sat, 18 Jul 2026 22:41:36 +0100 Subject: [PATCH 1/2] fix header names --- README.md | 4 ++-- examples/affinity.cpp | 4 ++-- examples/aggregate_return.cpp | 4 ++-- examples/alloc.cpp | 4 ++-- examples/async_lock.cpp | 4 ++-- examples/co_await_result.cpp | 4 ++-- examples/container.cpp | 4 ++-- examples/cppnow_affinity.cpp | 6 +++--- examples/cppnow_allocator.cpp | 4 ++-- examples/cppnow_basic.cpp | 4 ++-- examples/cppnow_cancel.cpp | 4 ++-- examples/cppnow_errors.cpp | 4 ++-- examples/cppnow_query.cpp | 4 ++-- examples/cppnow_result_types.cpp | 4 ++-- examples/cppnow_return.cpp | 4 ++-- examples/cppnow_stop_token.cpp | 6 +++--- examples/cppnow_with_error.cpp | 4 ++-- examples/customize.cpp | 4 ++-- examples/dangling_references.cpp | 4 ++-- examples/environment.cpp | 6 +++--- examples/error.cpp | 4 ++-- examples/escaped_exception.cpp | 4 ++-- examples/friendly.cpp | 4 ++-- examples/into_optional.cpp | 4 ++-- examples/loop.cpp | 4 ++-- examples/query.cpp | 4 ++-- examples/result_example.cpp | 4 ++-- examples/rvalue_task.cpp | 4 ++-- examples/stop.cpp | 6 +++--- examples/task_scheduler.cpp | 4 ++-- include/beman/task.hpp | 9 +++++++++ include/beman/task/detail/allocator_of.hpp | 2 +- include/beman/task/detail/allocator_support.hpp | 2 +- include/beman/task/detail/find_allocator.hpp | 2 +- include/beman/task/detail/poly.hpp | 2 +- include/beman/task/detail/promise_base.hpp | 2 +- include/beman/task/detail/result_type.hpp | 6 +++--- include/beman/task/detail/scheduler_of.hpp | 2 +- include/beman/task/detail/sub_visit.hpp | 4 ++-- include/beman/task/detail/task_scheduler.hpp | 2 +- include/beman/task/detail/with_error.hpp | 2 +- include/beman/task/task.hpp | 2 +- src/beman/task/CMakeLists.txt | 1 + tests/beman/task/task.test.cpp | 4 ++-- 44 files changed, 90 insertions(+), 80 deletions(-) create mode 100644 include/beman/task.hpp diff --git a/README.md b/README.md index a474b89..7610884 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ using sender/receiver facilities to implement version of `hello, world`: ```cpp -#include -#include +#include +#include #include namespace ex = beman::execution; diff --git a/examples/affinity.cpp b/examples/affinity.cpp index c7c46ed..da815b4 100644 --- a/examples/affinity.cpp +++ b/examples/affinity.cpp @@ -1,8 +1,8 @@ // examples/affinity.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include "demo_thread_loop.hpp" #include #include diff --git a/examples/aggregate_return.cpp b/examples/aggregate_return.cpp index 2f52c83..3e8c5c4 100644 --- a/examples/aggregate_return.cpp +++ b/examples/aggregate_return.cpp @@ -1,8 +1,8 @@ // examples/aggregate_return.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/alloc.cpp b/examples/alloc.cpp index 5d01db5..78b5baa 100644 --- a/examples/alloc.cpp +++ b/examples/alloc.cpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/async_lock.cpp b/examples/async_lock.cpp index d5e5a6b..b13796b 100644 --- a/examples/async_lock.cpp +++ b/examples/async_lock.cpp @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/co_await_result.cpp b/examples/co_await_result.cpp index 8ab6403..4989933 100644 --- a/examples/co_await_result.cpp +++ b/examples/co_await_result.cpp @@ -1,8 +1,8 @@ // examples/co_await_result.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include diff --git a/examples/container.cpp b/examples/container.cpp index 7a538f2..4ed74ab 100644 --- a/examples/container.cpp +++ b/examples/container.cpp @@ -1,8 +1,8 @@ // examples/container.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include #include diff --git a/examples/cppnow_affinity.cpp b/examples/cppnow_affinity.cpp index 3caa767..f087502 100644 --- a/examples/cppnow_affinity.cpp +++ b/examples/cppnow_affinity.cpp @@ -1,9 +1,9 @@ // examples/cppnow_affinity.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include -#include +#include +#include +#include #include "demo_thread_loop.hpp" #include #include diff --git a/examples/cppnow_allocator.cpp b/examples/cppnow_allocator.cpp index 748d2f8..5e5772c 100644 --- a/examples/cppnow_allocator.cpp +++ b/examples/cppnow_allocator.cpp @@ -1,8 +1,8 @@ // examples/cppnow_alloctor.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include diff --git a/examples/cppnow_basic.cpp b/examples/cppnow_basic.cpp index 210f455..3bc6be5 100644 --- a/examples/cppnow_basic.cpp +++ b/examples/cppnow_basic.cpp @@ -1,8 +1,8 @@ // examples/cppnow_basic.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include diff --git a/examples/cppnow_cancel.cpp b/examples/cppnow_cancel.cpp index eca67e0..3953cf5 100644 --- a/examples/cppnow_cancel.cpp +++ b/examples/cppnow_cancel.cpp @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // ---------------------------------------------------------------------------- -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/cppnow_errors.cpp b/examples/cppnow_errors.cpp index 1279efd..76bf932 100644 --- a/examples/cppnow_errors.cpp +++ b/examples/cppnow_errors.cpp @@ -1,8 +1,8 @@ // examples/cppnow_errors.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include #include diff --git a/examples/cppnow_query.cpp b/examples/cppnow_query.cpp index 4a12e22..e5c6ebc 100644 --- a/examples/cppnow_query.cpp +++ b/examples/cppnow_query.cpp @@ -1,8 +1,8 @@ // examples/cppnow_query.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include namespace ex = beman::execution; diff --git a/examples/cppnow_result_types.cpp b/examples/cppnow_result_types.cpp index 2c1d3fa..4cf7477 100644 --- a/examples/cppnow_result_types.cpp +++ b/examples/cppnow_result_types.cpp @@ -1,8 +1,8 @@ // examples/cppnow_result_types.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include namespace ex = beman::execution; diff --git a/examples/cppnow_return.cpp b/examples/cppnow_return.cpp index e8e9445..311f769 100644 --- a/examples/cppnow_return.cpp +++ b/examples/cppnow_return.cpp @@ -1,8 +1,8 @@ // examples/cppnow_return.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include namespace ex = beman::execution; diff --git a/examples/cppnow_stop_token.cpp b/examples/cppnow_stop_token.cpp index 5fd6d50..ae576c3 100644 --- a/examples/cppnow_stop_token.cpp +++ b/examples/cppnow_stop_token.cpp @@ -1,9 +1,9 @@ // examples/cppnow_stop_token.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/examples/cppnow_with_error.cpp b/examples/cppnow_with_error.cpp index afc6528..c1a2229 100644 --- a/examples/cppnow_with_error.cpp +++ b/examples/cppnow_with_error.cpp @@ -1,8 +1,8 @@ // examples/cppnow_with_error.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include diff --git a/examples/customize.cpp b/examples/customize.cpp index 41e5d80..a1d45b1 100644 --- a/examples/customize.cpp +++ b/examples/customize.cpp @@ -1,8 +1,8 @@ // examples/customize.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include #include diff --git a/examples/dangling_references.cpp b/examples/dangling_references.cpp index a97cf94..8010a07 100644 --- a/examples/dangling_references.cpp +++ b/examples/dangling_references.cpp @@ -1,8 +1,8 @@ // examples/dangling_references.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include #include diff --git a/examples/environment.cpp b/examples/environment.cpp index f23e8c5..2cfa7c4 100644 --- a/examples/environment.cpp +++ b/examples/environment.cpp @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #ifndef _MSC_VER -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/examples/error.cpp b/examples/error.cpp index ca4c14b..4db3b30 100644 --- a/examples/error.cpp +++ b/examples/error.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/escaped_exception.cpp b/examples/escaped_exception.cpp index a041f04..a22e968 100644 --- a/examples/escaped_exception.cpp +++ b/examples/escaped_exception.cpp @@ -1,8 +1,8 @@ // examples/escaped_exception.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include diff --git a/examples/friendly.cpp b/examples/friendly.cpp index adb9213..2712a66 100644 --- a/examples/friendly.cpp +++ b/examples/friendly.cpp @@ -6,8 +6,8 @@ #include #include #include -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/into_optional.cpp b/examples/into_optional.cpp index badfd2c..2c83dde 100644 --- a/examples/into_optional.cpp +++ b/examples/into_optional.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/loop.cpp b/examples/loop.cpp index 766e7af..d9e3602 100644 --- a/examples/loop.cpp +++ b/examples/loop.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include namespace ex = beman::execution; diff --git a/examples/query.cpp b/examples/query.cpp index d0db8e1..c09bfaa 100644 --- a/examples/query.cpp +++ b/examples/query.cpp @@ -1,8 +1,8 @@ // examples/query.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include #include diff --git a/examples/result_example.cpp b/examples/result_example.cpp index fb52c73..4219cde 100644 --- a/examples/result_example.cpp +++ b/examples/result_example.cpp @@ -1,8 +1,8 @@ // examples/result_example.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include namespace ex = beman::execution; diff --git a/examples/rvalue_task.cpp b/examples/rvalue_task.cpp index 640a317..ba5db1f 100644 --- a/examples/rvalue_task.cpp +++ b/examples/rvalue_task.cpp @@ -1,8 +1,8 @@ // examples/rvalue_task.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include namespace ex = beman::execution; diff --git a/examples/stop.cpp b/examples/stop.cpp index bc5d183..bfe5eff 100644 --- a/examples/stop.cpp +++ b/examples/stop.cpp @@ -1,9 +1,9 @@ // examples/stop.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/examples/task_scheduler.cpp b/examples/task_scheduler.cpp index c02f5ce..9defade 100644 --- a/examples/task_scheduler.cpp +++ b/examples/task_scheduler.cpp @@ -1,8 +1,8 @@ // examples/task_scheduler.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include #include diff --git a/include/beman/task.hpp b/include/beman/task.hpp new file mode 100644 index 0000000..02fa962 --- /dev/null +++ b/include/beman/task.hpp @@ -0,0 +1,9 @@ +// include/beman/task.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#ifndef INCLUDED_INCLUDE_BEMAN_TASK +#define INCLUDED_INCLUDE_BEMAN_TASK + +#include + +#endif diff --git a/include/beman/task/detail/allocator_of.hpp b/include/beman/task/detail/allocator_of.hpp index e319c18..1ea51b4 100644 --- a/include/beman/task/detail/allocator_of.hpp +++ b/include/beman/task/detail/allocator_of.hpp @@ -12,7 +12,7 @@ namespace beman::task::detail { /*! * \brief Utility to get an allocator type from a context - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template diff --git a/include/beman/task/detail/allocator_support.hpp b/include/beman/task/detail/allocator_support.hpp index a3d3979..06c18f2 100644 --- a/include/beman/task/detail/allocator_support.hpp +++ b/include/beman/task/detail/allocator_support.hpp @@ -16,7 +16,7 @@ namespace beman::task::detail { /*! * \brief Utility adding allocator support to type by embedding the allocator - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * * To add allocator support using this class just publicly inherit from * allocator_support. This utility is probably diff --git a/include/beman/task/detail/find_allocator.hpp b/include/beman/task/detail/find_allocator.hpp index 0b21208..b2a3820 100644 --- a/include/beman/task/detail/find_allocator.hpp +++ b/include/beman/task/detail/find_allocator.hpp @@ -11,7 +11,7 @@ namespace beman::task::detail { /*! * \brief Utility locating an allocator_arg/allocator pair - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template diff --git a/include/beman/task/detail/poly.hpp b/include/beman/task/detail/poly.hpp index a48f92f..a82e4fd 100644 --- a/include/beman/task/detail/poly.hpp +++ b/include/beman/task/detail/poly.hpp @@ -14,7 +14,7 @@ namespace beman::task::detail { /*! * \brief Utility providing small object optimization and type erasure. - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template diff --git a/include/beman/task/detail/promise_base.hpp b/include/beman/task/detail/promise_base.hpp index 787577b..863d587 100644 --- a/include/beman/task/detail/promise_base.hpp +++ b/include/beman/task/detail/promise_base.hpp @@ -16,7 +16,7 @@ namespace beman::task::detail { /* * \brief Helper base class dealing with void vs. value results. - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template <::beman::task::detail::stoppable Stop, typename Value, typename Environment> diff --git a/include/beman/task/detail/result_type.hpp b/include/beman/task/detail/result_type.hpp index 7a8bffe..5c90f7c 100644 --- a/include/beman/task/detail/result_type.hpp +++ b/include/beman/task/detail/result_type.hpp @@ -16,20 +16,20 @@ namespace beman::task::detail { /** * \brief Helper type used as a placeholder for a void result - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ enum void_type : unsigned char {}; /** * \brief Helper type indicating whether a stopped result is possible - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ enum class stoppable { yes, no }; /** * \brief Type to hold the result of a coroutine - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp */ template <::beman::task::detail::stoppable Stop, typename Value, typename Errors> class result_type; diff --git a/include/beman/task/detail/scheduler_of.hpp b/include/beman/task/detail/scheduler_of.hpp index 35da97e..8bd2fe1 100644 --- a/include/beman/task/detail/scheduler_of.hpp +++ b/include/beman/task/detail/scheduler_of.hpp @@ -12,7 +12,7 @@ namespace beman::task::detail { /*! * \brief Utility to get a scheduler type from a context - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template diff --git a/include/beman/task/detail/sub_visit.hpp b/include/beman/task/detail/sub_visit.hpp index e4ca452..5f17bf1 100644 --- a/include/beman/task/detail/sub_visit.hpp +++ b/include/beman/task/detail/sub_visit.hpp @@ -15,7 +15,7 @@ namespace beman::task::detail { /* * \brief Helper function creatig thunks for a variant visit. - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template @@ -27,7 +27,7 @@ void sub_visit_thunks(Fun& fun, Var& var, std::index_sequence) { /* * \brief Helper function visiting a suffix of variant options - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ template diff --git a/include/beman/task/detail/task_scheduler.hpp b/include/beman/task/detail/task_scheduler.hpp index 89b3365..018ce7b 100644 --- a/include/beman/task/detail/task_scheduler.hpp +++ b/include/beman/task/detail/task_scheduler.hpp @@ -17,7 +17,7 @@ namespace beman::task::detail { /*! * \brief Type-erasing scheduler - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * * The class `task_scheduler` is used to type-erase any scheduler class. * Any error produced by the underlying scheduler except `std::error_code` is turned into diff --git a/include/beman/task/detail/with_error.hpp b/include/beman/task/detail/with_error.hpp index 2b0a7ef..fe04ca6 100644 --- a/include/beman/task/detail/with_error.hpp +++ b/include/beman/task/detail/with_error.hpp @@ -10,7 +10,7 @@ // ---------------------------------------------------------------------------- /* * \brief Tag type used to indicate an error is produced. - * \headerfile beman/task/task.hpp + * \headerfile beman/task.hpp * \internal */ namespace beman::task::detail { diff --git a/include/beman/task/task.hpp b/include/beman/task/task.hpp index 60d134d..18947ec 100644 --- a/include/beman/task/task.hpp +++ b/include/beman/task/task.hpp @@ -4,7 +4,7 @@ #ifndef INCLUDED_INCLUDE_BEMAN_TASK_TASK #define INCLUDED_INCLUDE_BEMAN_TASK_TASK -#include +#include #include #include #include diff --git a/src/beman/task/CMakeLists.txt b/src/beman/task/CMakeLists.txt index cc06e70..e307722 100644 --- a/src/beman/task/CMakeLists.txt +++ b/src/beman/task/CMakeLists.txt @@ -10,6 +10,7 @@ target_sources( FILE_SET HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR}/include FILES + ${PROJECT_SOURCE_DIR}/include/beman/task.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/task.hpp ${PROJECT_SOURCE_DIR}/include/beman/lazy/lazy.hpp ${PROJECT_SOURCE_DIR}/include/beman/task/task.hpp diff --git a/tests/beman/task/task.test.cpp b/tests/beman/task/task.test.cpp index 26c3dc7..d474f43 100644 --- a/tests/beman/task/task.test.cpp +++ b/tests/beman/task/task.test.cpp @@ -1,8 +1,8 @@ // tests/beman/task/task.test.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include -#include +#include +#include #include namespace ex = beman::execution; From b364916de8c4b2401536fdc6a69e50a10ec4904a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sat, 18 Jul 2026 22:52:56 +0100 Subject: [PATCH 2/2] fix compiler explorer link to point to an [eventually] working example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7610884..4fe4a3a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception --> -[![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model)![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg)[![Coverage](https://coveralls.io/repos/github/bemanproject/task/badge.svg?branch=main)](https://coveralls.io/github/bemanproject/task?branch=main)[![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org/z/e1sjsT46r) +[![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model)![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg)[![Coverage](https://coveralls.io/repos/github/bemanproject/task/badge.svg?branch=main)](https://coveralls.io/github/bemanproject/task?branch=main)[![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org/z/anYY59nYd) `beman::execution::task` is a class template which