From a071aa1ed6732960e2281648b6d564b7d32cb659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Tue, 27 Jan 2026 00:04:49 +0000 Subject: [PATCH 01/25] normalized headers and started to create a script to create a module file --- CMakeLists.txt | 5 + bin/mk-module.py | 117 ++++++++++++++++++ include/beman/execution/detail/affine_on.hpp | 17 +-- .../execution/detail/allocator_aware_move.hpp | 2 +- .../execution/detail/almost_scheduler.hpp | 2 +- .../beman/execution/detail/apply_sender.hpp | 2 +- .../beman/execution/detail/as_awaitable.hpp | 2 +- .../beman/execution/detail/as_except_ptr.hpp | 2 +- include/beman/execution/detail/as_tuple.hpp | 6 +- include/beman/execution/detail/associate.hpp | 6 +- .../detail/atomic_intrusive_stack.hpp | 2 +- .../execution/detail/await_result_type.hpp | 2 +- .../execution/detail/await_suspend_result.hpp | 2 +- .../execution/detail/awaitable_sender.hpp | 2 +- .../execution/detail/basic_operation.hpp | 2 +- .../beman/execution/detail/basic_receiver.hpp | 2 +- .../beman/execution/detail/basic_sender.hpp | 2 +- .../beman/execution/detail/basic_state.hpp | 2 +- include/beman/execution/detail/bulk.hpp | 2 +- .../beman/execution/detail/call_result_t.hpp | 2 +- include/beman/execution/detail/callable.hpp | 2 +- .../detail/check_type_alias_exist.hpp | 2 +- include/beman/execution/detail/child_type.hpp | 2 +- include/beman/execution/detail/class_type.hpp | 2 +- include/beman/execution/detail/common.hpp | 2 +- .../execution/detail/completion_domain.hpp | 2 +- .../execution/detail/completion_signature.hpp | 2 +- .../detail/completion_signatures.hpp | 2 +- .../detail/completion_signatures_for.hpp | 2 +- .../detail/completion_signatures_of_t.hpp | 2 +- .../beman/execution/detail/completion_tag.hpp | 2 +- include/beman/execution/detail/config.hpp | 13 ++ include/beman/execution/detail/connect.hpp | 2 +- .../beman/execution/detail/connect_all.hpp | 2 +- .../execution/detail/connect_all_result.hpp | 6 +- .../execution/detail/connect_awaitable.hpp | 2 +- .../execution/detail/connect_result_t.hpp | 2 +- .../beman/execution/detail/continues_on.hpp | 2 +- .../beman/execution/detail/counting_scope.hpp | 6 +- .../execution/detail/counting_scope_base.hpp | 6 +- .../execution/detail/counting_scope_join.hpp | 6 +- .../execution/detail/decayed_same_as.hpp | 2 +- .../beman/execution/detail/decayed_tuple.hpp | 2 +- .../execution/detail/decayed_type_list.hpp | 2 +- .../beman/execution/detail/decayed_typeof.hpp | 2 +- include/beman/execution/detail/decays_to.hpp | 2 +- .../beman/execution/detail/default_domain.hpp | 2 +- .../beman/execution/detail/default_impls.hpp | 2 +- .../beman/execution/detail/emplace_from.hpp | 2 +- include/beman/execution/detail/env.hpp | 6 +- include/beman/execution/detail/env_of_t.hpp | 2 +- .../beman/execution/detail/env_promise.hpp | 2 +- include/beman/execution/detail/env_type.hpp | 2 +- .../execution/detail/error_types_of_t.hpp | 2 +- .../beman/execution/detail/forward_like.hpp | 2 +- .../execution/detail/forwarding_query.hpp | 2 +- include/beman/execution/detail/fwd_env.hpp | 2 +- .../execution/detail/gather_signatures.hpp | 2 +- .../beman/execution/detail/get_allocator.hpp | 2 +- .../beman/execution/detail/get_awaiter.hpp | 2 +- .../detail/get_completion_scheduler.hpp | 2 +- .../detail/get_completion_signatures.hpp | 2 +- .../detail/get_delegation_scheduler.hpp | 2 +- include/beman/execution/detail/get_domain.hpp | 2 +- .../execution/detail/get_domain_early.hpp | 2 +- .../execution/detail/get_domain_late.hpp | 2 +- include/beman/execution/detail/get_env.hpp | 2 +- .../beman/execution/detail/get_scheduler.hpp | 2 +- .../beman/execution/detail/get_stop_token.hpp | 2 +- .../execution/detail/has_as_awaitable.hpp | 2 +- .../execution/detail/has_completions.hpp | 2 +- include/beman/execution/detail/immovable.hpp | 2 +- include/beman/execution/detail/impls_for.hpp | 2 +- .../beman/execution/detail/indices_for.hpp | 2 +- .../execution/detail/indirect_meta_apply.hpp | 2 +- .../execution/detail/inplace_stop_source.hpp | 2 +- .../beman/execution/detail/into_variant.hpp | 2 +- .../execution/detail/intrusive_stack.hpp | 2 +- .../beman/execution/detail/is_awaitable.hpp | 2 +- include/beman/execution/detail/is_awaiter.hpp | 2 +- include/beman/execution/detail/join_env.hpp | 2 +- include/beman/execution/detail/just.hpp | 2 +- include/beman/execution/detail/let.hpp | 2 +- include/beman/execution/detail/make_env.hpp | 2 +- .../beman/execution/detail/make_sender.hpp | 2 +- .../beman/execution/detail/matching_sig.hpp | 2 +- .../beman/execution/detail/meta_combine.hpp | 2 +- .../execution/detail/meta_contain_same.hpp | 6 +- .../beman/execution/detail/meta_contains.hpp | 2 +- .../beman/execution/detail/meta_filter.hpp | 2 +- .../beman/execution/detail/meta_prepend.hpp | 2 +- include/beman/execution/detail/meta_size.hpp | 2 +- include/beman/execution/detail/meta_to.hpp | 2 +- .../beman/execution/detail/meta_transform.hpp | 2 +- .../beman/execution/detail/meta_unique.hpp | 2 +- .../beman/execution/detail/movable_value.hpp | 2 +- .../detail/nested_sender_has_affine_on.hpp | 6 +- .../execution/detail/never_stop_token.hpp | 2 +- .../beman/execution/detail/non_assignable.hpp | 6 +- .../beman/execution/detail/nostopstate.hpp | 2 +- .../execution/detail/nothrow_callable.hpp | 2 +- include/beman/execution/detail/notify.hpp | 2 +- include/beman/execution/detail/on.hpp | 28 +---- .../execution/detail/on_stop_request.hpp | 2 +- .../execution/detail/operation_state.hpp | 2 +- .../execution/detail/operation_state_task.hpp | 2 +- .../beman/execution/detail/product_type.hpp | 6 +- include/beman/execution/detail/prop.hpp | 6 +- .../execution/detail/query_with_default.hpp | 2 +- include/beman/execution/detail/queryable.hpp | 2 +- include/beman/execution/detail/read_env.hpp | 2 +- include/beman/execution/detail/receiver.hpp | 2 +- .../beman/execution/detail/receiver_of.hpp | 2 +- include/beman/execution/detail/run_loop.hpp | 2 +- .../beman/execution/detail/sched_attrs.hpp | 2 +- include/beman/execution/detail/sched_env.hpp | 2 +- include/beman/execution/detail/schedule.hpp | 2 +- .../beman/execution/detail/schedule_from.hpp | 2 +- .../execution/detail/schedule_result_t.hpp | 2 +- include/beman/execution/detail/scheduler.hpp | 2 +- .../beman/execution/detail/scheduler_t.hpp | 2 +- .../beman/execution/detail/scope_token.hpp | 6 +- include/beman/execution/detail/sender.hpp | 2 +- .../beman/execution/detail/sender_adaptor.hpp | 2 +- .../detail/sender_adaptor_closure.hpp | 2 +- .../execution/detail/sender_awaitable.hpp | 2 +- .../execution/detail/sender_decompose.hpp | 2 +- include/beman/execution/detail/sender_for.hpp | 2 +- .../execution/detail/sender_has_affine_on.hpp | 6 +- include/beman/execution/detail/sender_in.hpp | 2 +- .../beman/execution/detail/sends_stopped.hpp | 2 +- include/beman/execution/detail/set_error.hpp | 2 +- .../beman/execution/detail/set_stopped.hpp | 2 +- include/beman/execution/detail/set_value.hpp | 2 +- .../execution/detail/simple_allocator.hpp | 2 +- .../detail/simple_counting_scope.hpp | 2 +- .../beman/execution/detail/single_sender.hpp | 2 +- .../detail/single_sender_value_type.hpp | 2 +- include/beman/execution/detail/spawn.hpp | 6 +- .../beman/execution/detail/spawn_future.hpp | 6 +- .../execution/detail/spawn_get_allocator.hpp | 6 +- include/beman/execution/detail/split.hpp | 2 +- include/beman/execution/detail/start.hpp | 2 +- include/beman/execution/detail/starts_on.hpp | 2 +- include/beman/execution/detail/state_type.hpp | 2 +- .../execution/detail/stop_callback_for_t.hpp | 2 +- .../beman/execution/detail/stop_source.hpp | 2 +- .../execution/detail/stop_token_of_t.hpp | 2 +- include/beman/execution/detail/stop_when.hpp | 6 +- .../execution/detail/stoppable_source.hpp | 2 +- .../execution/detail/stoppable_token.hpp | 2 +- .../beman/execution/detail/suppress_pop.hpp | 6 +- .../beman/execution/detail/suppress_push.hpp | 4 +- .../execution/detail/suspend_complete.hpp | 2 +- include/beman/execution/detail/sync_wait.hpp | 2 +- include/beman/execution/detail/tag_of_t.hpp | 2 +- include/beman/execution/detail/then.hpp | 2 +- .../execution/detail/transform_sender.hpp | 2 +- include/beman/execution/detail/type_list.hpp | 2 +- .../execution/detail/unspecified_promise.hpp | 2 +- .../execution/detail/unstoppable_token.hpp | 2 +- .../execution/detail/valid_completion_for.hpp | 4 +- .../detail/valid_completion_signatures.hpp | 2 +- .../execution/detail/valid_specialization.hpp | 2 +- .../execution/detail/value_types_of_t.hpp | 2 +- .../execution/detail/variant_or_empty.hpp | 2 +- include/beman/execution/detail/when_all.hpp | 2 +- .../detail/when_all_with_variant.hpp | 2 +- .../execution/detail/with_await_transform.hpp | 2 +- .../detail/with_awaitable_senders.hpp | 2 +- include/beman/execution/detail/write_env.hpp | 2 +- include/beman/execution/execution.hpp | 2 +- include/beman/execution/functional.hpp | 2 +- include/beman/execution/stop_token.hpp | 2 +- include/beman/execution26/execution.hpp | 6 +- include/beman/execution26/stop_token.hpp | 6 +- 176 files changed, 355 insertions(+), 255 deletions(-) create mode 100755 bin/mk-module.py create mode 100644 include/beman/execution/detail/config.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 409e197c..f4920dff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,11 @@ if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES) return() endif() +set(CMAKE_CXX_SCAN_FOR_MODULES ON) +add_library(beman_execution) +target_sources(beman_execution PUBLIC FILE_SET modules_public TYPE CXX_MODULES + FILES modules/execution.cppm) + include(CMakePackageConfigHelpers) write_basic_package_version_file( diff --git a/bin/mk-module.py b/bin/mk-module.py new file mode 100755 index 00000000..eac92b98 --- /dev/null +++ b/bin/mk-module.py @@ -0,0 +1,117 @@ +#!/usr/bin/python3 +# bin/mk-module.py +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import glob +import os +import re +import sys + +head_re = re.compile("include/(?P.*)\.hpp") + + +def clean_name(file): + match = head_re.match(file) + return match.group("name") + + +top = [] +for toplevel in glob.glob("include/?eman/*/*.hpp"): + top.append(clean_name(toplevel)) + +all = top.copy() +for detail in glob.glob("include/?eman/*/?etail/*.hpp"): + all.append(clean_name(detail)) + +headers = {} +beman_re = re.compile('#include ["<](?P[bB]eman/.*)\.hpp[">]') +other_re = re.compile('#include ["<](?P.*)[">]') +included_re = re.compile('.*INCLUDED_BEMAN.*') +file_re = re.compile('// include/beman\S*\s*-.-C..-.-') +spdx_re = re.compile('.*SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.*') + + + +def include_this_line(line): + return not beman_re.match(line) and not other_re.match(line) and not included_re.match(line) and not file_re.match(line) and not spdx_re.match(line) + + +def get_dependencies(component): + deps = [] + with open("include/" + component + ".hpp") as file: + for line in file.readlines(): + if beman_re.match(line): + deps.append(beman_re.match(line).group("name")) + elif other_re.match(line): + header = other_re.match(line).group("name") + if header not in headers: + headers[header] = 1 + + return deps + + +dependencies = {} + +for component in all: + dependencies[component] = get_dependencies(component) + +if len(sys.argv) != 2: + print(f"usage: {sys.argv[0]} ") + sys.exit(1) + +module_file = sys.argv[1] + +project_re = re.compile("(?P(?P[bB]eman)/.*)/") +define_re = re.compile("#define") + + +def write_header(to, header): + with open(f"include/{header}.hpp") as file: + for line in file.readlines(): + if include_this_line(line): + to.write(line) + + +deps = {} +def build_header(file, to, header): + todo = dependencies[header].copy() + while 0 < len(todo): + if not todo[0] in deps: + deps[todo[0]] = dependencies[todo[0]].copy() + for new in dependencies[todo[0]]: + todo.append(new) + todo = todo[1:] + +with open(module_file, "w") as to: + to.write("// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n\n") + to.write("#ifdef USE_STD_MODULE\n") + to.write("import std;\n") + to.write("#else\n") + includes = list(headers.keys()) + for include in sorted(includes): + to.write(f"#include <{include}>\n") + to.write("#endif\n\n") + + to.write("module beman.execution;\n\n") + + for header in top: + if re.match(".*execution26.*", header): + continue + print(f"Building module for {header}") + + prolog_done = False + with open(f"include/{header}.hpp") as file: + for line in file.readlines(): + if not prolog_done and define_re.match(line): + prolog_done = True + to.write("\n") + build_header(file, to, header) + to.write("\n") + + while 0 < len(deps): + empty = [item for item in deps.keys() if 0 == len(deps[item])] + for e in empty: + write_header(to, e) + deps.pop(e, None) + for d in deps.keys(): + deps[d] = [item for item in deps[d] if e != item] diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index 35a6288e..251cd00d 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/affine_on.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_AFFINE_ON -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_AFFINE_ON +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_AFFINE_ON +#define INCLUDED_BEMAN_EXECUTION_DETAIL_AFFINE_ON #include #include @@ -115,16 +115,7 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { [[maybe_unused]] auto& [tag, data, child] = sender; using child_tag_t = ::beman::execution::tag_of_t<::std::remove_cvref_t>; -#if 0 - if constexpr (requires(const child_tag_t& t) { - { - t.affine_on(::beman::execution::detail::forward_like(child), ev) - } -> ::beman::execution::sender; - }) -#else - if constexpr (::beman::execution::detail::nested_sender_has_affine_on) -#endif - { + if constexpr (::beman::execution::detail::nested_sender_has_affine_on) { constexpr child_tag_t t{}; return t.affine_on(::beman::execution::detail::forward_like(child), ev); } else { @@ -152,4 +143,4 @@ inline constexpr affine_on_t affine_on{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_AFFINE_ON diff --git a/include/beman/execution/detail/allocator_aware_move.hpp b/include/beman/execution/detail/allocator_aware_move.hpp index baf1ffa0..8f0f6d11 100644 --- a/include/beman/execution/detail/allocator_aware_move.hpp +++ b/include/beman/execution/detail/allocator_aware_move.hpp @@ -41,4 +41,4 @@ auto allocator_aware_move(T&& obj, Context&& context) noexcept -> decltype(auto) // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ALLOCATOR_AWARE_MOVE diff --git a/include/beman/execution/detail/almost_scheduler.hpp b/include/beman/execution/detail/almost_scheduler.hpp index ff597ec6..5e3bec1e 100644 --- a/include/beman/execution/detail/almost_scheduler.hpp +++ b/include/beman/execution/detail/almost_scheduler.hpp @@ -34,4 +34,4 @@ concept almost_scheduler = ::std::derived_from @@ -30,4 +30,4 @@ using as_tuple_t = typename ::beman::execution::detail::as_tuple::type; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_AS_TUPLE diff --git a/include/beman/execution/detail/associate.hpp b/include/beman/execution/detail/associate.hpp index d8b76717..a46843ff 100644 --- a/include/beman/execution/detail/associate.hpp +++ b/include/beman/execution/detail/associate.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/associate.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_ASSOCIATE -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_ASSOCIATE +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ASSOCIATE +#define INCLUDED_BEMAN_EXECUTION_DETAIL_ASSOCIATE #include #include @@ -160,4 +160,4 @@ inline constexpr associate_t associate{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ASSOCIATE diff --git a/include/beman/execution/detail/atomic_intrusive_stack.hpp b/include/beman/execution/detail/atomic_intrusive_stack.hpp index 522d1533..7983e688 100644 --- a/include/beman/execution/detail/atomic_intrusive_stack.hpp +++ b/include/beman/execution/detail/atomic_intrusive_stack.hpp @@ -85,4 +85,4 @@ class atomic_intrusive_stack { } // namespace beman::execution::detail -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ATOMIC_INTRUSIVE_STACK diff --git a/include/beman/execution/detail/await_result_type.hpp b/include/beman/execution/detail/await_result_type.hpp index 314a8c2a..0cbba0ed 100644 --- a/include/beman/execution/detail/await_result_type.hpp +++ b/include/beman/execution/detail/await_result_type.hpp @@ -22,4 +22,4 @@ using await_result_type = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_AWAIT_RESULT_TYPE diff --git a/include/beman/execution/detail/await_suspend_result.hpp b/include/beman/execution/detail/await_suspend_result.hpp index 3cbda126..1d9e67de 100644 --- a/include/beman/execution/detail/await_suspend_result.hpp +++ b/include/beman/execution/detail/await_suspend_result.hpp @@ -38,4 +38,4 @@ concept await_suspend_result = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_AWAIT_SUSPEND_RESULT diff --git a/include/beman/execution/detail/awaitable_sender.hpp b/include/beman/execution/detail/awaitable_sender.hpp index abfc6e63..c26834d3 100644 --- a/include/beman/execution/detail/awaitable_sender.hpp +++ b/include/beman/execution/detail/awaitable_sender.hpp @@ -18,4 +18,4 @@ concept awaitable_sender = }; } // namespace beman::execution::detail -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_AWAITABLE_SENDER diff --git a/include/beman/execution/detail/basic_operation.hpp b/include/beman/execution/detail/basic_operation.hpp index 8873c28c..9905c2d3 100644 --- a/include/beman/execution/detail/basic_operation.hpp +++ b/include/beman/execution/detail/basic_operation.hpp @@ -66,4 +66,4 @@ basic_operation(Sender&&, Receiver&&) -> basic_operation; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_BASIC_OPERATION diff --git a/include/beman/execution/detail/basic_receiver.hpp b/include/beman/execution/detail/basic_receiver.hpp index 8cf22e5e..4bc574c9 100644 --- a/include/beman/execution/detail/basic_receiver.hpp +++ b/include/beman/execution/detail/basic_receiver.hpp @@ -82,4 +82,4 @@ template // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_BASIC_RECEIVER diff --git a/include/beman/execution/detail/basic_sender.hpp b/include/beman/execution/detail/basic_sender.hpp index 7884cbb2..809fd79a 100644 --- a/include/beman/execution/detail/basic_sender.hpp +++ b/include/beman/execution/detail/basic_sender.hpp @@ -108,4 +108,4 @@ struct basic_sender : ::beman::execution::detail::product_type -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_BASIC_SENDER diff --git a/include/beman/execution/detail/basic_state.hpp b/include/beman/execution/detail/basic_state.hpp index 5b43d9ec..1b36f506 100644 --- a/include/beman/execution/detail/basic_state.hpp +++ b/include/beman/execution/detail/basic_state.hpp @@ -35,4 +35,4 @@ basic_state(Sender&&, Receiver&&) -> basic_state; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_BASIC_STATE diff --git a/include/beman/execution/detail/bulk.hpp b/include/beman/execution/detail/bulk.hpp index d1453ccf..e70d6b0f 100644 --- a/include/beman/execution/detail/bulk.hpp +++ b/include/beman/execution/detail/bulk.hpp @@ -138,4 +138,4 @@ inline constexpr ::beman::execution::bulk_t bulk{}; } // namespace beman::execution -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_BULK diff --git a/include/beman/execution/detail/call_result_t.hpp b/include/beman/execution/detail/call_result_t.hpp index a29e8fe2..9cb79433 100644 --- a/include/beman/execution/detail/call_result_t.hpp +++ b/include/beman/execution/detail/call_result_t.hpp @@ -20,4 +20,4 @@ using call_result_t = decltype(::std::declval()(std::declval()...)); // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CALL_RESULT diff --git a/include/beman/execution/detail/callable.hpp b/include/beman/execution/detail/callable.hpp index c1c61c22..63d8947b 100644 --- a/include/beman/execution/detail/callable.hpp +++ b/include/beman/execution/detail/callable.hpp @@ -21,4 +21,4 @@ concept callable = requires(Fun&& fun, Args&&... args) { ::std::forward(fun // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CALLABLE diff --git a/include/beman/execution/detail/check_type_alias_exist.hpp b/include/beman/execution/detail/check_type_alias_exist.hpp index c305690a..500c3011 100644 --- a/include/beman/execution/detail/check_type_alias_exist.hpp +++ b/include/beman/execution/detail/check_type_alias_exist.hpp @@ -18,4 +18,4 @@ struct check_type_alias_exist; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CHECK_TYPE_ALIAS_EXIST diff --git a/include/beman/execution/detail/child_type.hpp b/include/beman/execution/detail/child_type.hpp index e3cab29b..f9723ace 100644 --- a/include/beman/execution/detail/child_type.hpp +++ b/include/beman/execution/detail/child_type.hpp @@ -21,4 +21,4 @@ using child_type = decltype(::std::declval().template get()); // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CHILD_TYPE diff --git a/include/beman/execution/detail/class_type.hpp b/include/beman/execution/detail/class_type.hpp index 88dbc582..95e84f24 100644 --- a/include/beman/execution/detail/class_type.hpp +++ b/include/beman/execution/detail/class_type.hpp @@ -21,4 +21,4 @@ concept class_type = ::beman::execution::detail::decays_to && ::std::is_ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CLASS_TYPE diff --git a/include/beman/execution/detail/common.hpp b/include/beman/execution/detail/common.hpp index 95528a5d..055ba2b9 100644 --- a/include/beman/execution/detail/common.hpp +++ b/include/beman/execution/detail/common.hpp @@ -60,4 +60,4 @@ namespace detail {} // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMMON diff --git a/include/beman/execution/detail/completion_domain.hpp b/include/beman/execution/detail/completion_domain.hpp index f9d1e72e..83642d94 100644 --- a/include/beman/execution/detail/completion_domain.hpp +++ b/include/beman/execution/detail/completion_domain.hpp @@ -65,4 +65,4 @@ constexpr auto completion_domain(const Sender& sender) noexcept { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_DOMAIN diff --git a/include/beman/execution/detail/completion_signature.hpp b/include/beman/execution/detail/completion_signature.hpp index 49ff4165..efc26af1 100644 --- a/include/beman/execution/detail/completion_signature.hpp +++ b/include/beman/execution/detail/completion_signature.hpp @@ -46,4 +46,4 @@ concept completion_signature = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURE diff --git a/include/beman/execution/detail/completion_signatures.hpp b/include/beman/execution/detail/completion_signatures.hpp index f520a0c9..5cab0339 100644 --- a/include/beman/execution/detail/completion_signatures.hpp +++ b/include/beman/execution/detail/completion_signatures.hpp @@ -26,4 +26,4 @@ struct completion_signatures {}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES diff --git a/include/beman/execution/detail/completion_signatures_for.hpp b/include/beman/execution/detail/completion_signatures_for.hpp index 6c4d5744..45d604b7 100644 --- a/include/beman/execution/detail/completion_signatures_for.hpp +++ b/include/beman/execution/detail/completion_signatures_for.hpp @@ -45,4 +45,4 @@ using completion_signatures_for = ::std::conditional_t< // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES_FOR diff --git a/include/beman/execution/detail/completion_signatures_of_t.hpp b/include/beman/execution/detail/completion_signatures_of_t.hpp index c1889484..3819fbec 100644 --- a/include/beman/execution/detail/completion_signatures_of_t.hpp +++ b/include/beman/execution/detail/completion_signatures_of_t.hpp @@ -24,4 +24,4 @@ using completion_signatures_of_t = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES_OF diff --git a/include/beman/execution/detail/completion_tag.hpp b/include/beman/execution/detail/completion_tag.hpp index 7f092e61..751356b0 100644 --- a/include/beman/execution/detail/completion_tag.hpp +++ b/include/beman/execution/detail/completion_tag.hpp @@ -25,4 +25,4 @@ concept completion_tag = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_TAG diff --git a/include/beman/execution/detail/config.hpp b/include/beman/execution/detail/config.hpp new file mode 100644 index 00000000..4ef5fc4c --- /dev/null +++ b/include/beman/execution/detail/config.hpp @@ -0,0 +1,13 @@ +// include/beman/execution/detail/config.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_CONFIG +#define INCLUDED_BEMAN_EXECUTION_DETAIL_CONFIG + +// ---------------------------------------------------------------------------- + +#define BEMAN_EXECUTION_EXPORT + +// ---------------------------------------------------------------------------- + +#endif diff --git a/include/beman/execution/detail/connect.hpp b/include/beman/execution/detail/connect.hpp index 50fcb2af..d98d9f06 100644 --- a/include/beman/execution/detail/connect.hpp +++ b/include/beman/execution/detail/connect.hpp @@ -95,4 +95,4 @@ inline constexpr connect_t connect{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT diff --git a/include/beman/execution/detail/connect_all.hpp b/include/beman/execution/detail/connect_all.hpp index 8efc91bf..7ce0c42c 100644 --- a/include/beman/execution/detail/connect_all.hpp +++ b/include/beman/execution/detail/connect_all.hpp @@ -128,4 +128,4 @@ inline constexpr connect_all_t connect_all{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_ALL diff --git a/include/beman/execution/detail/connect_all_result.hpp b/include/beman/execution/detail/connect_all_result.hpp index 3a479dac..400cbdaa 100644 --- a/include/beman/execution/detail/connect_all_result.hpp +++ b/include/beman/execution/detail/connect_all_result.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/connect_all_result.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_CONNECT_ALL_RESULT -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_CONNECT_ALL_RESULT +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_ALL_RESULT +#define INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_ALL_RESULT #include #include @@ -27,4 +27,4 @@ using connect_all_result = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_ALL_RESULT diff --git a/include/beman/execution/detail/connect_awaitable.hpp b/include/beman/execution/detail/connect_awaitable.hpp index 46556496..800bab34 100644 --- a/include/beman/execution/detail/connect_awaitable.hpp +++ b/include/beman/execution/detail/connect_awaitable.hpp @@ -88,4 +88,4 @@ auto connect_awaitable(Awaiter awaiter, Receiver receiver) // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_AWAITABLE diff --git a/include/beman/execution/detail/connect_result_t.hpp b/include/beman/execution/detail/connect_result_t.hpp index 829656fb..bed747d4 100644 --- a/include/beman/execution/detail/connect_result_t.hpp +++ b/include/beman/execution/detail/connect_result_t.hpp @@ -20,4 +20,4 @@ using connect_result_t = decltype(::beman::execution::connect(::std::declval #include @@ -59,4 +59,4 @@ inline auto beman::execution::counting_scope::get_token() noexcept -> beman::exe return beman::execution::counting_scope::token(this); } -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE diff --git a/include/beman/execution/detail/counting_scope_base.hpp b/include/beman/execution/detail/counting_scope_base.hpp index b902f0b8..913829c8 100644 --- a/include/beman/execution/detail/counting_scope_base.hpp +++ b/include/beman/execution/detail/counting_scope_base.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/counting_scope_base.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_BASE -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_BASE +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_BASE +#define INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_BASE #include #include @@ -164,4 +164,4 @@ inline auto beman::execution::detail::counting_scope_base::start_node(node* n) - // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_BASE diff --git a/include/beman/execution/detail/counting_scope_join.hpp b/include/beman/execution/detail/counting_scope_join.hpp index 0673242c..369103cb 100644 --- a/include/beman/execution/detail/counting_scope_join.hpp +++ b/include/beman/execution/detail/counting_scope_join.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/counting_scope_join.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_JOIN -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_JOIN +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_JOIN +#define INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_JOIN #include #include @@ -84,4 +84,4 @@ struct impls_for<::beman::execution::detail::counting_scope_join_t> : ::beman::e // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE_JOIN diff --git a/include/beman/execution/detail/decayed_same_as.hpp b/include/beman/execution/detail/decayed_same_as.hpp index 6a24fca0..3256460c 100644 --- a/include/beman/execution/detail/decayed_same_as.hpp +++ b/include/beman/execution/detail/decayed_same_as.hpp @@ -21,4 +21,4 @@ concept decayed_same_as = ::std::same_as<::std::remove_cvref_t, ::std::remov // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_DECAYED_SAME_AS diff --git a/include/beman/execution/detail/decayed_tuple.hpp b/include/beman/execution/detail/decayed_tuple.hpp index 41e574e7..3deafe6b 100644 --- a/include/beman/execution/detail/decayed_tuple.hpp +++ b/include/beman/execution/detail/decayed_tuple.hpp @@ -21,4 +21,4 @@ using decayed_tuple = ::std::tuple<::std::decay_t...>; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_DECAYED_TUPLE diff --git a/include/beman/execution/detail/decayed_type_list.hpp b/include/beman/execution/detail/decayed_type_list.hpp index d6165085..3f15961d 100644 --- a/include/beman/execution/detail/decayed_type_list.hpp +++ b/include/beman/execution/detail/decayed_type_list.hpp @@ -17,4 +17,4 @@ using decayed_type_list = ::beman::execution::detail::type_list<::std::decay_t; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_DECAYED_TYPEOF diff --git a/include/beman/execution/detail/decays_to.hpp b/include/beman/execution/detail/decays_to.hpp index 3f88166b..80a7421a 100644 --- a/include/beman/execution/detail/decays_to.hpp +++ b/include/beman/execution/detail/decays_to.hpp @@ -21,4 +21,4 @@ concept decays_to = ::std::same_as<::std::decay_t, To>; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_DECAYS_TO diff --git a/include/beman/execution/detail/default_domain.hpp b/include/beman/execution/detail/default_domain.hpp index ab271c13..a3301932 100644 --- a/include/beman/execution/detail/default_domain.hpp +++ b/include/beman/execution/detail/default_domain.hpp @@ -83,4 +83,4 @@ struct default_domain { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_DEFAULT_DOMAIN diff --git a/include/beman/execution/detail/default_impls.hpp b/include/beman/execution/detail/default_impls.hpp index 14e10c86..041ac2b7 100644 --- a/include/beman/execution/detail/default_impls.hpp +++ b/include/beman/execution/detail/default_impls.hpp @@ -65,4 +65,4 @@ struct default_impls { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_DEFAULT_IMPLS diff --git a/include/beman/execution/detail/emplace_from.hpp b/include/beman/execution/detail/emplace_from.hpp index 781c3bbc..a54dab2a 100644 --- a/include/beman/execution/detail/emplace_from.hpp +++ b/include/beman/execution/detail/emplace_from.hpp @@ -32,4 +32,4 @@ emplace_from(Fun&&) -> emplace_from<::std::remove_cvref_t>; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_EMPLACE_FROM diff --git a/include/beman/execution/detail/env.hpp b/include/beman/execution/detail/env.hpp index b7b6610c..9f167e5e 100644 --- a/include/beman/execution/detail/env.hpp +++ b/include/beman/execution/detail/env.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/env.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_ENV -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_ENV +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ENV +#define INCLUDED_BEMAN_EXECUTION_DETAIL_ENV #include #include @@ -60,4 +60,4 @@ struct beman::execution::env : ::beman::execution::detail::env_base... { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ENV diff --git a/include/beman/execution/detail/env_of_t.hpp b/include/beman/execution/detail/env_of_t.hpp index 08e7f365..e22b80af 100644 --- a/include/beman/execution/detail/env_of_t.hpp +++ b/include/beman/execution/detail/env_of_t.hpp @@ -20,4 +20,4 @@ using env_of_t = decltype(::beman::execution::get_env(::std::declval())); // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ENV_OF diff --git a/include/beman/execution/detail/env_promise.hpp b/include/beman/execution/detail/env_promise.hpp index 14fd5134..e5993e5b 100644 --- a/include/beman/execution/detail/env_promise.hpp +++ b/include/beman/execution/detail/env_promise.hpp @@ -29,4 +29,4 @@ struct env_promise : ::beman::execution::detail::with_await_transform { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ENV_PROMISE diff --git a/include/beman/execution/detail/env_type.hpp b/include/beman/execution/detail/env_type.hpp index 19f517af..2f6a54af 100644 --- a/include/beman/execution/detail/env_type.hpp +++ b/include/beman/execution/detail/env_type.hpp @@ -28,4 +28,4 @@ using env_type = ::beman::execution::detail::call_result_t< // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ENV_TYPE diff --git a/include/beman/execution/detail/error_types_of_t.hpp b/include/beman/execution/detail/error_types_of_t.hpp index f1c1dcb3..399328ae 100644 --- a/include/beman/execution/detail/error_types_of_t.hpp +++ b/include/beman/execution/detail/error_types_of_t.hpp @@ -32,4 +32,4 @@ using error_types_of_t = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ERROR_TYPES_OF diff --git a/include/beman/execution/detail/forward_like.hpp b/include/beman/execution/detail/forward_like.hpp index ead10794..b268c830 100644 --- a/include/beman/execution/detail/forward_like.hpp +++ b/include/beman/execution/detail/forward_like.hpp @@ -76,4 +76,4 @@ auto forward_like(U&& u) noexcept -> decltype(auto) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_FORWARD_LIKE diff --git a/include/beman/execution/detail/forwarding_query.hpp b/include/beman/execution/detail/forwarding_query.hpp index 8ef78c18..c71535b9 100644 --- a/include/beman/execution/detail/forwarding_query.hpp +++ b/include/beman/execution/detail/forwarding_query.hpp @@ -55,4 +55,4 @@ inline constexpr forwarding_query_t forwarding_query{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_FORWARDING_QUERY diff --git a/include/beman/execution/detail/fwd_env.hpp b/include/beman/execution/detail/fwd_env.hpp index d0ef2d0b..9c6b27e2 100644 --- a/include/beman/execution/detail/fwd_env.hpp +++ b/include/beman/execution/detail/fwd_env.hpp @@ -48,4 +48,4 @@ fwd_env(Env&&) -> fwd_env; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_FWD_ENV diff --git a/include/beman/execution/detail/gather_signatures.hpp b/include/beman/execution/detail/gather_signatures.hpp index 4232a100..097886f4 100644 --- a/include/beman/execution/detail/gather_signatures.hpp +++ b/include/beman/execution/detail/gather_signatures.hpp @@ -80,4 +80,4 @@ using gather_signatures = typename ::beman::execution::detail::gather_signatures // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GATHER_SIGNATURES diff --git a/include/beman/execution/detail/get_allocator.hpp b/include/beman/execution/detail/get_allocator.hpp index be8947d0..0ae11ecf 100644 --- a/include/beman/execution/detail/get_allocator.hpp +++ b/include/beman/execution/detail/get_allocator.hpp @@ -57,4 +57,4 @@ inline constexpr get_allocator_t get_allocator{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_ALLOCATOR diff --git a/include/beman/execution/detail/get_awaiter.hpp b/include/beman/execution/detail/get_awaiter.hpp index 6183d876..9eb3ef4b 100644 --- a/include/beman/execution/detail/get_awaiter.hpp +++ b/include/beman/execution/detail/get_awaiter.hpp @@ -30,4 +30,4 @@ auto get_awaiter(Expr&& expr, Promise& promise) -> decltype(auto) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_AWAITER diff --git a/include/beman/execution/detail/get_completion_scheduler.hpp b/include/beman/execution/detail/get_completion_scheduler.hpp index 49ea89f7..725e474f 100644 --- a/include/beman/execution/detail/get_completion_scheduler.hpp +++ b/include/beman/execution/detail/get_completion_scheduler.hpp @@ -86,4 +86,4 @@ inline constexpr get_completion_scheduler_t get_completion_scheduler{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_SCHEDULER diff --git a/include/beman/execution/detail/get_completion_signatures.hpp b/include/beman/execution/detail/get_completion_signatures.hpp index 23d5e94a..caf1fb9f 100644 --- a/include/beman/execution/detail/get_completion_signatures.hpp +++ b/include/beman/execution/detail/get_completion_signatures.hpp @@ -65,4 +65,4 @@ inline constexpr get_completion_signatures_t get_completion_signatures{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_SIGNATURES diff --git a/include/beman/execution/detail/get_delegation_scheduler.hpp b/include/beman/execution/detail/get_delegation_scheduler.hpp index 394746f8..c01a141f 100644 --- a/include/beman/execution/detail/get_delegation_scheduler.hpp +++ b/include/beman/execution/detail/get_delegation_scheduler.hpp @@ -27,4 +27,4 @@ inline constexpr get_delegation_scheduler_t get_delegation_scheduler{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DELEGATION_SCHEDULER diff --git a/include/beman/execution/detail/get_domain.hpp b/include/beman/execution/detail/get_domain.hpp index e0fb2e88..932e1147 100644 --- a/include/beman/execution/detail/get_domain.hpp +++ b/include/beman/execution/detail/get_domain.hpp @@ -44,4 +44,4 @@ inline constexpr get_domain_t get_domain{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DOMAIN diff --git a/include/beman/execution/detail/get_domain_early.hpp b/include/beman/execution/detail/get_domain_early.hpp index 09b09161..a854f2f5 100644 --- a/include/beman/execution/detail/get_domain_early.hpp +++ b/include/beman/execution/detail/get_domain_early.hpp @@ -25,4 +25,4 @@ constexpr auto get_domain_early(const Sender& sender) noexcept { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DOMAIN_EARLY diff --git a/include/beman/execution/detail/get_domain_late.hpp b/include/beman/execution/detail/get_domain_late.hpp index c2a3f954..9a06db29 100644 --- a/include/beman/execution/detail/get_domain_late.hpp +++ b/include/beman/execution/detail/get_domain_late.hpp @@ -58,4 +58,4 @@ constexpr auto get_domain_late(const Sender& sender, const Env& env) noexcept { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DOMAIN_LATE diff --git a/include/beman/execution/detail/get_env.hpp b/include/beman/execution/detail/get_env.hpp index 5d94ff15..11831c23 100644 --- a/include/beman/execution/detail/get_env.hpp +++ b/include/beman/execution/detail/get_env.hpp @@ -35,4 +35,4 @@ inline constexpr get_env_t get_env{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_ENV diff --git a/include/beman/execution/detail/get_scheduler.hpp b/include/beman/execution/detail/get_scheduler.hpp index 1e6fa60d..4c7b191d 100644 --- a/include/beman/execution/detail/get_scheduler.hpp +++ b/include/beman/execution/detail/get_scheduler.hpp @@ -28,4 +28,4 @@ inline constexpr get_scheduler_t get_scheduler{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_SCHEDULER diff --git a/include/beman/execution/detail/get_stop_token.hpp b/include/beman/execution/detail/get_stop_token.hpp index b88e5460..2c5b4a61 100644 --- a/include/beman/execution/detail/get_stop_token.hpp +++ b/include/beman/execution/detail/get_stop_token.hpp @@ -39,4 +39,4 @@ inline constexpr get_stop_token_t get_stop_token{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_STOP_TOKEN diff --git a/include/beman/execution/detail/has_as_awaitable.hpp b/include/beman/execution/detail/has_as_awaitable.hpp index ade5d419..21a9b0cb 100644 --- a/include/beman/execution/detail/has_as_awaitable.hpp +++ b/include/beman/execution/detail/has_as_awaitable.hpp @@ -18,4 +18,4 @@ concept has_as_awaitable = requires(T&& obj, Promise& promise) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_HAS_AS_AWAITABLE diff --git a/include/beman/execution/detail/has_completions.hpp b/include/beman/execution/detail/has_completions.hpp index d985859e..831aacf2 100644 --- a/include/beman/execution/detail/has_completions.hpp +++ b/include/beman/execution/detail/has_completions.hpp @@ -34,4 +34,4 @@ concept has_completions = has_completions_aux::value; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_HAS_COMPLETIONS diff --git a/include/beman/execution/detail/immovable.hpp b/include/beman/execution/detail/immovable.hpp index 99275d89..c62e1631 100644 --- a/include/beman/execution/detail/immovable.hpp +++ b/include/beman/execution/detail/immovable.hpp @@ -31,4 +31,4 @@ struct beman::execution::detail::virtual_immovable { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_IMMOVABLE diff --git a/include/beman/execution/detail/impls_for.hpp b/include/beman/execution/detail/impls_for.hpp index 25d033e0..7cc9956f 100644 --- a/include/beman/execution/detail/impls_for.hpp +++ b/include/beman/execution/detail/impls_for.hpp @@ -15,4 +15,4 @@ struct impls_for : ::beman::execution::detail::default_impls {}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_IMPLS_FOR diff --git a/include/beman/execution/detail/indices_for.hpp b/include/beman/execution/detail/indices_for.hpp index a87f1674..bb7d2a51 100644 --- a/include/beman/execution/detail/indices_for.hpp +++ b/include/beman/execution/detail/indices_for.hpp @@ -15,4 +15,4 @@ using indices_for = typename ::std::remove_reference_t::indices_for; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_INDICES_FOR diff --git a/include/beman/execution/detail/indirect_meta_apply.hpp b/include/beman/execution/detail/indirect_meta_apply.hpp index c73526a6..396744b8 100644 --- a/include/beman/execution/detail/indirect_meta_apply.hpp +++ b/include/beman/execution/detail/indirect_meta_apply.hpp @@ -16,4 +16,4 @@ struct indirect_meta_apply { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_INDIRECT_META_APPLY diff --git a/include/beman/execution/detail/inplace_stop_source.hpp b/include/beman/execution/detail/inplace_stop_source.hpp index cf3f5c56..92e05028 100644 --- a/include/beman/execution/detail/inplace_stop_source.hpp +++ b/include/beman/execution/detail/inplace_stop_source.hpp @@ -188,4 +188,4 @@ inline auto beman::execution::inplace_stop_callback::call() -> void // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_INPLACE_STOP_SOURCE diff --git a/include/beman/execution/detail/into_variant.hpp b/include/beman/execution/detail/into_variant.hpp index 52f58c5e..7f702b5f 100644 --- a/include/beman/execution/detail/into_variant.hpp +++ b/include/beman/execution/detail/into_variant.hpp @@ -99,4 +99,4 @@ inline constexpr into_variant_t into_variant{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_INTO_VARIANT diff --git a/include/beman/execution/detail/intrusive_stack.hpp b/include/beman/execution/detail/intrusive_stack.hpp index c954bca5..652a541d 100644 --- a/include/beman/execution/detail/intrusive_stack.hpp +++ b/include/beman/execution/detail/intrusive_stack.hpp @@ -44,4 +44,4 @@ class intrusive_stack { } // namespace beman::execution::detail -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_INTRUSIVE_QUEUE diff --git a/include/beman/execution/detail/is_awaitable.hpp b/include/beman/execution/detail/is_awaitable.hpp index 41ccb427..658d681f 100644 --- a/include/beman/execution/detail/is_awaitable.hpp +++ b/include/beman/execution/detail/is_awaitable.hpp @@ -21,4 +21,4 @@ concept is_awaitable = requires(Promise& promise) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_IS_AWAITABLE diff --git a/include/beman/execution/detail/is_awaiter.hpp b/include/beman/execution/detail/is_awaiter.hpp index c37c5d8d..51c6df06 100644 --- a/include/beman/execution/detail/is_awaiter.hpp +++ b/include/beman/execution/detail/is_awaiter.hpp @@ -20,4 +20,4 @@ concept is_awaiter = requires(Awaiter& awaiter, ::std::coroutine_handle // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_IS_AWAITER diff --git a/include/beman/execution/detail/join_env.hpp b/include/beman/execution/detail/join_env.hpp index f5d0d27b..ac05aa7b 100644 --- a/include/beman/execution/detail/join_env.hpp +++ b/include/beman/execution/detail/join_env.hpp @@ -56,4 +56,4 @@ join_env(Env1&&, Env2&&) -> join_env<::std::remove_cvref_t, ::std::remove_ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_JOIN_ENV diff --git a/include/beman/execution/detail/just.hpp b/include/beman/execution/detail/just.hpp index 8cd1af59..69b57729 100644 --- a/include/beman/execution/detail/just.hpp +++ b/include/beman/execution/detail/just.hpp @@ -230,4 +230,4 @@ inline constexpr ::beman::execution::just_stopped_t just_stopped{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_JUST diff --git a/include/beman/execution/detail/let.hpp b/include/beman/execution/detail/let.hpp index e8102be4..23a53517 100644 --- a/include/beman/execution/detail/let.hpp +++ b/include/beman/execution/detail/let.hpp @@ -246,4 +246,4 @@ inline constexpr ::beman::execution::let_value_t let_value{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_LET diff --git a/include/beman/execution/detail/make_env.hpp b/include/beman/execution/detail/make_env.hpp index 533d6da0..23758b2b 100644 --- a/include/beman/execution/detail/make_env.hpp +++ b/include/beman/execution/detail/make_env.hpp @@ -27,4 +27,4 @@ make_env(Query&&, Value&& value) -> make_env<::std::remove_cvref_t, ::std // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_MAKE_ENV diff --git a/include/beman/execution/detail/make_sender.hpp b/include/beman/execution/detail/make_sender.hpp index 1a1a8408..bca6d6f3 100644 --- a/include/beman/execution/detail/make_sender.hpp +++ b/include/beman/execution/detail/make_sender.hpp @@ -30,4 +30,4 @@ constexpr auto make_sender(Tag tag, Data&& data, Child&&... child) { #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_MAKE_SENDER diff --git a/include/beman/execution/detail/matching_sig.hpp b/include/beman/execution/detail/matching_sig.hpp index 8da06b00..0c21cdba 100644 --- a/include/beman/execution/detail/matching_sig.hpp +++ b/include/beman/execution/detail/matching_sig.hpp @@ -26,4 +26,4 @@ inline constexpr bool matching_sig = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_MATCHING_SIG diff --git a/include/beman/execution/detail/meta_combine.hpp b/include/beman/execution/detail/meta_combine.hpp index 5b110982..b3441684 100644 --- a/include/beman/execution/detail/meta_combine.hpp +++ b/include/beman/execution/detail/meta_combine.hpp @@ -34,4 +34,4 @@ using combine = typename ::beman::execution::detail::meta::detail::combine // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_COMBINE diff --git a/include/beman/execution/detail/meta_contain_same.hpp b/include/beman/execution/detail/meta_contain_same.hpp index c5874e8d..fbcf2989 100644 --- a/include/beman/execution/detail/meta_contain_same.hpp +++ b/include/beman/execution/detail/meta_contain_same.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/meta_contain_same.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_META_CONTAIN_SAME -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_META_CONTAIN_SAME +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_META_CONTAIN_SAME +#define INCLUDED_BEMAN_EXECUTION_DETAIL_META_CONTAIN_SAME #include @@ -24,4 +24,4 @@ inline constexpr bool contain_same = contain_same_t::value; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_CONTAIN_SAME diff --git a/include/beman/execution/detail/meta_contains.hpp b/include/beman/execution/detail/meta_contains.hpp index cc97e055..6b924e10 100644 --- a/include/beman/execution/detail/meta_contains.hpp +++ b/include/beman/execution/detail/meta_contains.hpp @@ -15,4 +15,4 @@ inline constexpr bool contains{(::std::same_as || ...)}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_CONTAINS diff --git a/include/beman/execution/detail/meta_filter.hpp b/include/beman/execution/detail/meta_filter.hpp index 810a5bde..4931dccf 100644 --- a/include/beman/execution/detail/meta_filter.hpp +++ b/include/beman/execution/detail/meta_filter.hpp @@ -54,4 +54,4 @@ using filter_tag = typename ::beman::execution::detail::meta::detail::filter_tag // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_FILTER diff --git a/include/beman/execution/detail/meta_prepend.hpp b/include/beman/execution/detail/meta_prepend.hpp index 7d7f3033..b1cf7739 100644 --- a/include/beman/execution/detail/meta_prepend.hpp +++ b/include/beman/execution/detail/meta_prepend.hpp @@ -23,4 +23,4 @@ using prepend = typename ::beman::execution::detail::meta::detail::prepend: // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_SIZE diff --git a/include/beman/execution/detail/meta_to.hpp b/include/beman/execution/detail/meta_to.hpp index 65679c62..f40e9cce 100644 --- a/include/beman/execution/detail/meta_to.hpp +++ b/include/beman/execution/detail/meta_to.hpp @@ -19,4 +19,4 @@ using to = typename ::beman::execution::detail::meta::to_type_list::type; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_TO diff --git a/include/beman/execution/detail/meta_transform.hpp b/include/beman/execution/detail/meta_transform.hpp index 3003ac4e..70df5bae 100644 --- a/include/beman/execution/detail/meta_transform.hpp +++ b/include/beman/execution/detail/meta_transform.hpp @@ -25,4 +25,4 @@ using transform = typename ::beman::execution::detail::meta::detail::transform::typ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_META_UNIQUE diff --git a/include/beman/execution/detail/movable_value.hpp b/include/beman/execution/detail/movable_value.hpp index 7dd0a214..e2a007be 100644 --- a/include/beman/execution/detail/movable_value.hpp +++ b/include/beman/execution/detail/movable_value.hpp @@ -18,4 +18,4 @@ concept movable_value = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_MOVABLE_VALUE diff --git a/include/beman/execution/detail/nested_sender_has_affine_on.hpp b/include/beman/execution/detail/nested_sender_has_affine_on.hpp index be374edc..aec8ea1d 100644 --- a/include/beman/execution/detail/nested_sender_has_affine_on.hpp +++ b/include/beman/execution/detail/nested_sender_has_affine_on.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/nested_sender_has_affine_on.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NESTED_SENDER_HAS_AFFINE_ON -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NESTED_SENDER_HAS_AFFINE_ON +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_NESTED_SENDER_HAS_AFFINE_ON +#define INCLUDED_BEMAN_EXECUTION_DETAIL_NESTED_SENDER_HAS_AFFINE_ON #include @@ -17,4 +17,4 @@ concept nested_sender_has_affine_on = requires(Sender&& sndr, const Env& env) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NESTED_SENDER_HAS_AFFINE_ON diff --git a/include/beman/execution/detail/never_stop_token.hpp b/include/beman/execution/detail/never_stop_token.hpp index 8bec760b..12fdbdbd 100644 --- a/include/beman/execution/detail/never_stop_token.hpp +++ b/include/beman/execution/detail/never_stop_token.hpp @@ -28,4 +28,4 @@ class beman::execution::never_stop_token { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NEVER_STOP_TOKEN diff --git a/include/beman/execution/detail/non_assignable.hpp b/include/beman/execution/detail/non_assignable.hpp index b2f9caa4..c7180195 100644 --- a/include/beman/execution/detail/non_assignable.hpp +++ b/include/beman/execution/detail/non_assignable.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/non_assignable.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NON_ASSIGNABLE -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NON_ASSIGNABLE +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_NON_ASSIGNABLE +#define INCLUDED_BEMAN_EXECUTION_DETAIL_NON_ASSIGNABLE // ---------------------------------------------------------------------------- @@ -22,4 +22,4 @@ struct beman::execution::detail::non_assignable { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NON_ASSIGNABLE diff --git a/include/beman/execution/detail/nostopstate.hpp b/include/beman/execution/detail/nostopstate.hpp index ad485790..7df3c485 100644 --- a/include/beman/execution/detail/nostopstate.hpp +++ b/include/beman/execution/detail/nostopstate.hpp @@ -16,4 +16,4 @@ inline constexpr nostopstate_t nostopstate{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NOSTOPSTATE diff --git a/include/beman/execution/detail/nothrow_callable.hpp b/include/beman/execution/detail/nothrow_callable.hpp index 4826841f..f26cf709 100644 --- a/include/beman/execution/detail/nothrow_callable.hpp +++ b/include/beman/execution/detail/nothrow_callable.hpp @@ -17,4 +17,4 @@ concept nothrow_callable = ::beman::execution::detail::callable && // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NOTHROW_CALLABLE diff --git a/include/beman/execution/detail/notify.hpp b/include/beman/execution/detail/notify.hpp index 6ffb2787..8eb0e63f 100644 --- a/include/beman/execution/detail/notify.hpp +++ b/include/beman/execution/detail/notify.hpp @@ -83,4 +83,4 @@ struct completion_signatures_for_impl< // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NOTIFY diff --git a/include/beman/execution/detail/on.hpp b/include/beman/execution/detail/on.hpp index 197419d9..e672f6c2 100644 --- a/include/beman/execution/detail/on.hpp +++ b/include/beman/execution/detail/on.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/on.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_ON -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_ON +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ON +#define INCLUDED_BEMAN_EXECUTION_DETAIL_ON #include #include @@ -132,28 +132,6 @@ struct on_t : ::beman::execution::sender_adaptor_closure { } }; -#if 0 -template -struct completion_signatures_for_impl< - ::beman::execution::detail::basic_sender<::beman::execution::detail::on_t, Data, Sender>, - Env> { - //-dk:TODO pick up scheduler errors and merge them in? - using type = -#if 0 - ::beman::execution::detail::meta::combine< - ::beman::execution::completion_signatures_of_t, - ::beman::execution::completion_signatures<::beman::execution::set_error_t(::std::exception_ptr)> - > -#else - ::beman::execution::completion_signatures< - ::beman::execution::set_value_t(), - ::beman::execution::set_error_t(::std::exception_ptr) - > -#endif - ; -}; -#endif - } // namespace beman::execution::detail namespace beman::execution { @@ -165,4 +143,4 @@ inline constexpr ::beman::execution::on_t on{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ON diff --git a/include/beman/execution/detail/on_stop_request.hpp b/include/beman/execution/detail/on_stop_request.hpp index 4a8c86c3..60dde694 100644 --- a/include/beman/execution/detail/on_stop_request.hpp +++ b/include/beman/execution/detail/on_stop_request.hpp @@ -18,4 +18,4 @@ on_stop_request(T&) -> on_stop_request; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_ON_STOP_REQUEST diff --git a/include/beman/execution/detail/operation_state.hpp b/include/beman/execution/detail/operation_state.hpp index 63971cb9..4faf372e 100644 --- a/include/beman/execution/detail/operation_state.hpp +++ b/include/beman/execution/detail/operation_state.hpp @@ -23,4 +23,4 @@ concept operation_state = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_OPERATION_STATE diff --git a/include/beman/execution/detail/operation_state_task.hpp b/include/beman/execution/detail/operation_state_task.hpp index 3b14088d..d322d471 100644 --- a/include/beman/execution/detail/operation_state_task.hpp +++ b/include/beman/execution/detail/operation_state_task.hpp @@ -82,4 +82,4 @@ auto beman::execution::detail::connect_awaitable_promise::get_return_o // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_OPERATION_STATE_TASK diff --git a/include/beman/execution/detail/product_type.hpp b/include/beman/execution/detail/product_type.hpp index 59c4f395..043ea9a3 100644 --- a/include/beman/execution/detail/product_type.hpp +++ b/include/beman/execution/detail/product_type.hpp @@ -93,12 +93,8 @@ struct product_type : ::beman::execution::detail::product_type_base<::std::index } template constexpr auto apply_elements(::std::index_sequence, Fun&& fun) -> decltype(auto) { -#if 0 - return ::std::forward(fun)(this->template get()...); -#else //-dk:TODO provide rvalue, lvalue, const lvalue overloads? return ::std::forward(fun)(std::move(this->template get())...); -#endif } template constexpr auto apply(Fun&& fun) -> decltype(auto) { @@ -149,4 +145,4 @@ struct tuple_element { #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_PRODUCT_TYPE diff --git a/include/beman/execution/detail/prop.hpp b/include/beman/execution/detail/prop.hpp index 56d23476..9e8a1200 100644 --- a/include/beman/execution/detail/prop.hpp +++ b/include/beman/execution/detail/prop.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/prop.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_PROP -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_PROP +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_PROP +#define INCLUDED_BEMAN_EXECUTION_DETAIL_PROP #include #include @@ -47,4 +47,4 @@ struct beman::execution::prop { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_PROP diff --git a/include/beman/execution/detail/query_with_default.hpp b/include/beman/execution/detail/query_with_default.hpp index d61f0978..bcb5508c 100644 --- a/include/beman/execution/detail/query_with_default.hpp +++ b/include/beman/execution/detail/query_with_default.hpp @@ -25,4 +25,4 @@ query_with_default(Tag, const Env&, Value&& value) noexcept(noexcept(static_cast // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_QUERY_WITH_DEFAULT diff --git a/include/beman/execution/detail/queryable.hpp b/include/beman/execution/detail/queryable.hpp index d94a51f1..dc5050db 100644 --- a/include/beman/execution/detail/queryable.hpp +++ b/include/beman/execution/detail/queryable.hpp @@ -15,4 +15,4 @@ concept queryable = ::std::destructible; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_QUERYABLE diff --git a/include/beman/execution/detail/read_env.hpp b/include/beman/execution/detail/read_env.hpp index 5b96137b..abcd8c73 100644 --- a/include/beman/execution/detail/read_env.hpp +++ b/include/beman/execution/detail/read_env.hpp @@ -59,4 +59,4 @@ inline constexpr read_env_t read_env{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_READ_ENV diff --git a/include/beman/execution/detail/receiver.hpp b/include/beman/execution/detail/receiver.hpp index e1eb259b..86fae1a3 100644 --- a/include/beman/execution/detail/receiver.hpp +++ b/include/beman/execution/detail/receiver.hpp @@ -25,4 +25,4 @@ concept receiver = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_RECEIVER diff --git a/include/beman/execution/detail/receiver_of.hpp b/include/beman/execution/detail/receiver_of.hpp index 90586081..6da1af85 100644 --- a/include/beman/execution/detail/receiver_of.hpp +++ b/include/beman/execution/detail/receiver_of.hpp @@ -18,4 +18,4 @@ concept receiver_of = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_RECEIVER_OF diff --git a/include/beman/execution/detail/run_loop.hpp b/include/beman/execution/detail/run_loop.hpp index 4a1f8796..cef6ff8c 100644 --- a/include/beman/execution/detail/run_loop.hpp +++ b/include/beman/execution/detail/run_loop.hpp @@ -158,4 +158,4 @@ class run_loop { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_RUN_LOOP diff --git a/include/beman/execution/detail/sched_attrs.hpp b/include/beman/execution/detail/sched_attrs.hpp index 5d8e8372..e242d890 100644 --- a/include/beman/execution/detail/sched_attrs.hpp +++ b/include/beman/execution/detail/sched_attrs.hpp @@ -45,4 +45,4 @@ sched_attrs(Scheduler&&) -> sched_attrs<::std::remove_cvref_t>; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCHED_ATTRS diff --git a/include/beman/execution/detail/sched_env.hpp b/include/beman/execution/detail/sched_env.hpp index 8179ae2f..8d4ba3ac 100644 --- a/include/beman/execution/detail/sched_env.hpp +++ b/include/beman/execution/detail/sched_env.hpp @@ -37,4 +37,4 @@ sched_env(Scheduler&&) -> sched_env<::std::remove_cvref_t>; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCHED_ENV diff --git a/include/beman/execution/detail/schedule.hpp b/include/beman/execution/detail/schedule.hpp index 6dd4cff8..65af2118 100644 --- a/include/beman/execution/detail/schedule.hpp +++ b/include/beman/execution/detail/schedule.hpp @@ -37,4 +37,4 @@ inline constexpr ::beman::execution::schedule_t schedule{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE diff --git a/include/beman/execution/detail/schedule_from.hpp b/include/beman/execution/detail/schedule_from.hpp index 47a5b763..569f9f9e 100644 --- a/include/beman/execution/detail/schedule_from.hpp +++ b/include/beman/execution/detail/schedule_from.hpp @@ -186,4 +186,4 @@ inline constexpr ::beman::execution::schedule_from_t schedule_from{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE_FROM diff --git a/include/beman/execution/detail/schedule_result_t.hpp b/include/beman/execution/detail/schedule_result_t.hpp index 8c995e7f..9a514f0b 100644 --- a/include/beman/execution/detail/schedule_result_t.hpp +++ b/include/beman/execution/detail/schedule_result_t.hpp @@ -17,4 +17,4 @@ using schedule_result_t = decltype(::beman::execution::schedule(::std::declval && r // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULER diff --git a/include/beman/execution/detail/scheduler_t.hpp b/include/beman/execution/detail/scheduler_t.hpp index 73623b5a..7652db80 100644 --- a/include/beman/execution/detail/scheduler_t.hpp +++ b/include/beman/execution/detail/scheduler_t.hpp @@ -16,4 +16,4 @@ struct scheduler_t {}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULER_T diff --git a/include/beman/execution/detail/scope_token.hpp b/include/beman/execution/detail/scope_token.hpp index b0c0984f..609921c8 100644 --- a/include/beman/execution/detail/scope_token.hpp +++ b/include/beman/execution/detail/scope_token.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/scope_token.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN +#define INCLUDED_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN #include #include @@ -40,4 +40,4 @@ concept scope_token = ::std::copyable && requires(Token token) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN diff --git a/include/beman/execution/detail/sender.hpp b/include/beman/execution/detail/sender.hpp index d9dcf27f..993fc81f 100644 --- a/include/beman/execution/detail/sender.hpp +++ b/include/beman/execution/detail/sender.hpp @@ -38,4 +38,4 @@ concept sender = ::beman::execution::detail::enable_sender<::std::remove_cvref_t // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER diff --git a/include/beman/execution/detail/sender_adaptor.hpp b/include/beman/execution/detail/sender_adaptor.hpp index be090eb8..6254b96a 100644 --- a/include/beman/execution/detail/sender_adaptor.hpp +++ b/include/beman/execution/detail/sender_adaptor.hpp @@ -41,4 +41,4 @@ sender_adaptor(T&&...) -> sender_adaptor; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_ADAPTOR diff --git a/include/beman/execution/detail/sender_adaptor_closure.hpp b/include/beman/execution/detail/sender_adaptor_closure.hpp index 8f82aa05..029c1c21 100644 --- a/include/beman/execution/detail/sender_adaptor_closure.hpp +++ b/include/beman/execution/detail/sender_adaptor_closure.hpp @@ -44,4 +44,4 @@ auto operator|(Sender&& sender, Adaptor&& adaptor) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_ADAPTOR_CLOSURE diff --git a/include/beman/execution/detail/sender_awaitable.hpp b/include/beman/execution/detail/sender_awaitable.hpp index 4f72cb5e..7066b982 100644 --- a/include/beman/execution/detail/sender_awaitable.hpp +++ b/include/beman/execution/detail/sender_awaitable.hpp @@ -110,4 +110,4 @@ class sender_awaitable { }; } // namespace beman::execution::detail -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_AWAITABLE diff --git a/include/beman/execution/detail/sender_decompose.hpp b/include/beman/execution/detail/sender_decompose.hpp index 0b8ab53d..a24ea0fc 100644 --- a/include/beman/execution/detail/sender_decompose.hpp +++ b/include/beman/execution/detail/sender_decompose.hpp @@ -84,4 +84,4 @@ auto get_sender_meta(Sender&& sender) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_DECOMPOSE diff --git a/include/beman/execution/detail/sender_for.hpp b/include/beman/execution/detail/sender_for.hpp index f95aefd0..584e4eb2 100644 --- a/include/beman/execution/detail/sender_for.hpp +++ b/include/beman/execution/detail/sender_for.hpp @@ -18,4 +18,4 @@ concept sender_for = ::beman::execution::sender && ::std::same_as<::bema // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_FOR diff --git a/include/beman/execution/detail/sender_has_affine_on.hpp b/include/beman/execution/detail/sender_has_affine_on.hpp index 742fb026..9cffb2fe 100644 --- a/include/beman/execution/detail/sender_has_affine_on.hpp +++ b/include/beman/execution/detail/sender_has_affine_on.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/sender_has_affine_on.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SENDER_HAS_AFFINE_ON -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SENDER_HAS_AFFINE_ON +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_HAS_AFFINE_ON +#define INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_HAS_AFFINE_ON #include #include @@ -21,4 +21,4 @@ concept sender_has_affine_on = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_HAS_AFFINE_ON diff --git a/include/beman/execution/detail/sender_in.hpp b/include/beman/execution/detail/sender_in.hpp index 8b247051..2c0ba335 100644 --- a/include/beman/execution/detail/sender_in.hpp +++ b/include/beman/execution/detail/sender_in.hpp @@ -25,4 +25,4 @@ concept sender_in = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_IN diff --git a/include/beman/execution/detail/sends_stopped.hpp b/include/beman/execution/detail/sends_stopped.hpp index 54e22c44..ee508fa1 100644 --- a/include/beman/execution/detail/sends_stopped.hpp +++ b/include/beman/execution/detail/sends_stopped.hpp @@ -27,4 +27,4 @@ inline constexpr bool sends_stopped{!::std::same_as< // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SENDS_STOPPED diff --git a/include/beman/execution/detail/set_error.hpp b/include/beman/execution/detail/set_error.hpp index e30e9548..9f54268d 100644 --- a/include/beman/execution/detail/set_error.hpp +++ b/include/beman/execution/detail/set_error.hpp @@ -53,4 +53,4 @@ inline constexpr set_error_t set_error{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SET_ERROR diff --git a/include/beman/execution/detail/set_stopped.hpp b/include/beman/execution/detail/set_stopped.hpp index 52902bf0..12cc38cc 100644 --- a/include/beman/execution/detail/set_stopped.hpp +++ b/include/beman/execution/detail/set_stopped.hpp @@ -49,4 +49,4 @@ inline constexpr set_stopped_t set_stopped{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SET_STOPPED diff --git a/include/beman/execution/detail/set_value.hpp b/include/beman/execution/detail/set_value.hpp index ec01849f..0abd506c 100644 --- a/include/beman/execution/detail/set_value.hpp +++ b/include/beman/execution/detail/set_value.hpp @@ -51,4 +51,4 @@ inline constexpr set_value_t set_value{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SET_VALUE diff --git a/include/beman/execution/detail/simple_allocator.hpp b/include/beman/execution/detail/simple_allocator.hpp index d65ea482..7ad5da0c 100644 --- a/include/beman/execution/detail/simple_allocator.hpp +++ b/include/beman/execution/detail/simple_allocator.hpp @@ -21,4 +21,4 @@ concept simple_allocator = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SIMPLE_ALLOCATOR diff --git a/include/beman/execution/detail/simple_counting_scope.hpp b/include/beman/execution/detail/simple_counting_scope.hpp index 84b3c187..524d2229 100644 --- a/include/beman/execution/detail/simple_counting_scope.hpp +++ b/include/beman/execution/detail/simple_counting_scope.hpp @@ -52,4 +52,4 @@ inline auto beman::execution::simple_counting_scope::get_token() noexcept // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SIMPLE_COUNTING_SCOPE diff --git a/include/beman/execution/detail/single_sender.hpp b/include/beman/execution/detail/single_sender.hpp index 2912e386..f114c94b 100644 --- a/include/beman/execution/detail/single_sender.hpp +++ b/include/beman/execution/detail/single_sender.hpp @@ -17,4 +17,4 @@ concept single_sender = ::beman::execution::sender_in && // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SINGLE_SENDER diff --git a/include/beman/execution/detail/single_sender_value_type.hpp b/include/beman/execution/detail/single_sender_value_type.hpp index 4bbffa41..27c01f5b 100644 --- a/include/beman/execution/detail/single_sender_value_type.hpp +++ b/include/beman/execution/detail/single_sender_value_type.hpp @@ -55,4 +55,4 @@ using single_sender_value_type = typename single_sender_value_type_helper #include @@ -90,4 +90,4 @@ inline constexpr spawn_t spawn{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN diff --git a/include/beman/execution/detail/spawn_future.hpp b/include/beman/execution/detail/spawn_future.hpp index 7f80ab12..b81cd339 100644 --- a/include/beman/execution/detail/spawn_future.hpp +++ b/include/beman/execution/detail/spawn_future.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/spawn_future.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE +#define INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE #include #include @@ -268,4 +268,4 @@ inline constexpr spawn_future_t spawn_future{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE diff --git a/include/beman/execution/detail/spawn_get_allocator.hpp b/include/beman/execution/detail/spawn_get_allocator.hpp index 1056a513..345da1d5 100644 --- a/include/beman/execution/detail/spawn_get_allocator.hpp +++ b/include/beman/execution/detail/spawn_get_allocator.hpp @@ -1,8 +1,8 @@ // include/beman/execution/detail/spawn_get_allocator.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SPAWN_GET_ALLOCATOR -#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_SPAWN_GET_ALLOCATOR +#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_GET_ALLOCATOR +#define INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_GET_ALLOCATOR #include #include @@ -33,4 +33,4 @@ auto spawn_get_allocator(const Sndr& sndr, const Ev& ev) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_GET_ALLOCATOR diff --git a/include/beman/execution/detail/split.hpp b/include/beman/execution/detail/split.hpp index cf2c55c2..9d56b8c5 100644 --- a/include/beman/execution/detail/split.hpp +++ b/include/beman/execution/detail/split.hpp @@ -384,4 +384,4 @@ using split_t = ::beman::execution::detail::split_t; inline constexpr ::beman::execution::split_t split{}; } // namespace beman::execution -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SPLIT diff --git a/include/beman/execution/detail/start.hpp b/include/beman/execution/detail/start.hpp index 0a542d53..06029f07 100644 --- a/include/beman/execution/detail/start.hpp +++ b/include/beman/execution/detail/start.hpp @@ -51,4 +51,4 @@ inline constexpr start_t start{}; #include -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_START diff --git a/include/beman/execution/detail/starts_on.hpp b/include/beman/execution/detail/starts_on.hpp index 3685d294..975f1468 100644 --- a/include/beman/execution/detail/starts_on.hpp +++ b/include/beman/execution/detail/starts_on.hpp @@ -59,4 +59,4 @@ inline constexpr ::beman::execution::detail::starts_on_t starts_on{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STARTS_ON diff --git a/include/beman/execution/detail/state_type.hpp b/include/beman/execution/detail/state_type.hpp index c90a96c8..61194aef 100644 --- a/include/beman/execution/detail/state_type.hpp +++ b/include/beman/execution/detail/state_type.hpp @@ -22,4 +22,4 @@ using state_type = ::std::decay_t< ::beman::execution::detail::call_result_t< // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STATE_TYPE diff --git a/include/beman/execution/detail/stop_callback_for_t.hpp b/include/beman/execution/detail/stop_callback_for_t.hpp index 6177c49b..e7a19af7 100644 --- a/include/beman/execution/detail/stop_callback_for_t.hpp +++ b/include/beman/execution/detail/stop_callback_for_t.hpp @@ -25,4 +25,4 @@ concept stoppable_callback_for = // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_CALLBACK_FOR diff --git a/include/beman/execution/detail/stop_source.hpp b/include/beman/execution/detail/stop_source.hpp index 083211db..607956d2 100644 --- a/include/beman/execution/detail/stop_source.hpp +++ b/include/beman/execution/detail/stop_source.hpp @@ -255,4 +255,4 @@ inline auto beman::execution::stop_source::request_stop() noexcept -> bool { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_SOURCE diff --git a/include/beman/execution/detail/stop_token_of_t.hpp b/include/beman/execution/detail/stop_token_of_t.hpp index 73ee2892..bee8eced 100644 --- a/include/beman/execution/detail/stop_token_of_t.hpp +++ b/include/beman/execution/detail/stop_token_of_t.hpp @@ -16,4 +16,4 @@ using stop_token_of_t = ::std::remove_cvref_t #include @@ -132,4 +132,4 @@ inline auto beman::execution::detail::stop_when_t::operator()(Sndr&& sndr, Tok&& // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_WHEN diff --git a/include/beman/execution/detail/stoppable_source.hpp b/include/beman/execution/detail/stoppable_source.hpp index 792dd4a6..5a52399c 100644 --- a/include/beman/execution/detail/stoppable_source.hpp +++ b/include/beman/execution/detail/stoppable_source.hpp @@ -21,4 +21,4 @@ concept stoppable_source = requires(Source& source, const Source& csource) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STOPPABLE_SOURCE diff --git a/include/beman/execution/detail/stoppable_token.hpp b/include/beman/execution/detail/stoppable_token.hpp index 14aa405c..5b0c2872 100644 --- a/include/beman/execution/detail/stoppable_token.hpp +++ b/include/beman/execution/detail/stoppable_token.hpp @@ -21,4 +21,4 @@ concept stoppable_token = requires(const Token& token) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_STOPPABLE_TOKEN diff --git a/include/beman/execution/detail/suppress_pop.hpp b/include/beman/execution/detail/suppress_pop.hpp index 6eefbb73..2a30cd98 100644 --- a/include/beman/execution/detail/suppress_pop.hpp +++ b/include/beman/execution/detail/suppress_pop.hpp @@ -6,9 +6,9 @@ #ifdef BEMAN_EXECUTION_DIAGNOSTIC_PUSHED #if defined(__GNUC__) #pragma GCC diagnostic pop -#endif +#endif // #if defined(__GNUC__) #if defined(__clang__) #pragma clang diagnostic pop -#endif +#endif // #if defined(__clang__) #undef BEMAN_EXECUTION_DIAGNOSTIC_PUSHED -#endif +#endif // #ifdef BEMAN_EXECUTION_DIAGNOSTIC_PUSHED diff --git a/include/beman/execution/detail/suppress_push.hpp b/include/beman/execution/detail/suppress_push.hpp index c4a51c25..579dbd35 100644 --- a/include/beman/execution/detail/suppress_push.hpp +++ b/include/beman/execution/detail/suppress_push.hpp @@ -8,7 +8,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-braces" #pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif +#endif // #if defined(__GNUC__) #if defined(__clang__) #define BEMAN_EXECUTION_DIAGNOSTIC_PUSHED @@ -16,4 +16,4 @@ #pragma clang diagnostic ignored "-Wunknown-warning-option" #pragma clang diagnostic ignored "-Wmissing-braces" #pragma clang diagnostic ignored "-Wc++26-extensions" -#endif +#endif // #if defined(__clang__) diff --git a/include/beman/execution/detail/suspend_complete.hpp b/include/beman/execution/detail/suspend_complete.hpp index a3c3d4b6..6257fe6e 100644 --- a/include/beman/execution/detail/suspend_complete.hpp +++ b/include/beman/execution/detail/suspend_complete.hpp @@ -31,4 +31,4 @@ auto suspend_complete(Fun fun, Args&&... args) noexcept { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SUSPEND_COMPLETE diff --git a/include/beman/execution/detail/sync_wait.hpp b/include/beman/execution/detail/sync_wait.hpp index 6d38b213..df2eeb5f 100644 --- a/include/beman/execution/detail/sync_wait.hpp +++ b/include/beman/execution/detail/sync_wait.hpp @@ -160,4 +160,4 @@ inline constexpr ::beman::execution::sync_wait_t sync_wait{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SYNC_WAIT diff --git a/include/beman/execution/detail/tag_of_t.hpp b/include/beman/execution/detail/tag_of_t.hpp index 85ebc773..a5347f08 100644 --- a/include/beman/execution/detail/tag_of_t.hpp +++ b/include/beman/execution/detail/tag_of_t.hpp @@ -16,4 +16,4 @@ using tag_of_t = typename decltype(::beman::execution::detail::get_sender_meta(: // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_TAG_OF diff --git a/include/beman/execution/detail/then.hpp b/include/beman/execution/detail/then.hpp index 56078d0a..288637fa 100644 --- a/include/beman/execution/detail/then.hpp +++ b/include/beman/execution/detail/then.hpp @@ -321,4 +321,4 @@ inline constexpr ::beman::execution::upon_stopped_t upon_stopped{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_THEN diff --git a/include/beman/execution/detail/transform_sender.hpp b/include/beman/execution/detail/transform_sender.hpp index d87f477b..1612e488 100644 --- a/include/beman/execution/detail/transform_sender.hpp +++ b/include/beman/execution/detail/transform_sender.hpp @@ -124,4 +124,4 @@ constexpr auto transform_sender(Domain dom, Sender&& sender, const Env&... env) // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_TRANSFORM_SENDER diff --git a/include/beman/execution/detail/type_list.hpp b/include/beman/execution/detail/type_list.hpp index 787a6e17..c4891d52 100644 --- a/include/beman/execution/detail/type_list.hpp +++ b/include/beman/execution/detail/type_list.hpp @@ -13,4 +13,4 @@ struct type_list {}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_TYPE_LIST diff --git a/include/beman/execution/detail/unspecified_promise.hpp b/include/beman/execution/detail/unspecified_promise.hpp index f8acbb89..127e4cd2 100644 --- a/include/beman/execution/detail/unspecified_promise.hpp +++ b/include/beman/execution/detail/unspecified_promise.hpp @@ -17,4 +17,4 @@ struct unspecified_promise { }; } // namespace beman::execution::detail -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_UNSPECIFIED_PROMISE diff --git a/include/beman/execution/detail/unstoppable_token.hpp b/include/beman/execution/detail/unstoppable_token.hpp index f63c0a59..761455d6 100644 --- a/include/beman/execution/detail/unstoppable_token.hpp +++ b/include/beman/execution/detail/unstoppable_token.hpp @@ -17,4 +17,4 @@ concept unstoppable_token = ::beman::execution::stoppable_token && // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_UNSTOPPABLE_TOKEN diff --git a/include/beman/execution/detail/valid_completion_for.hpp b/include/beman/execution/detail/valid_completion_for.hpp index 64e1acfd..0aee73f3 100644 --- a/include/beman/execution/detail/valid_completion_for.hpp +++ b/include/beman/execution/detail/valid_completion_for.hpp @@ -4,7 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_VALID_COMPLETION_FOR #define INCLUDED_BEMAN_EXECUTION_DETAIL_VALID_COMPLETION_FOR -#include +#include #include #include #include @@ -38,4 +38,4 @@ concept valid_completion_for = requires(Signature* signature) { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_VALID_COMPLETION_FOR diff --git a/include/beman/execution/detail/valid_completion_signatures.hpp b/include/beman/execution/detail/valid_completion_signatures.hpp index 0599d19d..513cd6b9 100644 --- a/include/beman/execution/detail/valid_completion_signatures.hpp +++ b/include/beman/execution/detail/valid_completion_signatures.hpp @@ -21,4 +21,4 @@ concept valid_completion_signatures = valid_completion_signatures_helper; }; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_VALID_SPECIALIZATION diff --git a/include/beman/execution/detail/value_types_of_t.hpp b/include/beman/execution/detail/value_types_of_t.hpp index 87274572..71b79d02 100644 --- a/include/beman/execution/detail/value_types_of_t.hpp +++ b/include/beman/execution/detail/value_types_of_t.hpp @@ -27,4 +27,4 @@ using value_types_of_t = } // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_VALUE_TYPE_OF diff --git a/include/beman/execution/detail/variant_or_empty.hpp b/include/beman/execution/detail/variant_or_empty.hpp index 52257741..59746e87 100644 --- a/include/beman/execution/detail/variant_or_empty.hpp +++ b/include/beman/execution/detail/variant_or_empty.hpp @@ -34,4 +34,4 @@ using variant_or_empty = typename ::beman::execution::detail::variant_or_empty_h // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_VARIANT_OR_EMPTY diff --git a/include/beman/execution/detail/when_all.hpp b/include/beman/execution/detail/when_all.hpp index daa373d2..7edb52b3 100644 --- a/include/beman/execution/detail/when_all.hpp +++ b/include/beman/execution/detail/when_all.hpp @@ -266,4 +266,4 @@ inline constexpr ::beman::execution::when_all_t when_all{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_WHEN_ALL diff --git a/include/beman/execution/detail/when_all_with_variant.hpp b/include/beman/execution/detail/when_all_with_variant.hpp index c1beba20..0c619669 100644 --- a/include/beman/execution/detail/when_all_with_variant.hpp +++ b/include/beman/execution/detail/when_all_with_variant.hpp @@ -46,4 +46,4 @@ inline constexpr ::beman::execution::when_all_with_variant_t when_all_with_varia // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_WHEN_ALL_WITH_VARIANT diff --git a/include/beman/execution/detail/with_await_transform.hpp b/include/beman/execution/detail/with_await_transform.hpp index adf06047..922edf28 100644 --- a/include/beman/execution/detail/with_await_transform.hpp +++ b/include/beman/execution/detail/with_await_transform.hpp @@ -30,4 +30,4 @@ struct with_await_transform { // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_WITH_AWAIT_TRANSFORM diff --git a/include/beman/execution/detail/with_awaitable_senders.hpp b/include/beman/execution/detail/with_awaitable_senders.hpp index 59371814..b95c7c7b 100644 --- a/include/beman/execution/detail/with_awaitable_senders.hpp +++ b/include/beman/execution/detail/with_awaitable_senders.hpp @@ -50,4 +50,4 @@ struct with_awaitable_senders { } // namespace beman::execution -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_WITH_AWAITABLE_SENDERS diff --git a/include/beman/execution/detail/write_env.hpp b/include/beman/execution/detail/write_env.hpp index 6fff51b3..203c8810 100644 --- a/include/beman/execution/detail/write_env.hpp +++ b/include/beman/execution/detail/write_env.hpp @@ -58,4 +58,4 @@ inline constexpr write_env_t write_env{}; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_WRITE_ENV diff --git a/include/beman/execution/execution.hpp b/include/beman/execution/execution.hpp index b68c68c7..500c7df8 100644 --- a/include/beman/execution/execution.hpp +++ b/include/beman/execution/execution.hpp @@ -65,4 +65,4 @@ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_EXECUTION diff --git a/include/beman/execution/functional.hpp b/include/beman/execution/functional.hpp index dacf10a1..bc1a2f00 100644 --- a/include/beman/execution/functional.hpp +++ b/include/beman/execution/functional.hpp @@ -13,4 +13,4 @@ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_FUNCTIONAL diff --git a/include/beman/execution/stop_token.hpp b/include/beman/execution/stop_token.hpp index 2638ac45..d4901ddb 100644 --- a/include/beman/execution/stop_token.hpp +++ b/include/beman/execution/stop_token.hpp @@ -16,4 +16,4 @@ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_STOP_TOKEN diff --git a/include/beman/execution26/execution.hpp b/include/beman/execution26/execution.hpp index b6d84148..d35d1dc1 100644 --- a/include/beman/execution26/execution.hpp +++ b/include/beman/execution26/execution.hpp @@ -1,8 +1,8 @@ // include/beman/execution26/execution.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION26_EXECUTION -#define INCLUDED_INCLUDE_BEMAN_EXECUTION26_EXECUTION +#ifndef INCLUDED_BEMAN_EXECUTION26_EXECUTION +#define INCLUDED_BEMAN_EXECUTION26_EXECUTION #include @@ -114,4 +114,4 @@ using ::beman::execution::with_awaitable_senders; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION26_EXECUTION diff --git a/include/beman/execution26/stop_token.hpp b/include/beman/execution26/stop_token.hpp index 07605ea1..dcd6a7ea 100644 --- a/include/beman/execution26/stop_token.hpp +++ b/include/beman/execution26/stop_token.hpp @@ -1,8 +1,8 @@ // include/beman/execution26/stop_token.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION26_STOP_TOKEN -#define INCLUDED_INCLUDE_BEMAN_EXECUTION26_STOP_TOKEN +#ifndef INCLUDED_BEMAN_EXECUTION26_STOP_TOKEN +#define INCLUDED_BEMAN_EXECUTION26_STOP_TOKEN #include @@ -25,4 +25,4 @@ using ::beman::execution::unstoppable_token; // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION26_STOP_TOKEN From 2f941f6d726b17b188e2b8a908fd5e6473b2ef1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Tue, 27 Jan 2026 01:18:34 +0000 Subject: [PATCH 02/25] added macroized export declaration --- bin/mk-module.py | 11 ++++++++--- include/beman/execution/detail/affine_on.hpp | 5 +++-- include/beman/execution/detail/apply_sender.hpp | 3 ++- include/beman/execution/detail/as_awaitable.hpp | 5 +++-- include/beman/execution/detail/associate.hpp | 6 +++--- include/beman/execution/detail/basic_sender.hpp | 2 +- include/beman/execution/detail/bulk.hpp | 5 +++-- .../execution/detail/completion_signatures.hpp | 3 ++- .../detail/completion_signatures_of_t.hpp | 3 ++- include/beman/execution/detail/config.hpp | 2 +- include/beman/execution/detail/connect.hpp | 5 +++-- .../beman/execution/detail/connect_result_t.hpp | 3 ++- include/beman/execution/detail/continues_on.hpp | 5 +++-- .../beman/execution/detail/counting_scope.hpp | 3 ++- .../beman/execution/detail/default_domain.hpp | 3 ++- include/beman/execution/detail/env.hpp | 3 ++- include/beman/execution/detail/env_of_t.hpp | 3 ++- .../beman/execution/detail/error_types_of_t.hpp | 7 ++++--- .../beman/execution/detail/forwarding_query.hpp | 5 +++-- include/beman/execution/detail/get_allocator.hpp | 5 +++-- .../detail/get_completion_scheduler.hpp | 5 +++-- .../detail/get_completion_signatures.hpp | 5 +++-- .../detail/get_delegation_scheduler.hpp | 5 +++-- include/beman/execution/detail/get_domain.hpp | 5 +++-- include/beman/execution/detail/get_env.hpp | 5 +++-- include/beman/execution/detail/get_scheduler.hpp | 5 +++-- .../beman/execution/detail/get_stop_token.hpp | 5 +++-- .../execution/detail/inplace_stop_source.hpp | 9 +++++---- include/beman/execution/detail/into_variant.hpp | 7 ++++--- include/beman/execution/detail/just.hpp | 12 ++++++------ include/beman/execution/detail/let.hpp | 13 +++++++------ .../beman/execution/detail/never_stop_token.hpp | 4 +++- include/beman/execution/detail/nostopstate.hpp | 6 ++++-- include/beman/execution/detail/on.hpp | 5 +++-- .../beman/execution/detail/operation_state.hpp | 5 +++-- include/beman/execution/detail/prop.hpp | 3 ++- include/beman/execution/detail/read_env.hpp | 5 +++-- include/beman/execution/detail/receiver.hpp | 5 +++-- include/beman/execution/detail/receiver_of.hpp | 4 ++-- include/beman/execution/detail/run_loop.hpp | 3 ++- include/beman/execution/detail/schedule.hpp | 5 +++-- include/beman/execution/detail/schedule_from.hpp | 5 +++-- .../beman/execution/detail/schedule_result_t.hpp | 3 ++- include/beman/execution/detail/scheduler.hpp | 3 ++- include/beman/execution/detail/scheduler_t.hpp | 4 +++- include/beman/execution/detail/scope_token.hpp | 3 ++- include/beman/execution/detail/sender.hpp | 5 +++-- .../execution/detail/sender_adaptor_closure.hpp | 3 ++- include/beman/execution/detail/sender_in.hpp | 3 ++- include/beman/execution/detail/sends_stopped.hpp | 3 ++- include/beman/execution/detail/set_error.hpp | 5 +++-- include/beman/execution/detail/set_stopped.hpp | 5 +++-- include/beman/execution/detail/set_value.hpp | 5 +++-- .../execution/detail/simple_counting_scope.hpp | 3 ++- include/beman/execution/detail/spawn.hpp | 5 +++-- include/beman/execution/detail/spawn_future.hpp | 5 +++-- include/beman/execution/detail/split.hpp | 5 +++-- include/beman/execution/detail/start.hpp | 5 +++-- include/beman/execution/detail/starts_on.hpp | 5 +++-- .../execution/detail/stop_callback_for_t.hpp | 3 ++- include/beman/execution/detail/stop_source.hpp | 9 +++++---- .../beman/execution/detail/stop_token_of_t.hpp | 3 ++- .../beman/execution/detail/stoppable_token.hpp | 3 ++- include/beman/execution/detail/sync_wait.hpp | 5 +++-- include/beman/execution/detail/tag_of_t.hpp | 3 ++- include/beman/execution/detail/then.hpp | 13 +++++++------ .../beman/execution/detail/transform_sender.hpp | 16 +++++++++------- .../beman/execution/detail/unstoppable_token.hpp | 3 ++- .../beman/execution/detail/value_types_of_t.hpp | 9 +++++---- include/beman/execution/detail/when_all.hpp | 5 +++-- .../execution/detail/when_all_with_variant.hpp | 5 +++-- .../execution/detail/with_awaitable_senders.hpp | 3 ++- include/beman/execution/detail/write_env.hpp | 5 +++-- 73 files changed, 222 insertions(+), 146 deletions(-) diff --git a/bin/mk-module.py b/bin/mk-module.py index eac92b98..19f8832d 100755 --- a/bin/mk-module.py +++ b/bin/mk-module.py @@ -63,13 +63,18 @@ def get_dependencies(component): project_re = re.compile("(?P(?P[bB]eman)/.*)/") define_re = re.compile("#define") +export_re = re.compile("BEMAN_EXECUTION_EXPORT (.*)") def write_header(to, header): with open(f"include/{header}.hpp") as file: for line in file.readlines(): if include_this_line(line): - to.write(line) + match = export_re.match(line) + if match: + to.write(f"export {match.group(1)}\n") + else: + to.write(line) deps = {} @@ -84,6 +89,7 @@ def build_header(file, to, header): with open(module_file, "w") as to: to.write("// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n\n") + to.write("module;\n\n") to.write("#ifdef USE_STD_MODULE\n") to.write("import std;\n") to.write("#else\n") @@ -92,12 +98,11 @@ def build_header(file, to, header): to.write(f"#include <{include}>\n") to.write("#endif\n\n") - to.write("module beman.execution;\n\n") + to.write("export module beman.execution;\n\n") for header in top: if re.match(".*execution26.*", header): continue - print(f"Building module for {header}") prolog_done = False with open(f"include/{header}.hpp") as file: diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index 251cd00d..5a55309c 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_AFFINE_ON #define INCLUDED_BEMAN_EXECUTION_DETAIL_AFFINE_ON +#include #include #include #include @@ -135,8 +136,8 @@ namespace beman::execution { * @brief affine_on is a CPO, used to adapt a sender to complete on the scheduler * it got started on which is derived from get_scheduler on the receiver's environment. */ -using beman::execution::detail::affine_on_t; -inline constexpr affine_on_t affine_on{}; +BEMAN_EXECUTION_EXPORT using affine_on_t = beman::execution::detail::affine_on_t; +BEMAN_EXECUTION_EXPORT inline constexpr affine_on_t affine_on{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/apply_sender.hpp b/include/beman/execution/detail/apply_sender.hpp index c46cafb8..3969f0ed 100644 --- a/include/beman/execution/detail/apply_sender.hpp +++ b/include/beman/execution/detail/apply_sender.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_APPLY_SENDER #define INCLUDED_BEMAN_EXECUTION_DETAIL_APPLY_SENDER +#include #include #include #include @@ -15,7 +16,7 @@ namespace beman::execution { * \brief Function used to transform a sender and its arguments for a domain. * \headerfile beman/execution/execution.hpp */ -template +BEMAN_EXECUTION_EXPORT template requires requires(Domain domain, Tag tag, Sender&& sender, Args&&... args) { domain.apply_sender(Tag(), ::std::forward(sender), ::std::forward(args)...); } diff --git a/include/beman/execution/detail/as_awaitable.hpp b/include/beman/execution/detail/as_awaitable.hpp index ef186616..5a93aa26 100644 --- a/include/beman/execution/detail/as_awaitable.hpp +++ b/include/beman/execution/detail/as_awaitable.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_AS_AWAITABLE #define INCLUDED_BEMAN_EXECUTION_DETAIL_AS_AWAITABLE +#include #include #include #include @@ -20,7 +21,7 @@ namespace beman::execution { * \brief Turn an entity, e.g., a sender, into an awaitable. * \headerfile beman/execution/execution.hpp */ -struct as_awaitable_t { +BEMAN_EXECUTION_EXPORT struct as_awaitable_t { template auto operator()(Expr&& expr, Promise& promise) const { if constexpr (requires { ::std::forward(expr).as_awaitable(promise); }) { @@ -38,7 +39,7 @@ struct as_awaitable_t { } } }; -inline constexpr ::beman::execution::as_awaitable_t as_awaitable{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::as_awaitable_t as_awaitable{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/associate.hpp b/include/beman/execution/detail/associate.hpp index a46843ff..eaf098ee 100644 --- a/include/beman/execution/detail/associate.hpp +++ b/include/beman/execution/detail/associate.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ASSOCIATE #define INCLUDED_BEMAN_EXECUTION_DETAIL_ASSOCIATE +#include #include #include #include @@ -15,7 +16,6 @@ #include #include #include -#include //-dk:TODO remove // ---------------------------------------------------------------------------- @@ -154,8 +154,8 @@ struct completion_signatures_for_impl< } // namespace beman::execution::detail namespace beman::execution { -using associate_t = ::beman::execution::detail::associate_t; -inline constexpr associate_t associate{}; +BEMAN_EXECUTION_EXPORT using associate_t = ::beman::execution::detail::associate_t; +BEMAN_EXECUTION_EXPORT inline constexpr associate_t associate{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/basic_sender.hpp b/include/beman/execution/detail/basic_sender.hpp index 809fd79a..ca09eda5 100644 --- a/include/beman/execution/detail/basic_sender.hpp +++ b/include/beman/execution/detail/basic_sender.hpp @@ -27,7 +27,7 @@ namespace beman::execution::detail { */ template struct basic_sender : ::beman::execution::detail::product_type { - friend struct ::beman::execution::connect_t; + friend struct ::beman::execution::detail::connect_t; friend struct ::beman::execution::get_completion_signatures_t; using sender_concept = ::beman::execution::sender_t; using indices_for = ::std::index_sequence_for; diff --git a/include/beman/execution/detail/bulk.hpp b/include/beman/execution/detail/bulk.hpp index e70d6b0f..7085695e 100644 --- a/include/beman/execution/detail/bulk.hpp +++ b/include/beman/execution/detail/bulk.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_BULK #define INCLUDED_BEMAN_EXECUTION_DETAIL_BULK +#include #include "beman/execution/detail/sender_adaptor.hpp" #include "beman/execution/detail/sender_adaptor_closure.hpp" #include @@ -133,8 +134,8 @@ struct completion_signatures_for_impl< namespace beman::execution { -using ::beman::execution::detail::bulk_t; -inline constexpr ::beman::execution::bulk_t bulk{}; +BEMAN_EXECUTION_EXPORT using bulk_t = ::beman::execution::detail::bulk_t; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::bulk_t bulk{}; } // namespace beman::execution diff --git a/include/beman/execution/detail/completion_signatures.hpp b/include/beman/execution/detail/completion_signatures.hpp index 5cab0339..ad5b8386 100644 --- a/include/beman/execution/detail/completion_signatures.hpp +++ b/include/beman/execution/detail/completion_signatures.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES #define INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES +#include #include #include #include @@ -20,7 +21,7 @@ namespace beman::execution { * any specializaion are empty. Objects may be created to return them from * functions used for type computations like get_completion_signatures(sender, env). */ -template <::beman::execution::detail::completion_signature...> +BEMAN_EXECUTION_EXPORT template <::beman::execution::detail::completion_signature...> struct completion_signatures {}; } // namespace beman::execution diff --git a/include/beman/execution/detail/completion_signatures_of_t.hpp b/include/beman/execution/detail/completion_signatures_of_t.hpp index 3819fbec..48386bbf 100644 --- a/include/beman/execution/detail/completion_signatures_of_t.hpp +++ b/include/beman/execution/detail/completion_signatures_of_t.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_COMPLETION_SIGNATURES_OF +#include #include #include #include @@ -16,7 +17,7 @@ namespace beman::execution { * \brief Alias to access the completion signatures of a sender * \headerfile beman/execution/execution.hpp */ -template > +BEMAN_EXECUTION_EXPORT template > requires ::beman::execution::sender_in using completion_signatures_of_t = ::beman::execution::detail::call_result_t<::beman::execution::get_completion_signatures_t, Sender, Env>; diff --git a/include/beman/execution/detail/config.hpp b/include/beman/execution/detail/config.hpp index 4ef5fc4c..f665ed23 100644 --- a/include/beman/execution/detail/config.hpp +++ b/include/beman/execution/detail/config.hpp @@ -10,4 +10,4 @@ // ---------------------------------------------------------------------------- -#endif +#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CONFIG diff --git a/include/beman/execution/detail/connect.hpp b/include/beman/execution/detail/connect.hpp index d98d9f06..47e70da6 100644 --- a/include/beman/execution/detail/connect.hpp +++ b/include/beman/execution/detail/connect.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT #define INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT +#include #include #include #include @@ -81,7 +82,7 @@ namespace beman::execution { * \brief Type of the connect customization point object. * \headerfile beman/execution/execution.hpp */ -using beman::execution::detail::connect_t; +BEMAN_EXECUTION_EXPORT using connect_t = beman::execution::detail::connect_t; /*! * \brief Customization point object used to connect a sender and a receiver. * \headerfile beman/execution/execution.hpp @@ -90,7 +91,7 @@ using beman::execution::detail::connect_t; * `connect(sender, receiver)` returns the result of calling `sender.connect(receiver)`. * The returned object `state` is an `operation_state` object. */ -inline constexpr connect_t connect{}; +BEMAN_EXECUTION_EXPORT inline constexpr connect_t connect{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/connect_result_t.hpp b/include/beman/execution/detail/connect_result_t.hpp index bed747d4..b315143c 100644 --- a/include/beman/execution/detail/connect_result_t.hpp +++ b/include/beman/execution/detail/connect_result_t.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_RESULT #define INCLUDED_BEMAN_EXECUTION_DETAIL_CONNECT_RESULT +#include #include #include @@ -14,7 +15,7 @@ namespace beman::execution { * \brief Type alias to determine the operation state type returned from `connect()`. * \headerfile beman/execution/execution.hpp */ -template +BEMAN_EXECUTION_EXPORT template using connect_result_t = decltype(::beman::execution::connect(::std::declval(), ::std::declval())); } // namespace beman::execution diff --git a/include/beman/execution/detail/continues_on.hpp b/include/beman/execution/detail/continues_on.hpp index 36b5974b..0dc484f9 100644 --- a/include/beman/execution/detail/continues_on.hpp +++ b/include/beman/execution/detail/continues_on.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_CONTINUES_ON #define INCLUDED_BEMAN_EXECUTION_DETAIL_CONTINUES_ON +#include #include #include #include @@ -86,12 +87,12 @@ auto get_domain_late(Sender&& sender, Env&&) { #include namespace beman::execution { -using ::beman::execution::detail::continues_on_t; +BEMAN_EXECUTION_EXPORT using continues_on_t = ::beman::execution::detail::continues_on_t; /*! * \brief Customization point object to create a `continues_on` sender. * \headerfile beman/execution/execution.hpp */ -inline constexpr continues_on_t continues_on{}; +BEMAN_EXECUTION_EXPORT inline constexpr continues_on_t continues_on{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/counting_scope.hpp b/include/beman/execution/detail/counting_scope.hpp index f3e696fe..bbc6511f 100644 --- a/include/beman/execution/detail/counting_scope.hpp +++ b/include/beman/execution/detail/counting_scope.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE #define INCLUDED_BEMAN_EXECUTION_DETAIL_COUNTING_SCOPE +#include #include #include #include @@ -16,7 +17,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -class counting_scope; +BEMAN_EXECUTION_EXPORT class counting_scope; } // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/default_domain.hpp b/include/beman/execution/detail/default_domain.hpp index a3301932..90a9f7df 100644 --- a/include/beman/execution/detail/default_domain.hpp +++ b/include/beman/execution/detail/default_domain.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_DEFAULT_DOMAIN #define INCLUDED_BEMAN_EXECUTION_DETAIL_DEFAULT_DOMAIN +#include #include #include #include @@ -24,7 +25,7 @@ namespace beman::execution { * tag type of the passed sender. If there is no corresponding member function * no transformation is applied. */ -struct default_domain { +BEMAN_EXECUTION_EXPORT struct default_domain { template <::beman::execution::sender Sender, ::beman::execution::detail::queryable... Env> requires(sizeof...(Env) <= 1) && requires(Sender&& sender, Env&&... env) { ::beman::execution::tag_of_t().transform_sender(::std::forward(sender), diff --git a/include/beman/execution/detail/env.hpp b/include/beman/execution/detail/env.hpp index 9f167e5e..ec2b1441 100644 --- a/include/beman/execution/detail/env.hpp +++ b/include/beman/execution/detail/env.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ENV #define INCLUDED_BEMAN_EXECUTION_DETAIL_ENV +#include #include #include #include @@ -32,7 +33,7 @@ struct find_env { } // namespace beman::execution::detail namespace beman::execution { -template <::beman::execution::detail::queryable... Envs> +BEMAN_EXECUTION_EXPORT template <::beman::execution::detail::queryable... Envs> struct env; template <::beman::execution::detail::queryable... Envs> diff --git a/include/beman/execution/detail/env_of_t.hpp b/include/beman/execution/detail/env_of_t.hpp index e22b80af..082c4eae 100644 --- a/include/beman/execution/detail/env_of_t.hpp +++ b/include/beman/execution/detail/env_of_t.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ENV_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_ENV_OF +#include #include #include @@ -14,7 +15,7 @@ namespace beman::execution { * \brief Determine the type of the environment associated with a type * \headerfile beman/execution/execution.hpp */ -template +BEMAN_EXECUTION_EXPORT template using env_of_t = decltype(::beman::execution::get_env(::std::declval())); } // namespace beman::execution diff --git a/include/beman/execution/detail/error_types_of_t.hpp b/include/beman/execution/detail/error_types_of_t.hpp index 399328ae..60b444ab 100644 --- a/include/beman/execution/detail/error_types_of_t.hpp +++ b/include/beman/execution/detail/error_types_of_t.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ERROR_TYPES_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_ERROR_TYPES_OF +#include #include #include #include @@ -19,9 +20,9 @@ namespace beman::execution { * \brief Type alias to get error types for a sender * \headerfile beman/execution/execution.hpp */ -template , - template class Variant = ::beman::execution::detail::variant_or_empty> +BEMAN_EXECUTION_EXPORT template , + template class Variant = ::beman::execution::detail::variant_or_empty> requires ::beman::execution::sender_in using error_types_of_t = ::beman::execution::detail::gather_signatures< ::beman::execution::set_error_t, diff --git a/include/beman/execution/detail/forwarding_query.hpp b/include/beman/execution/detail/forwarding_query.hpp index c71535b9..204c8847 100644 --- a/include/beman/execution/detail/forwarding_query.hpp +++ b/include/beman/execution/detail/forwarding_query.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_FORWARDING_QUERY #define INCLUDED_BEMAN_EXECUTION_DETAIL_FORWARDING_QUERY +#include #include #include #include @@ -37,7 +38,7 @@ namespace beman::execution { * \brief Type of the forwarding_query customization point object * \headerfile beman/execution/execution.hpp */ -using forwarding_query_t = beman::execution::detail::forwarding_query_t; +BEMAN_EXECUTION_EXPORT using forwarding_query_t = beman::execution::detail::forwarding_query_t; /*! * \brief The customization point object to determine whether queries should be forwarded * \headerfile beman/execution/execution.hpp @@ -50,7 +51,7 @@ using forwarding_query_t = beman::execution::detail::forwarding_query_t; * * If the type of `q` is derived from `forwarding_query_t`. * * `false` otherwise. */ -inline constexpr forwarding_query_t forwarding_query{}; +BEMAN_EXECUTION_EXPORT inline constexpr forwarding_query_t forwarding_query{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_allocator.hpp b/include/beman/execution/detail/get_allocator.hpp index 0ae11ecf..2a6c376e 100644 --- a/include/beman/execution/detail/get_allocator.hpp +++ b/include/beman/execution/detail/get_allocator.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_ALLOCATOR #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_ALLOCATOR +#include #include #include #include @@ -15,7 +16,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct get_allocator_t { +BEMAN_EXECUTION_EXPORT struct get_allocator_t { template requires(not requires(Object&& object, const get_allocator_t& tag) { ::std::as_const(object).query(tag); }) auto @@ -50,7 +51,7 @@ struct get_allocator_t { constexpr auto query(const ::beman::execution::forwarding_query_t&) const noexcept -> bool { return true; } }; -inline constexpr get_allocator_t get_allocator{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_allocator_t get_allocator{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_completion_scheduler.hpp b/include/beman/execution/detail/get_completion_scheduler.hpp index 725e474f..2c7b2c24 100644 --- a/include/beman/execution/detail/get_completion_scheduler.hpp +++ b/include/beman/execution/detail/get_completion_scheduler.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_SCHEDULER #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_SCHEDULER +#include #include #include #include @@ -23,7 +24,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template struct get_completion_scheduler_t; template @@ -78,7 +79,7 @@ struct get_completion_scheduler_t : ::beman::execution::forwarding_query_t { } }; -template <::beman::execution::detail::completion_tag Tag> +BEMAN_EXECUTION_EXPORT template <::beman::execution::detail::completion_tag Tag> inline constexpr get_completion_scheduler_t get_completion_scheduler{}; } // namespace beman::execution diff --git a/include/beman/execution/detail/get_completion_signatures.hpp b/include/beman/execution/detail/get_completion_signatures.hpp index caf1fb9f..5fad8b7b 100644 --- a/include/beman/execution/detail/get_completion_signatures.hpp +++ b/include/beman/execution/detail/get_completion_signatures.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_SIGNATURES #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_SIGNATURES +#include #include #include #include @@ -19,7 +20,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct get_completion_signatures_t { +BEMAN_EXECUTION_EXPORT struct get_completion_signatures_t { private: template static auto get(Sender&& sender, Env&& env) noexcept { @@ -60,7 +61,7 @@ struct get_completion_signatures_t { return this->get(::std::forward(sender), ::std::forward(env)); } }; -inline constexpr get_completion_signatures_t get_completion_signatures{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_completion_signatures_t get_completion_signatures{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_delegation_scheduler.hpp b/include/beman/execution/detail/get_delegation_scheduler.hpp index c01a141f..5a6e3248 100644 --- a/include/beman/execution/detail/get_delegation_scheduler.hpp +++ b/include/beman/execution/detail/get_delegation_scheduler.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DELEGATION_SCHEDULER #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DELEGATION_SCHEDULER +#include #include #include #include @@ -11,7 +12,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct get_delegation_scheduler_t { +BEMAN_EXECUTION_EXPORT struct get_delegation_scheduler_t { template requires requires(Env&& env, const get_delegation_scheduler_t& g) { { ::std::as_const(env).query(g) } noexcept -> ::beman::execution::scheduler; @@ -22,7 +23,7 @@ struct get_delegation_scheduler_t { constexpr auto query(const ::beman::execution::forwarding_query_t&) const noexcept -> bool { return true; } }; -inline constexpr get_delegation_scheduler_t get_delegation_scheduler{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_delegation_scheduler_t get_delegation_scheduler{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_domain.hpp b/include/beman/execution/detail/get_domain.hpp index 932e1147..1c4f3aed 100644 --- a/include/beman/execution/detail/get_domain.hpp +++ b/include/beman/execution/detail/get_domain.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DOMAIN #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_DOMAIN +#include #include #include #include @@ -13,7 +14,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct get_domain_t { +BEMAN_EXECUTION_EXPORT struct get_domain_t { template requires(not requires(Object&& object, const get_domain_t& tag) { ::std::forward(object).query(tag); @@ -37,7 +38,7 @@ struct get_domain_t { constexpr auto query(const ::beman::execution::forwarding_query_t&) const noexcept -> bool { return true; } }; -inline constexpr get_domain_t get_domain{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_domain_t get_domain{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_env.hpp b/include/beman/execution/detail/get_env.hpp index 11831c23..6744c3d6 100644 --- a/include/beman/execution/detail/get_env.hpp +++ b/include/beman/execution/detail/get_env.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_ENV #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_ENV +#include #include #include #include @@ -12,7 +13,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct get_env_t { +BEMAN_EXECUTION_EXPORT struct get_env_t { template requires(not requires(::std::add_const_t<::std::remove_cvref_t>& object) { object.get_env(); } || ::beman::execution::detail::queryable< @@ -30,7 +31,7 @@ struct get_env_t { } }; -inline constexpr get_env_t get_env{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_env_t get_env{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_scheduler.hpp b/include/beman/execution/detail/get_scheduler.hpp index 4c7b191d..c3ff14c0 100644 --- a/include/beman/execution/detail/get_scheduler.hpp +++ b/include/beman/execution/detail/get_scheduler.hpp @@ -4,13 +4,14 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_SCHEDULER #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_SCHEDULER +#include #include #include // ---------------------------------------------------------------------------- namespace beman::execution { -struct get_scheduler_t : ::beman::execution::forwarding_query_t { +BEMAN_EXECUTION_EXPORT struct get_scheduler_t : ::beman::execution::forwarding_query_t { template requires requires(const get_scheduler_t& self, Env&& env) { ::std::as_const(env).query(self); } auto operator()(Env&& env) const noexcept { @@ -23,7 +24,7 @@ struct get_scheduler_t : ::beman::execution::forwarding_query_t { } }; -inline constexpr get_scheduler_t get_scheduler{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_scheduler_t get_scheduler{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/get_stop_token.hpp b/include/beman/execution/detail/get_stop_token.hpp index 2c5b4a61..bbd59209 100644 --- a/include/beman/execution/detail/get_stop_token.hpp +++ b/include/beman/execution/detail/get_stop_token.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_STOP_TOKEN #define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_STOP_TOKEN +#include #include #include #include @@ -17,7 +18,7 @@ template concept decayed_stoppable_token = ::beman::execution::stoppable_token<::std::decay_t>; } namespace beman::execution { -struct get_stop_token_t { +BEMAN_EXECUTION_EXPORT struct get_stop_token_t { template requires requires(Object&& object, const get_stop_token_t& tag) { { ::std::as_const(object).query(tag) } noexcept -> ::beman::execution::detail::decayed_stoppable_token; @@ -34,7 +35,7 @@ struct get_stop_token_t { constexpr auto query(const ::beman::execution::forwarding_query_t&) const noexcept -> bool { return true; } }; -inline constexpr get_stop_token_t get_stop_token{}; +BEMAN_EXECUTION_EXPORT inline constexpr get_stop_token_t get_stop_token{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/inplace_stop_source.hpp b/include/beman/execution/detail/inplace_stop_source.hpp index 92e05028..42095a4f 100644 --- a/include/beman/execution/detail/inplace_stop_source.hpp +++ b/include/beman/execution/detail/inplace_stop_source.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_INPLACE_STOP_SOURCE #define INCLUDED_BEMAN_EXECUTION_DETAIL_INPLACE_STOP_SOURCE +#include #include #include #include @@ -14,11 +15,11 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -class inplace_stop_token; -class inplace_stop_source; -template +BEMAN_EXECUTION_EXPORT class inplace_stop_token; +BEMAN_EXECUTION_EXPORT class inplace_stop_source; +BEMAN_EXECUTION_EXPORT template class inplace_stop_callback; -template +BEMAN_EXECUTION_EXPORT template inplace_stop_callback(::beman::execution::inplace_stop_token, CallbackFun) -> inplace_stop_callback; } // namespace beman::execution diff --git a/include/beman/execution/detail/into_variant.hpp b/include/beman/execution/detail/into_variant.hpp index 7f702b5f..03a2786f 100644 --- a/include/beman/execution/detail/into_variant.hpp +++ b/include/beman/execution/detail/into_variant.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_INTO_VARIANT #define INCLUDED_BEMAN_EXECUTION_DETAIL_INTO_VARIANT +#include #include #include #include @@ -29,7 +30,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution::detail { -struct into_variant_t { +BEMAN_EXECUTION_EXPORT struct into_variant_t { template <::beman::execution::sender Sender> auto operator()(Sender&& sender) const { auto domain{::beman::execution::detail::get_domain_early(sender)}; @@ -93,8 +94,8 @@ struct completion_signatures_for_impl< } // namespace beman::execution::detail namespace beman::execution { -using into_variant_t = ::beman::execution::detail::into_variant_t; -inline constexpr into_variant_t into_variant{}; +BEMAN_EXECUTION_EXPORT using into_variant_t = ::beman::execution::detail::into_variant_t; +BEMAN_EXECUTION_EXPORT inline constexpr into_variant_t into_variant{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/just.hpp b/include/beman/execution/detail/just.hpp index 69b57729..04d0af23 100644 --- a/include/beman/execution/detail/just.hpp +++ b/include/beman/execution/detail/just.hpp @@ -60,9 +60,9 @@ struct impls_for> : ::beman::execution::detail::default_impls #include namespace beman::execution { -using just_t = ::beman::execution::detail::just_t<::beman::execution::set_value_t>; -using just_error_t = ::beman::execution::detail::just_t<::beman::execution::set_error_t>; -using just_stopped_t = ::beman::execution::detail::just_t<::beman::execution::set_stopped_t>; +BEMAN_EXECUTION_EXPORT using just_t = ::beman::execution::detail::just_t<::beman::execution::set_value_t>; +BEMAN_EXECUTION_EXPORT using just_error_t = ::beman::execution::detail::just_t<::beman::execution::set_error_t>; +BEMAN_EXECUTION_EXPORT using just_stopped_t = ::beman::execution::detail::just_t<::beman::execution::set_stopped_t>; /*! * \brief just(_arg_...) yields a sender completing with set_value_t(_Arg_...) @@ -113,7 +113,7 @@ using just_stopped_t = ::beman::execution::detail::just_t<::beman::execution::se * } * */ -inline constexpr ::beman::execution::just_t just{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::just_t just{}; /*! * \brief just_error(_error_) yields a sender completing with set_error_t(_Error_) @@ -171,7 +171,7 @@ inline constexpr ::beman::execution::just_t just{}; * } * */ -inline constexpr ::beman::execution::just_error_t just_error{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::just_error_t just_error{}; /*! * \brief just_stopped() yields a sender completing with set_stopped_t() @@ -225,7 +225,7 @@ inline constexpr ::beman::execution::just_error_t just_error{}; * } * */ -inline constexpr ::beman::execution::just_stopped_t just_stopped{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::just_stopped_t just_stopped{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/let.hpp b/include/beman/execution/detail/let.hpp index 23a53517..b01f3925 100644 --- a/include/beman/execution/detail/let.hpp +++ b/include/beman/execution/detail/let.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_LET #define INCLUDED_BEMAN_EXECUTION_DETAIL_LET +#include #include #include #include @@ -235,13 +236,13 @@ struct completion_signatures_for_impl< #include namespace beman::execution { -using let_error_t = ::beman::execution::detail::let_t<::beman::execution::set_error_t>; -using let_stopped_t = ::beman::execution::detail::let_t<::beman::execution::set_stopped_t>; -using let_value_t = ::beman::execution::detail::let_t<::beman::execution::set_value_t>; +BEMAN_EXECUTION_EXPORT using let_error_t = ::beman::execution::detail::let_t<::beman::execution::set_error_t>; +BEMAN_EXECUTION_EXPORT using let_stopped_t = ::beman::execution::detail::let_t<::beman::execution::set_stopped_t>; +BEMAN_EXECUTION_EXPORT using let_value_t = ::beman::execution::detail::let_t<::beman::execution::set_value_t>; -inline constexpr ::beman::execution::let_error_t let_error{}; -inline constexpr ::beman::execution::let_stopped_t let_stopped{}; -inline constexpr ::beman::execution::let_value_t let_value{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::let_error_t let_error{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::let_stopped_t let_stopped{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::let_value_t let_value{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/never_stop_token.hpp b/include/beman/execution/detail/never_stop_token.hpp index 12fdbdbd..5bf94a3d 100644 --- a/include/beman/execution/detail/never_stop_token.hpp +++ b/include/beman/execution/detail/never_stop_token.hpp @@ -4,10 +4,12 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_NEVER_STOP_TOKEN #define INCLUDED_BEMAN_EXECUTION_DETAIL_NEVER_STOP_TOKEN +#include + // ---------------------------------------------------------------------------- namespace beman::execution { -class never_stop_token; +BEMAN_EXECUTION_EXPORT class never_stop_token; } // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/nostopstate.hpp b/include/beman/execution/detail/nostopstate.hpp index 7df3c485..0b3d0ae4 100644 --- a/include/beman/execution/detail/nostopstate.hpp +++ b/include/beman/execution/detail/nostopstate.hpp @@ -4,14 +4,16 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_NOSTOPSTATE #define INCLUDED_BEMAN_EXECUTION_DETAIL_NOSTOPSTATE +#include + // ---------------------------------------------------------------------------- namespace beman::execution { -struct nostopstate_t { +BEMAN_EXECUTION_EXPORT struct nostopstate_t { explicit nostopstate_t() = default; }; -inline constexpr nostopstate_t nostopstate{}; +BEMAN_EXECUTION_EXPORT inline constexpr nostopstate_t nostopstate{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/on.hpp b/include/beman/execution/detail/on.hpp index e672f6c2..7e04059e 100644 --- a/include/beman/execution/detail/on.hpp +++ b/include/beman/execution/detail/on.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_ON #define INCLUDED_BEMAN_EXECUTION_DETAIL_ON +#include #include #include #include @@ -135,8 +136,8 @@ struct on_t : ::beman::execution::sender_adaptor_closure { } // namespace beman::execution::detail namespace beman::execution { -using on_t = ::beman::execution::detail::on_t; -inline constexpr ::beman::execution::on_t on{}; +BEMAN_EXECUTION_EXPORT using on_t = ::beman::execution::detail::on_t; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::on_t on{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/operation_state.hpp b/include/beman/execution/detail/operation_state.hpp index 4faf372e..e61574cd 100644 --- a/include/beman/execution/detail/operation_state.hpp +++ b/include/beman/execution/detail/operation_state.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_OPERATION_STATE #define INCLUDED_BEMAN_EXECUTION_DETAIL_OPERATION_STATE +#include #include #include #include @@ -11,9 +12,9 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct operation_state_t {}; +BEMAN_EXECUTION_EXPORT struct operation_state_t {}; -template +BEMAN_EXECUTION_EXPORT template concept operation_state = ::std::derived_from && ::std::is_object_v && requires(State& state) { diff --git a/include/beman/execution/detail/prop.hpp b/include/beman/execution/detail/prop.hpp index 9e8a1200..3a1c607a 100644 --- a/include/beman/execution/detail/prop.hpp +++ b/include/beman/execution/detail/prop.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_PROP #define INCLUDED_BEMAN_EXECUTION_DETAIL_PROP +#include #include #include #include @@ -16,7 +17,7 @@ struct prop_like; } namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template struct prop; template diff --git a/include/beman/execution/detail/read_env.hpp b/include/beman/execution/detail/read_env.hpp index abcd8c73..dc98409c 100644 --- a/include/beman/execution/detail/read_env.hpp +++ b/include/beman/execution/detail/read_env.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_READ_ENV #define INCLUDED_BEMAN_EXECUTION_DETAIL_READ_ENV +#include #include #include #include @@ -53,8 +54,8 @@ struct completion_signatures_for_impl< } // namespace beman::execution::detail namespace beman::execution { -using read_env_t = beman::execution::detail::read_env_t; -inline constexpr read_env_t read_env{}; +BEMAN_EXECUTION_EXPORT using read_env_t = beman::execution::detail::read_env_t; +BEMAN_EXECUTION_EXPORT inline constexpr read_env_t read_env{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/receiver.hpp b/include/beman/execution/detail/receiver.hpp index 86fae1a3..168e3c07 100644 --- a/include/beman/execution/detail/receiver.hpp +++ b/include/beman/execution/detail/receiver.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_RECEIVER #define INCLUDED_BEMAN_EXECUTION_DETAIL_RECEIVER +#include #include #include #include @@ -12,9 +13,9 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct receiver_t {}; +BEMAN_EXECUTION_EXPORT struct receiver_t {}; -template +BEMAN_EXECUTION_EXPORT template concept receiver = ::std::derived_from::receiver_concept, ::beman::execution::receiver_t> && requires(const ::std::remove_cvref_t& rcvr) { diff --git a/include/beman/execution/detail/receiver_of.hpp b/include/beman/execution/detail/receiver_of.hpp index 6da1af85..b591250e 100644 --- a/include/beman/execution/detail/receiver_of.hpp +++ b/include/beman/execution/detail/receiver_of.hpp @@ -4,16 +4,16 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_RECEIVER_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_RECEIVER_OF +#include #include #include // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template concept receiver_of = beman::execution::receiver && beman::execution::detail::has_completions; - } // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/run_loop.hpp b/include/beman/execution/detail/run_loop.hpp index cef6ff8c..2d7b9f83 100644 --- a/include/beman/execution/detail/run_loop.hpp +++ b/include/beman/execution/detail/run_loop.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_RUN_LOOP #define INCLUDED_BEMAN_EXECUTION_DETAIL_RUN_LOOP +#include #include #include #include @@ -25,7 +26,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -class run_loop { +BEMAN_EXECUTION_EXPORT class run_loop { private: struct scheduler; diff --git a/include/beman/execution/detail/schedule.hpp b/include/beman/execution/detail/schedule.hpp index 65af2118..3aad46d1 100644 --- a/include/beman/execution/detail/schedule.hpp +++ b/include/beman/execution/detail/schedule.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE #define INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE +#include #include #include #include @@ -13,7 +14,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct schedule_t { +BEMAN_EXECUTION_EXPORT struct schedule_t { template requires(not requires(Scheduler&& sched) { { ::std::forward(sched).schedule() } -> ::beman::execution::sender; @@ -30,7 +31,7 @@ struct schedule_t { } }; -inline constexpr ::beman::execution::schedule_t schedule{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::schedule_t schedule{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/schedule_from.hpp b/include/beman/execution/detail/schedule_from.hpp index 569f9f9e..3dbcbfa3 100644 --- a/include/beman/execution/detail/schedule_from.hpp +++ b/include/beman/execution/detail/schedule_from.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE_FROM #define INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE_FROM +#include #include #include #include @@ -180,8 +181,8 @@ struct completion_signatures_for_impl< } // namespace beman::execution::detail namespace beman::execution { -using schedule_from_t = beman::execution::detail::schedule_from_t; -inline constexpr ::beman::execution::schedule_from_t schedule_from{}; +BEMAN_EXECUTION_EXPORT using schedule_from_t = beman::execution::detail::schedule_from_t; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::schedule_from_t schedule_from{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/schedule_result_t.hpp b/include/beman/execution/detail/schedule_result_t.hpp index 9a514f0b..5118cb2a 100644 --- a/include/beman/execution/detail/schedule_result_t.hpp +++ b/include/beman/execution/detail/schedule_result_t.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE_RESULT #define INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULE_RESULT +#include #include #include #include @@ -11,7 +12,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -template <::beman::execution::scheduler Scheduler> +BEMAN_EXECUTION_EXPORT template <::beman::execution::scheduler Scheduler> using schedule_result_t = decltype(::beman::execution::schedule(::std::declval())); } diff --git a/include/beman/execution/detail/scheduler.hpp b/include/beman/execution/detail/scheduler.hpp index 153f2055..a5f1dfa6 100644 --- a/include/beman/execution/detail/scheduler.hpp +++ b/include/beman/execution/detail/scheduler.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULER #define INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULER +#include #include #include #include @@ -16,7 +17,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template concept scheduler = ::beman::execution::detail::almost_scheduler && requires(Scheduler&& sched) { { ::beman::execution::get_completion_scheduler<::beman::execution::set_value_t>( diff --git a/include/beman/execution/detail/scheduler_t.hpp b/include/beman/execution/detail/scheduler_t.hpp index 7652db80..9efe67fd 100644 --- a/include/beman/execution/detail/scheduler_t.hpp +++ b/include/beman/execution/detail/scheduler_t.hpp @@ -4,6 +4,8 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULER_T #define INCLUDED_BEMAN_EXECUTION_DETAIL_SCHEDULER_T +#include +; // ---------------------------------------------------------------------------- namespace beman::execution { @@ -11,7 +13,7 @@ namespace beman::execution { * \brief Tag type to indicate a class is a scheduler. * \headerfile beman/execution/execution.hpp */ -struct scheduler_t {}; +BEMAN_EXECUTION_EXPORT struct scheduler_t {}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/scope_token.hpp b/include/beman/execution/detail/scope_token.hpp index 609921c8..2a01353a 100644 --- a/include/beman/execution/detail/scope_token.hpp +++ b/include/beman/execution/detail/scope_token.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN #define INCLUDED_BEMAN_EXECUTION_DETAIL_SCOPE_TOKEN +#include #include #include #include @@ -28,7 +29,7 @@ static_assert(::beman::execution::sender_in<::beman::execution::detail::token_te } // namespace beman::execution::detail namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template concept scope_token = ::std::copyable && requires(Token token) { { token.try_associate() } -> ::std::same_as; { token.disassociate() } noexcept; diff --git a/include/beman/execution/detail/sender.hpp b/include/beman/execution/detail/sender.hpp index 993fc81f..e2c034c4 100644 --- a/include/beman/execution/detail/sender.hpp +++ b/include/beman/execution/detail/sender.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER #define INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER +#include #include #include #include @@ -15,7 +16,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct sender_t {}; +BEMAN_EXECUTION_EXPORT struct sender_t {}; } // namespace beman::execution namespace beman::execution::detail { template @@ -28,7 +29,7 @@ concept enable_sender = ::beman::execution::detail::env_promise<::beman::execution::env<>>>; } // namespace beman::execution::detail namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template concept sender = ::beman::execution::detail::enable_sender<::std::remove_cvref_t> && requires(const ::std::remove_cvref_t& sndr) { { ::beman::execution::get_env(sndr) } -> ::beman::execution::detail::queryable; diff --git a/include/beman/execution/detail/sender_adaptor_closure.hpp b/include/beman/execution/detail/sender_adaptor_closure.hpp index 029c1c21..5dccb368 100644 --- a/include/beman/execution/detail/sender_adaptor_closure.hpp +++ b/include/beman/execution/detail/sender_adaptor_closure.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_ADAPTOR_CLOSURE #define INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_ADAPTOR_CLOSURE +#include #include #include #include @@ -17,7 +18,7 @@ struct sender_adaptor_closure_base {}; namespace beman::execution { // NOLINTBEGIN(bugprone-crtp-constructor-accessibility) -template +BEMAN_EXECUTION_EXPORT template struct sender_adaptor_closure : ::beman::execution::detail::pipeable::sender_adaptor_closure_base {}; // NOLINTEND(bugprone-crtp-constructor-accessibility) diff --git a/include/beman/execution/detail/sender_in.hpp b/include/beman/execution/detail/sender_in.hpp index 2c0ba335..1650ffdb 100644 --- a/include/beman/execution/detail/sender_in.hpp +++ b/include/beman/execution/detail/sender_in.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_IN #define INCLUDED_BEMAN_EXECUTION_DETAIL_SENDER_IN +#include #include #include #include @@ -13,7 +14,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -template > +BEMAN_EXECUTION_EXPORT template > concept sender_in = ::beman::execution::sender && ::beman::execution::detail::queryable && requires(Sender&& sender, Env&& env) { diff --git a/include/beman/execution/detail/sends_stopped.hpp b/include/beman/execution/detail/sends_stopped.hpp index ee508fa1..f67e58ab 100644 --- a/include/beman/execution/detail/sends_stopped.hpp +++ b/include/beman/execution/detail/sends_stopped.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SENDS_STOPPED #define INCLUDED_BEMAN_EXECUTION_DETAIL_SENDS_STOPPED +#include #include #include #include @@ -15,7 +16,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -template > +BEMAN_EXECUTION_EXPORT template > requires ::beman::execution::sender_in inline constexpr bool sends_stopped{!::std::same_as< ::beman::execution::detail::type_list<>, diff --git a/include/beman/execution/detail/set_error.hpp b/include/beman/execution/detail/set_error.hpp index 9f54268d..9c11b0c3 100644 --- a/include/beman/execution/detail/set_error.hpp +++ b/include/beman/execution/detail/set_error.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SET_ERROR #define INCLUDED_BEMAN_EXECUTION_DETAIL_SET_ERROR +#include #include #include @@ -16,7 +17,7 @@ namespace beman::execution { * \brief Type of the customization point object for error completions. * \headerfile beman/execution/execution.hpp */ -struct set_error_t { +BEMAN_EXECUTION_EXPORT struct set_error_t { template auto operator()(Receiver&, Error&&) const -> void = BEMAN_EXECUTION_DELETE("set_error requires the receiver to be passed as non-const rvalue"); @@ -46,7 +47,7 @@ struct set_error_t { * \brief Customization point object for error completions. * \headerfile beman/execution/execution.hpp */ -inline constexpr set_error_t set_error{}; +BEMAN_EXECUTION_EXPORT inline constexpr set_error_t set_error{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/set_stopped.hpp b/include/beman/execution/detail/set_stopped.hpp index 12cc38cc..01ba7206 100644 --- a/include/beman/execution/detail/set_stopped.hpp +++ b/include/beman/execution/detail/set_stopped.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SET_STOPPED #define INCLUDED_BEMAN_EXECUTION_DETAIL_SET_STOPPED +#include #include #include @@ -16,7 +17,7 @@ namespace beman::execution { * \brief Type of the customization point object for cancellation completions. * \headerfile beman/execution/execution.hpp */ -struct set_stopped_t { +BEMAN_EXECUTION_EXPORT struct set_stopped_t { template auto operator()(Receiver&) const -> void = BEMAN_EXECUTION_DELETE("set_stopped requires the receiver to be passed as non-const rvalue"); @@ -42,7 +43,7 @@ struct set_stopped_t { * \brief Customization point object for cancellation completions. * \headerfile beman/execution/execution.hpp */ -inline constexpr set_stopped_t set_stopped{}; +BEMAN_EXECUTION_EXPORT inline constexpr set_stopped_t set_stopped{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/set_value.hpp b/include/beman/execution/detail/set_value.hpp index 0abd506c..c0f0341e 100644 --- a/include/beman/execution/detail/set_value.hpp +++ b/include/beman/execution/detail/set_value.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SET_VALUE #define INCLUDED_BEMAN_EXECUTION_DETAIL_SET_VALUE +#include #include #include @@ -16,7 +17,7 @@ namespace beman::execution { * \brief Type of the customization point object for successful completions. * \headerfile beman/execution/execution.hpp */ -struct set_value_t { +BEMAN_EXECUTION_EXPORT struct set_value_t { template auto operator()(Receiver&, Args&&...) const -> void = BEMAN_EXECUTION_DELETE("set_value requires the receiver to be passed as non-const rvalue"); @@ -44,7 +45,7 @@ struct set_value_t { * \brief Customization point object for successful completions. * \headerfile beman/execution/execution.hpp */ -inline constexpr set_value_t set_value{}; +BEMAN_EXECUTION_EXPORT inline constexpr set_value_t set_value{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/simple_counting_scope.hpp b/include/beman/execution/detail/simple_counting_scope.hpp index 524d2229..9b10662a 100644 --- a/include/beman/execution/detail/simple_counting_scope.hpp +++ b/include/beman/execution/detail/simple_counting_scope.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SIMPLE_COUNTING_SCOPE #define INCLUDED_BEMAN_EXECUTION_DETAIL_SIMPLE_COUNTING_SCOPE +#include #include #include #include @@ -13,7 +14,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -class simple_counting_scope; +BEMAN_EXECUTION_EXPORT class simple_counting_scope; } // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/spawn.hpp b/include/beman/execution/detail/spawn.hpp index 34276470..634e06f6 100644 --- a/include/beman/execution/detail/spawn.hpp +++ b/include/beman/execution/detail/spawn.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN #define INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN +#include #include #include #include @@ -84,8 +85,8 @@ struct spawn_t { } // namespace beman::execution::detail namespace beman::execution { -using spawn_t = ::beman::execution::detail::spawn_t; -inline constexpr spawn_t spawn{}; +BEMAN_EXECUTION_EXPORT using spawn_t = ::beman::execution::detail::spawn_t; +BEMAN_EXECUTION_EXPORT inline constexpr spawn_t spawn{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/spawn_future.hpp b/include/beman/execution/detail/spawn_future.hpp index b81cd339..82c967f0 100644 --- a/include/beman/execution/detail/spawn_future.hpp +++ b/include/beman/execution/detail/spawn_future.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE #define INCLUDED_BEMAN_EXECUTION_DETAIL_SPAWN_FUTURE +#include #include #include #include @@ -262,8 +263,8 @@ struct impls_for : ::beman::execution::detail::default_impls { } // namespace beman::execution::detail namespace beman::execution { -using spawn_future_t = ::beman::execution::detail::spawn_future_t; -inline constexpr spawn_future_t spawn_future{}; +BEMAN_EXECUTION_EXPORT using spawn_future_t = ::beman::execution::detail::spawn_future_t; +BEMAN_EXECUTION_EXPORT inline constexpr spawn_future_t spawn_future{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/split.hpp b/include/beman/execution/detail/split.hpp index 9d56b8c5..18568d18 100644 --- a/include/beman/execution/detail/split.hpp +++ b/include/beman/execution/detail/split.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SPLIT #define INCLUDED_BEMAN_EXECUTION_DETAIL_SPLIT +#include #include #include #include @@ -379,9 +380,9 @@ struct completion_signatures_for_impl< } // namespace beman::execution::detail namespace beman::execution { -using split_t = ::beman::execution::detail::split_t; +BEMAN_EXECUTION_EXPORT using split_t = ::beman::execution::detail::split_t; -inline constexpr ::beman::execution::split_t split{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::split_t split{}; } // namespace beman::execution #endif // INCLUDED_BEMAN_EXECUTION_DETAIL_SPLIT diff --git a/include/beman/execution/detail/start.hpp b/include/beman/execution/detail/start.hpp index 06029f07..f98e6508 100644 --- a/include/beman/execution/detail/start.hpp +++ b/include/beman/execution/detail/start.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_START #define INCLUDED_BEMAN_EXECUTION_DETAIL_START +#include #include #include @@ -11,7 +12,7 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -struct start_t { +BEMAN_EXECUTION_EXPORT struct start_t { template auto operator()(State&&) const -> void = BEMAN_EXECUTION_DELETE("start(obj) requires an lvalue argument"); template @@ -44,7 +45,7 @@ struct start_t { // NOLINTEND(misc-no-recursion) }; -inline constexpr start_t start{}; +BEMAN_EXECUTION_EXPORT inline constexpr start_t start{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/starts_on.hpp b/include/beman/execution/detail/starts_on.hpp index 975f1468..c15a662a 100644 --- a/include/beman/execution/detail/starts_on.hpp +++ b/include/beman/execution/detail/starts_on.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_STARTS_ON #define INCLUDED_BEMAN_EXECUTION_DETAIL_STARTS_ON +#include #include #include #include @@ -53,8 +54,8 @@ struct starts_on_t { } // namespace beman::execution::detail namespace beman::execution { -using ::beman::execution::detail::starts_on_t; -inline constexpr ::beman::execution::detail::starts_on_t starts_on{}; +BEMAN_EXECUTION_EXPORT using starts_on_t = ::beman::execution::detail::starts_on_t; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::detail::starts_on_t starts_on{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/stop_callback_for_t.hpp b/include/beman/execution/detail/stop_callback_for_t.hpp index e7a19af7..d707861b 100644 --- a/include/beman/execution/detail/stop_callback_for_t.hpp +++ b/include/beman/execution/detail/stop_callback_for_t.hpp @@ -4,12 +4,13 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_CALLBACK_FOR #define INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_CALLBACK_FOR +#include #include // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template using stop_callback_for_t = typename Token::template callback_type; } diff --git a/include/beman/execution/detail/stop_source.hpp b/include/beman/execution/detail/stop_source.hpp index 607956d2..a4121e43 100644 --- a/include/beman/execution/detail/stop_source.hpp +++ b/include/beman/execution/detail/stop_source.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_SOURCE #define INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_SOURCE +#include #include #include #include @@ -15,11 +16,11 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -class stop_token; -class stop_source; -template +BEMAN_EXECUTION_EXPORT class stop_token; +BEMAN_EXECUTION_EXPORT class stop_source; +BEMAN_EXECUTION_EXPORT template class stop_callback; -template +BEMAN_EXECUTION_EXPORT template stop_callback(::beman::execution::stop_token, CallbackFun) -> stop_callback; } // namespace beman::execution diff --git a/include/beman/execution/detail/stop_token_of_t.hpp b/include/beman/execution/detail/stop_token_of_t.hpp index bee8eced..511027b9 100644 --- a/include/beman/execution/detail/stop_token_of_t.hpp +++ b/include/beman/execution/detail/stop_token_of_t.hpp @@ -4,13 +4,14 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_TOKEN_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_STOP_TOKEN_OF +#include #include #include // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template using stop_token_of_t = ::std::remove_cvref_t()))>; } diff --git a/include/beman/execution/detail/stoppable_token.hpp b/include/beman/execution/detail/stoppable_token.hpp index 5b0c2872..dca8ca34 100644 --- a/include/beman/execution/detail/stoppable_token.hpp +++ b/include/beman/execution/detail/stoppable_token.hpp @@ -4,13 +4,14 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_STOPPABLE_TOKEN #define INCLUDED_BEMAN_EXECUTION_DETAIL_STOPPABLE_TOKEN +#include #include #include // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template concept stoppable_token = requires(const Token& token) { typename ::beman::execution::detail::check_type_alias_exist; { token.stop_requested() } noexcept -> ::std::same_as; diff --git a/include/beman/execution/detail/sync_wait.hpp b/include/beman/execution/detail/sync_wait.hpp index df2eeb5f..41ebc49e 100644 --- a/include/beman/execution/detail/sync_wait.hpp +++ b/include/beman/execution/detail/sync_wait.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_SYNC_WAIT #define INCLUDED_BEMAN_EXECUTION_DETAIL_SYNC_WAIT +#include #include #include #include @@ -107,7 +108,7 @@ struct sync_wait_t { } // namespace beman::execution::detail namespace beman::execution { -using sync_wait_t = ::beman::execution::detail::sync_wait_t; +BEMAN_EXECUTION_EXPORT using sync_wait_t = ::beman::execution::detail::sync_wait_t; /*! * \brief sync_wait(_sender_) starts _sender_ and waits for its completion. * \headerfile beman/execution/execution.hpp @@ -155,7 +156,7 @@ using sync_wait_t = ::beman::execution::detail::sync_wait_t; * } * */ -inline constexpr ::beman::execution::sync_wait_t sync_wait{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::sync_wait_t sync_wait{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/tag_of_t.hpp b/include/beman/execution/detail/tag_of_t.hpp index a5347f08..4874f926 100644 --- a/include/beman/execution/detail/tag_of_t.hpp +++ b/include/beman/execution/detail/tag_of_t.hpp @@ -4,13 +4,14 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_TAG_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_TAG_OF +#include #include #include // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template using tag_of_t = typename decltype(::beman::execution::detail::get_sender_meta(::std::declval()))::tag_type; } diff --git a/include/beman/execution/detail/then.hpp b/include/beman/execution/detail/then.hpp index 288637fa..285f291f 100644 --- a/include/beman/execution/detail/then.hpp +++ b/include/beman/execution/detail/then.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_THEN #define INCLUDED_BEMAN_EXECUTION_DETAIL_THEN +#include #include #include #include @@ -149,17 +150,17 @@ namespace beman::execution { * \brief then_t is the type of then. * \headerfile beman/execution/execution.hpp */ -using then_t = ::beman::execution::detail::then_t<::beman::execution::set_value_t>; +BEMAN_EXECUTION_EXPORT using then_t = ::beman::execution::detail::then_t<::beman::execution::set_value_t>; /*! * \brief upon_error_t is the type of upon_error. * \headerfile beman/execution/execution.hpp */ -using upon_error_t = ::beman::execution::detail::then_t<::beman::execution::set_error_t>; +BEMAN_EXECUTION_EXPORT using upon_error_t = ::beman::execution::detail::then_t<::beman::execution::set_error_t>; /*! * \brief upon_stopped_t is the type of upon_stopped. * \headerfile beman/execution/execution.hpp */ -using upon_stopped_t = ::beman::execution::detail::then_t<::beman::execution::set_stopped_t>; +BEMAN_EXECUTION_EXPORT using upon_stopped_t = ::beman::execution::detail::then_t<::beman::execution::set_stopped_t>; /*! * \brief then(_sender_, _fun_) yields a sender transforming a set_value_t(_A_...) completion @@ -211,7 +212,7 @@ using upon_stopped_t = ::beman::execution::detail::then_t<::beman::execution::se * } * */ -inline constexpr ::beman::execution::then_t then{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::then_t then{}; /*! * \brief upon_error(_sender_, _fun_) yields a sender transforming a set_error_t(_E_) @@ -265,7 +266,7 @@ inline constexpr ::beman::execution::then_t then{}; * } * */ -inline constexpr ::beman::execution::upon_error_t upon_error{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::upon_error_t upon_error{}; /*! * \brief upon_stopped(_sender_, _fun_) yields a sender transforming a set_stopped_t() @@ -316,7 +317,7 @@ inline constexpr ::beman::execution::upon_error_t upon_error{}; * } * */ -inline constexpr ::beman::execution::upon_stopped_t upon_stopped{}; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::upon_stopped_t upon_stopped{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/transform_sender.hpp b/include/beman/execution/detail/transform_sender.hpp index 1612e488..dd0f88fe 100644 --- a/include/beman/execution/detail/transform_sender.hpp +++ b/include/beman/execution/detail/transform_sender.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_TRANSFORM_SENDER #define INCLUDED_BEMAN_EXECUTION_DETAIL_TRANSFORM_SENDER +#include #include #include #include @@ -65,7 +66,7 @@ constexpr auto transform_sender(Domain dom, Sender&& sender, const Env&... env) } // namespace beman::execution::detail namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template requires(sizeof...(Env) < 2) && requires(Domain dom, Sender&& sender, const Env&... env) { dom.transform_sender(::std::forward(sender), env...); @@ -78,7 +79,7 @@ constexpr auto transform_sender(Domain, Sender&& sender, const Env&...) noexcept return ::std::forward(sender); } -template +BEMAN_EXECUTION_EXPORT template requires(sizeof...(Env) < 2) && requires(Domain dom, Sender&& sender, const Env&... env) { dom.transform_sender(::std::forward(sender), env...); @@ -92,20 +93,21 @@ constexpr auto transform_sender(Domain dom, Sender&& sender, const Env&... env) dom, dom.transform_sender(::std::forward(sender), env...), env...); } -template +BEMAN_EXECUTION_EXPORT template requires(sizeof...(Env) < 2) && (not requires(Domain dom, Sender&& sender, const Env&... env) { dom.transform_sender(::std::forward(sender), env...); }) && ::std::same_as<::std::remove_cvref_t, ::std::remove_cvref_t(), ::std::declval()...))>> -constexpr auto - transform_sender(Domain, Sender&& sender, const Env&...) noexcept(noexcept(::std::forward(sender))) - -> ::beman::execution::sender decltype(auto) { +constexpr auto transform_sender(Domain, + Sender&& sender, + const Env&...) noexcept(noexcept(::std::forward(sender))) + -> ::beman::execution::sender decltype(auto) { return ::std::forward(sender); } -template +BEMAN_EXECUTION_EXPORT template requires(sizeof...(Env) < 2) && (not requires(Domain dom, Sender&& sender, const Env&... env) { dom.transform_sender(::std::forward(sender), env...); }) && diff --git a/include/beman/execution/detail/unstoppable_token.hpp b/include/beman/execution/detail/unstoppable_token.hpp index 761455d6..c3d89761 100644 --- a/include/beman/execution/detail/unstoppable_token.hpp +++ b/include/beman/execution/detail/unstoppable_token.hpp @@ -4,13 +4,14 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_UNSTOPPABLE_TOKEN #define INCLUDED_BEMAN_EXECUTION_DETAIL_UNSTOPPABLE_TOKEN +#include #include #include // ---------------------------------------------------------------------------- namespace beman::execution { -template +BEMAN_EXECUTION_EXPORT template concept unstoppable_token = ::beman::execution::stoppable_token && requires() { requires ::std::bool_constant::value; }; } // namespace beman::execution diff --git a/include/beman/execution/detail/value_types_of_t.hpp b/include/beman/execution/detail/value_types_of_t.hpp index 71b79d02..af7f68c7 100644 --- a/include/beman/execution/detail/value_types_of_t.hpp +++ b/include/beman/execution/detail/value_types_of_t.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_VALUE_TYPE_OF #define INCLUDED_BEMAN_EXECUTION_DETAIL_VALUE_TYPE_OF +#include #include #include #include @@ -14,10 +15,10 @@ // ---------------------------------------------------------------------------- namespace beman::execution { -template , - template class Tuple = ::beman::execution::detail::decayed_tuple, - template class Variant = ::beman::execution::detail::variant_or_empty> +BEMAN_EXECUTION_EXPORT template , + template class Tuple = ::beman::execution::detail::decayed_tuple, + template class Variant = ::beman::execution::detail::variant_or_empty> requires ::beman::execution::sender_in using value_types_of_t = ::beman::execution::detail::gather_signatures< ::beman::execution::set_value_t, diff --git a/include/beman/execution/detail/when_all.hpp b/include/beman/execution/detail/when_all.hpp index 7edb52b3..2b95f10c 100644 --- a/include/beman/execution/detail/when_all.hpp +++ b/include/beman/execution/detail/when_all.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_WHEN_ALL #define INCLUDED_BEMAN_EXECUTION_DETAIL_WHEN_ALL +#include #include #include #include @@ -260,8 +261,8 @@ struct completion_signatures_for_impl< } // namespace beman::execution::detail namespace beman::execution { -using ::beman::execution::detail::when_all_t; -inline constexpr ::beman::execution::when_all_t when_all{}; +BEMAN_EXECUTION_EXPORT using when_all_t = ::beman::execution::detail::when_all_t; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::when_all_t when_all{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/when_all_with_variant.hpp b/include/beman/execution/detail/when_all_with_variant.hpp index 0c619669..6283fc4e 100644 --- a/include/beman/execution/detail/when_all_with_variant.hpp +++ b/include/beman/execution/detail/when_all_with_variant.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_WHEN_ALL_WITH_VARIANT #define INCLUDED_BEMAN_EXECUTION_DETAIL_WHEN_ALL_WITH_VARIANT +#include #include #include #include @@ -40,8 +41,8 @@ struct when_all_with_variant_t { } // namespace beman::execution::detail namespace beman::execution { -using ::beman::execution::detail::when_all_with_variant_t; -inline constexpr ::beman::execution::when_all_with_variant_t when_all_with_variant{}; +BEMAN_EXECUTION_EXPORT using when_all_with_variant_t = ::beman::execution::detail::when_all_with_variant_t; +BEMAN_EXECUTION_EXPORT inline constexpr ::beman::execution::when_all_with_variant_t when_all_with_variant{}; } // namespace beman::execution // ---------------------------------------------------------------------------- diff --git a/include/beman/execution/detail/with_awaitable_senders.hpp b/include/beman/execution/detail/with_awaitable_senders.hpp index b95c7c7b..290a83bc 100644 --- a/include/beman/execution/detail/with_awaitable_senders.hpp +++ b/include/beman/execution/detail/with_awaitable_senders.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_WITH_AWAITABLE_SENDERS #define INCLUDED_BEMAN_EXECUTION_DETAIL_WITH_AWAITABLE_SENDERS +#include #include #include #include @@ -11,7 +12,7 @@ #include namespace beman::execution { -template <::beman::execution::detail::class_type Promise> +BEMAN_EXECUTION_EXPORT template <::beman::execution::detail::class_type Promise> struct with_awaitable_senders { template requires(!::std::same_as) diff --git a/include/beman/execution/detail/write_env.hpp b/include/beman/execution/detail/write_env.hpp index 203c8810..16198f00 100644 --- a/include/beman/execution/detail/write_env.hpp +++ b/include/beman/execution/detail/write_env.hpp @@ -4,6 +4,7 @@ #ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_WRITE_ENV #define INCLUDED_BEMAN_EXECUTION_DETAIL_WRITE_ENV +#include #include #include #include @@ -52,8 +53,8 @@ inline constexpr write_env_t write_env{}; } // namespace beman::execution::detail namespace beman::execution { -using write_env_t = ::beman::execution::detail::write_env_t; -inline constexpr write_env_t write_env{}; +BEMAN_EXECUTION_EXPORT using write_env_t = ::beman::execution::detail::write_env_t; +BEMAN_EXECUTION_EXPORT inline constexpr write_env_t write_env{}; } // namespace beman::execution // ---------------------------------------------------------------------------- From 5e5ff2fda65e83ebc85b0eabfa21451755c39f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Tue, 27 Jan 2026 20:22:17 +0000 Subject: [PATCH 03/25] a first version apparently importing modules --- .gitignore | 1 + CMakeLists.txt | 5 - Makefile | 1 + docs/code/CMakeLists.txt | 6 +- .../execution/detail/transform_sender.hpp | 7 +- src/beman/execution/CMakeLists.txt | 1 + src/beman/execution/execution.cppm | 7927 ++++++++++++++++- .../execution/include/test/execution.hpp | 3 +- .../execution/stop-token-module.test.cpp | 6 +- .../beman/execution/stopsource-cons.test.cpp | 1 + .../stoptoken-inplace-members.test.cpp | 1 + 11 files changed, 7736 insertions(+), 223 deletions(-) diff --git a/.gitignore b/.gitignore index 166fdc85..14a93b42 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ docs/html docs/latex docs/code/*.cpp docs/tutorial.md +gcm.cache diff --git a/CMakeLists.txt b/CMakeLists.txt index f4920dff..409e197c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,11 +112,6 @@ if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES) return() endif() -set(CMAKE_CXX_SCAN_FOR_MODULES ON) -add_library(beman_execution) -target_sources(beman_execution PUBLIC FILE_SET modules_public TYPE CXX_MODULES - FILES modules/execution.cppm) - include(CMakePackageConfigHelpers) write_basic_package_version_file( diff --git a/Makefile b/Makefile index 825c9daf..423c7d2d 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,7 @@ build: -D CMAKE_CXX_STANDARD=23 \ -D CMAKE_CXX_EXTENSIONS=ON \ -D CMAKE_CXX_STANDARD_REQUIRED=ON \ + -D CMAKE_CXX_SCAN_FOR_MODULES=ON \ -D CMAKE_CXX_COMPILER=$(CXX) # XXX -D CMAKE_CXX_FLAGS="$(CXX_FLAGS) $(SAN_FLAGS)" cmake --build $(BUILD) diff --git a/docs/code/CMakeLists.txt b/docs/code/CMakeLists.txt index 2d2752d3..d22c6ca5 100644 --- a/docs/code/CMakeLists.txt +++ b/docs/code/CMakeLists.txt @@ -5,9 +5,9 @@ list(APPEND EXAMPLES) -if(BEMAN_USE_MODULES) - list(APPEND EXAMPLES modules) # modules.cpp -endif() +# if(BEMAN_USE_MODULES) +# list(APPEND EXAMPLES modules) # modules.cpp +# endif() foreach(EXAMPLE ${EXAMPLES}) set(EXAMPLE_TARGET ${TARGET_PREFIX}.tutorial.${EXAMPLE}) diff --git a/include/beman/execution/detail/transform_sender.hpp b/include/beman/execution/detail/transform_sender.hpp index dd0f88fe..4c4d6db2 100644 --- a/include/beman/execution/detail/transform_sender.hpp +++ b/include/beman/execution/detail/transform_sender.hpp @@ -100,10 +100,9 @@ BEMAN_EXECUTION_EXPORT template , ::std::remove_cvref_t(), ::std::declval()...))>> -constexpr auto transform_sender(Domain, - Sender&& sender, - const Env&...) noexcept(noexcept(::std::forward(sender))) - -> ::beman::execution::sender decltype(auto) { +constexpr auto + transform_sender(Domain, Sender&& sender, const Env&...) noexcept(noexcept(::std::forward(sender))) + -> ::beman::execution::sender decltype(auto) { return ::std::forward(sender); } diff --git a/src/beman/execution/CMakeLists.txt b/src/beman/execution/CMakeLists.txt index 0a3e3e34..5f8cbde4 100644 --- a/src/beman/execution/CMakeLists.txt +++ b/src/beman/execution/CMakeLists.txt @@ -55,6 +55,7 @@ target_sources( ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/completion_signatures_for.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/completion_signatures_of_t.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/completion_tag.hpp + ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/config.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/connect.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/connect_all.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/connect_all_result.hpp diff --git a/src/beman/execution/execution.cppm b/src/beman/execution/execution.cppm index b8c57614..5a714c53 100644 --- a/src/beman/execution/execution.cppm +++ b/src/beman/execution/execution.cppm @@ -1,222 +1,7741 @@ -// src/beman/execution/execution.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +module; + +#ifdef USE_STD_MODULE +import std; +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +export module beman.execution; + + + + + + + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template +concept queryable = ::std::destructible; +} + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template +concept movable_value = + ::std::move_constructible<::std::decay_t> && ::std::constructible_from<::std::decay_t, T> && + (!::std::is_array_v<::std::remove_reference_t>); +} + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template +struct matching_sig_transform { + using type = Fun; +}; +template +struct matching_sig_transform { + using type = Return(Args&&...); +}; + +template +inline constexpr bool matching_sig = + ::std::same_as::type, + typename ::beman::execution::detail::matching_sig_transform::type>; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +/*! + * \brief Turn an error into a suitable exception_ptr. + * \headerfile beman/execution/execution.hpp + * \internal + */ +template +decltype(auto) as_except_ptr(Error&& error) { + if constexpr (::std::same_as<::std::exception_ptr, ::std::decay_t>) { + return ::std::forward(error); + } else if constexpr (::std::same_as<::std::error_code, ::std::decay_t>) { + return ::std::make_exception_ptr(::std::system_error(error)); + } else { + return ::std::make_exception_ptr(::std::forward(error)); + } +} +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + +// ---------------------------------------------------------------------------- + +#define BEMAN_EXECUTION_EXPORT + +// ---------------------------------------------------------------------------- + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +struct non_assignable; +} + +// ---------------------------------------------------------------------------- + +struct beman::execution::detail::non_assignable { + non_assignable() = default; + non_assignable(non_assignable&&) = default; + non_assignable(const non_assignable&) = default; + auto operator=(non_assignable&&) -> non_assignable& = delete; + auto operator=(const non_assignable&) -> non_assignable& = delete; +}; + +// ---------------------------------------------------------------------------- + + + +// ---------------------------------------------------------------------------- + +#if defined(disabled__cpp_deleted_function) +#define BEMAN_EXECUTION_DELETE(msg) delete (msg) +#else +#define BEMAN_EXECUTION_DELETE(msg) delete +#endif + +// ---------------------------------------------------------------------------- +/*! + * \mainpage Asynchronous Operation Support + * + * This project implements the C++ support for asynchronous operations, + * knows as _sender/receiver_ or `std::execution`. + * + * There are a few ingredients to using `std::execution`: + * + * - Sender algorithms to composes work into an asynchronous workflow. + * - Something holding and starting senders like `sync_wait()` + * or `counting_scope`. + * - A coroutine binding like `task` to make sender composition + * easier for typical use cases. + * - Some tools like a sender-aware `concurrent_queue`. + * - Senders describing some asynchronous work. Sadly, there are + * currently no such senders are proposed. + */ + +/*! + * \namespace beman + * \brief Namespace for Beman projects http://github.com/bemanproject/beman + * \headerfile beman/execution/execution.hpp + */ +namespace beman { +/*! + * \namespace beman::execution + * \brief Namespace for asynchronous operations and their vocabulary. + * + * \details + * The beman::execution namespace contains various components for + * accessing asynchronous operations. + * + * \headerfile beman/execution/execution.hpp + */ +namespace execution { + +/*! + * \namespace beman::execution::detail + * \brief Namespace for implementation details related to beman::execution + * \internal + */ +namespace detail {} +} // namespace execution +} // namespace beman + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template +concept simple_allocator = + requires(::std::remove_cvref_t alloc, ::std::size_t n) { + { *alloc.allocate(n) } -> ::std::same_as::value_type&>; + alloc.deallocate(alloc.allocate(n), n); + } && ::std::copy_constructible<::std::remove_cvref_t> && + ::std::equality_comparable<::std::remove_cvref_t>; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + +// ---------------------------------------------------------------------------- + +#if defined(__GNUC__) +#define BEMAN_EXECUTION_DIAGNOSTIC_PUSHED +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif // #if defined(__GNUC__) + +#if defined(__clang__) +#define BEMAN_EXECUTION_DIAGNOSTIC_PUSHED +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunknown-warning-option" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wc++26-extensions" +#endif // #if defined(__clang__) + +// ---------------------------------------------------------------------------- + +#ifdef BEMAN_EXECUTION_DIAGNOSTIC_PUSHED +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif // #if defined(__GNUC__) +#if defined(__clang__) +#pragma clang diagnostic pop +#endif // #if defined(__clang__) +#undef BEMAN_EXECUTION_DIAGNOSTIC_PUSHED +#endif // #ifdef BEMAN_EXECUTION_DIAGNOSTIC_PUSHED + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +//-dk:TODO thoroughly test the concept +/*! + * \brief Helper concept to determine if the result of decaying two types results in the same type + * \headerfile beman/execution/execution.hpp + * \internal + */ +template +concept decayed_same_as = ::std::same_as<::std::remove_cvref_t, ::std::remove_cvref_t>; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +/*! + * \brief Concept used to detect callable objects. + * \headerfile beman/execution/execution.hpp + * \concept callable + * \internal + */ +template +concept callable = requires(Fun&& fun, Args&&... args) { ::std::forward(fun)(::std::forward(args)...); }; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- +// std::forward_like() doesn't work on some compilers, yet. This header +// provides a work-around. + +namespace beman::execution::detail { +template +struct forward_like_helper; + +template +struct forward_like_helper { + template + static auto forward(U&& u) -> ::std::remove_reference_t&& { + return ::std::move(u); // NOLINT(bugprone-move-forwarding-reference) + } +}; +template +struct forward_like_helper { + template + static auto forward(U&& u) -> ::std::remove_cvref_t&& { + return ::std::move(u); // NOLINT(bugprone-move-forwarding-reference) + } +}; +template +struct forward_like_helper { + template + static auto forward(U&& u) -> ::std::remove_cvref_t& { + return ::std::forward(u); + } +}; +template +struct forward_like_helper { + template + static auto forward(U&& u) -> const ::std::remove_cvref_t&& { + return ::std::move(u); // NOLINT(bugprone-move-forwarding-reference) + } +}; +template +struct forward_like_helper { + template + static auto forward(U&& u) -> const ::std::remove_cvref_t& { + return ::std::forward(u); + } +}; + +// The overload own_forward_like is used for testing on systems +// which actually do provide an implementation. +template +auto own_forward_like(U&& u) noexcept -> decltype(auto) { + return ::beman::execution::detail::forward_like_helper::forward(::std::forward(u)); +} + +/*! + * \brief Helper function to forward a subobject (in case the standard library version is unavailable) + * \headerfile beman/execution/execution.hpp + * \internal + */ +template +auto forward_like(U&& u) noexcept -> decltype(auto) { +#if 202207 <= disabled__cpp_lib_forward_like + return ::std::forward_like(::std::forward(u)); +#else + return ::beman::execution::detail::forward_like_helper::forward(::std::forward(u)); +#endif +} + +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template +class join_env { + private: + Env1 env1; + Env2 env2; + + public: + template + join_env(E1&& e1, E2&& e2) : env1(::std::forward(e1)), env2(::std::forward(e2)) {} + + template + requires( + requires(Env1&, const Query& query, Args&&... args) { + env1.query(query, ::std::forward(args)...); + } || + requires(Env2& e2, const Query& query, Args&&... args) { e2.query(query, ::std::forward(args)...); }) + auto query(const Query& query, Args&&... args) noexcept -> decltype(auto) { + if constexpr (requires { env1.query(query, ::std::forward(args)...); }) { + return env1.query(query, ::std::forward(args)...); + } else { + return env2.query(query, ::std::forward(args)...); + } + } + template + requires( + requires(const Env1&, const Query& query, Args&&... args) { + env1.query(query, ::std::forward(args)...); + } || + requires(const Env2& e2, const Query& query, Args&&... args) { + e2.query(query, ::std::forward(args)...); + }) + auto query(const Query& query, Args&&... args) const noexcept -> decltype(auto) { + if constexpr (requires { env1.query(query, ::std::forward(args)...); }) { + return env1.query(query, ::std::forward(args)...); + } else { + return env2.query(query, ::std::forward(args)...); + } + } +}; + +template +join_env(Env1&&, Env2&&) -> join_env<::std::remove_cvref_t, ::std::remove_cvref_t>; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template + requires requires(const Tag& tag, const Env& env) { tag(env); } +constexpr auto query_with_default(Tag, const Env& env, Value&&) noexcept(noexcept(Tag()(env))) -> decltype(auto) { + return Tag()(env); +} + +template +constexpr auto +query_with_default(Tag, const Env&, Value&& value) noexcept(noexcept(static_cast(std::forward(value)))) + -> decltype(auto) { + return static_cast(std::forward(value)); +} +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +/*! + * \brief Auxiliary type alias used to determine the type of a child sender. + * \headerfile beman/execution/execution.hpp + * \internal + */ +template +using child_type = decltype(::std::declval().template get()); +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +/*! + * \brief Helper type alias to get type type of a tuple after decaying the argument types + * \headerfile beman/execution/execution.hpp + * \internal + */ +template +using decayed_tuple = ::std::tuple<::std::decay_t...>; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail { +template +class make_env { + private: + Value value; + + public: + template + make_env(const Query&, V&& v) : value(::std::forward(v)) {} + constexpr auto query(const Query&) const noexcept -> const Value& { return this->value; } + constexpr auto query(const Query&) noexcept -> Value& { return this->value; } +}; +template +make_env(Query&&, Value&& value) -> make_env<::std::remove_cvref_t, ::std::remove_cvref_t>; +} // namespace beman::execution::detail + +// ---------------------------------------------------------------------------- + + + +// ---------------------------------------------------------------------------- + +namespace beman::execution::detail::meta::detail { +template +struct prepend; + +template