From 96e60e7a7167f6160b1f87ff4cefb002802dc928 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Tue, 21 Jan 2025 13:50:12 -0800 Subject: [PATCH 1/2] try to clean up some clangd errors --- .clang-tidy | 1 - .clangd | 19 +++- include/exec/__detail/__bit_cast.hpp | 1 - include/exec/__detail/__bwos_lifo_queue.hpp | 1 - include/exec/__detail/__numa.hpp | 8 +- .../__system_context_default_impl.hpp | 2 +- .../__system_context_default_impl_entry.hpp | 2 +- .../__system_context_replaceability_api.hpp | 31 +++--- include/exec/__detail/intrusive_heap.hpp | 1 + include/exec/any_sender_of.hpp | 4 +- include/exec/at_coroutine_exit.hpp | 2 +- include/exec/create.hpp | 1 - include/exec/finally.hpp | 1 - include/exec/inline_scheduler.hpp | 2 - include/exec/into_tuple.hpp | 2 - include/exec/just_from.hpp | 1 - include/exec/libdispatch_queue.hpp | 4 + include/exec/materialize.hpp | 1 - include/exec/on_coro_disposition.hpp | 1 - include/exec/repeat_effect_until.hpp | 3 - include/exec/repeat_n.hpp | 4 - include/exec/reschedule.hpp | 7 +- include/exec/start_now.hpp | 3 - include/exec/task.hpp | 1 - include/exec/timed_scheduler.hpp | 1 - include/exec/timed_thread_scheduler.hpp | 2 - include/exec/trampoline_scheduler.hpp | 2 - include/exec/variant_sender.hpp | 1 - include/exec/when_any.hpp | 2 - include/stdexec/__detail/__as_awaitable.hpp | 3 +- include/stdexec/__detail/__basic_sender.hpp | 3 +- include/stdexec/__detail/__bulk.hpp | 4 +- .../__detail/__completion_signatures.hpp | 2 +- include/stdexec/__detail/__config.hpp | 6 +- .../stdexec/__detail/__connect_awaitable.hpp | 2 +- include/stdexec/__detail/__continues_on.hpp | 4 +- include/stdexec/__detail/__cpo.hpp | 2 +- include/stdexec/__detail/__debug.hpp | 5 +- include/stdexec/__detail/__domain.hpp | 2 +- include/stdexec/__detail/__ensure_started.hpp | 5 +- include/stdexec/__detail/__env.hpp | 5 +- include/stdexec/__detail/__execute.hpp | 6 +- include/stdexec/__detail/__execution_fwd.hpp | 2 +- .../stdexec/__detail/__inline_scheduler.hpp | 2 +- include/stdexec/__detail/__into_variant.hpp | 7 +- include/stdexec/__detail/__intrusive_ptr.hpp | 5 +- include/stdexec/__detail/__just.hpp | 2 +- include/stdexec/__detail/__let.hpp | 6 +- .../stdexec/__detail/__manual_lifetime.hpp | 4 +- include/stdexec/__detail/__meta.hpp | 1 - include/stdexec/__detail/__on.hpp | 3 +- .../stdexec/__detail/__operation_states.hpp | 2 +- include/stdexec/__detail/__optional.hpp | 5 +- include/stdexec/__detail/__ranges.hpp | 2 +- include/stdexec/__detail/__read_env.hpp | 2 +- .../stdexec/__detail/__receiver_adaptor.hpp | 4 +- include/stdexec/__detail/__receiver_ref.hpp | 5 +- include/stdexec/__detail/__receivers.hpp | 2 +- include/stdexec/__detail/__run_loop.hpp | 3 +- include/stdexec/__detail/__schedule_from.hpp | 5 +- include/stdexec/__detail/__schedulers.hpp | 5 +- include/stdexec/__detail/__scope.hpp | 3 +- .../__detail/__sender_adaptor_closure.hpp | 2 +- .../__detail/__sender_introspection.hpp | 2 +- include/stdexec/__detail/__senders.hpp | 2 +- include/stdexec/__detail/__senders_core.hpp | 3 +- include/stdexec/__detail/__shared.hpp | 7 +- include/stdexec/__detail/__split.hpp | 2 +- include/stdexec/__detail/__start_detached.hpp | 3 +- include/stdexec/__detail/__starts_on.hpp | 2 +- include/stdexec/__detail/__stop_token.hpp | 2 +- .../stdexec/__detail/__stopped_as_error.hpp | 2 +- .../__detail/__stopped_as_optional.hpp | 2 +- include/stdexec/__detail/__submit.hpp | 2 +- include/stdexec/__detail/__sync_wait.hpp | 5 +- include/stdexec/__detail/__then.hpp | 2 +- include/stdexec/__detail/__transfer_just.hpp | 2 +- .../__transform_completion_signatures.hpp | 5 +- .../stdexec/__detail/__transform_sender.hpp | 2 +- include/stdexec/__detail/__type_traits.hpp | 2 +- include/stdexec/__detail/__upon_error.hpp | 4 +- include/stdexec/__detail/__upon_stopped.hpp | 4 +- include/stdexec/__detail/__utility.hpp | 1 - include/stdexec/__detail/__variant.hpp | 1 - include/stdexec/__detail/__when_all.hpp | 2 +- .../__detail/__with_awaitable_senders.hpp | 2 +- include/stdexec/__detail/__write_env.hpp | 2 +- include/stdexec/coroutine.hpp | 2 +- include/stdexec/execution.hpp | 104 +++++++++--------- include/stdexec/functional.hpp | 3 +- 90 files changed, 185 insertions(+), 219 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index a97eacada..e002dbe4d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -13,7 +13,6 @@ ImplementationFileExtensions: - cpp - cxx HeaderFilterRegex: '' -AnalyzeTemporaryDtors: false FormatStyle: none User: eniebler CheckOptions: diff --git a/.clangd b/.clangd index 3c2c8de1a..a9ffa980d 100644 --- a/.clangd +++ b/.clangd @@ -6,15 +6,17 @@ If: --- -# Apply a config conditionally to all C++ files +# Apply a config conditionally to all C++ files except those in the +# include/execpools directory which need platform-dependent headers If: - PathMatch: .*\.(c|h)pp + PathMatch: .*\.(c|h)pp$ + PathExclude: .*/execpools/.* --- # Apply a config conditionally to all CUDA files If: - PathMatch: .*\.cuh? + PathMatch: .*\.cuh?$ CompileFlags: Add: # Allow variadic CUDA functions @@ -22,6 +24,15 @@ CompileFlags: --- +# The following file assumes a define. +If: + PathMatch: .*/__system_context_default_impl_entry\.hpp +CompileFlags: + Add: + - "-DSTDEXEC_SYSTEM_CONTEXT_INLINE=inline" + +--- + # Use clang++ in CUDA mode to provide intellisense for files with `nvexec` in their path If: PathMatch: (include|examples|test)/nvexec.* @@ -70,3 +81,5 @@ Diagnostics: # The NVHPC version of _NVCXX_EXPAND_PACK macro triggers this clang error. # Temporarily suppressing it, but should probably fix - "template_param_shadow" + - "pp_expr_bad_token_binop" # erroneous error from STDEXEC_ENABLE_EXTRA_TYPE_CHECKING() + - "#warnings" diff --git a/include/exec/__detail/__bit_cast.hpp b/include/exec/__detail/__bit_cast.hpp index 700dc88dd..77b726fd5 100644 --- a/include/exec/__detail/__bit_cast.hpp +++ b/include/exec/__detail/__bit_cast.hpp @@ -26,7 +26,6 @@ #endif #include -#include namespace exec { diff --git a/include/exec/__detail/__bwos_lifo_queue.hpp b/include/exec/__detail/__bwos_lifo_queue.hpp index 56cb7aaea..5a644d905 100644 --- a/include/exec/__detail/__bwos_lifo_queue.hpp +++ b/include/exec/__detail/__bwos_lifo_queue.hpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/include/exec/__detail/__numa.hpp b/include/exec/__detail/__numa.hpp index c44fb7141..3116032c5 100644 --- a/include/exec/__detail/__numa.hpp +++ b/include/exec/__detail/__numa.hpp @@ -17,13 +17,15 @@ #pragma once #include "../../stdexec/__detail/__config.hpp" -#include "../scope.hpp" +#include "../../stdexec/__detail/__meta.hpp" +#include "../scope.hpp" // IWYU pragma: keep -#include +#include // IWYU pragma: keep #include #include -#include +#include // IWYU pragma: keep #include +#include // Work around a bug in the NVHPC compilers prior to version 24.03 #if STDEXEC_NVHPC() diff --git a/include/exec/__detail/__system_context_default_impl.hpp b/include/exec/__detail/__system_context_default_impl.hpp index 7ed109737..9504aa680 100644 --- a/include/exec/__detail/__system_context_default_impl.hpp +++ b/include/exec/__detail/__system_context_default_impl.hpp @@ -233,7 +233,7 @@ namespace exec::__system_context_default_impl { } }; - void* __default_query_system_context_interface(const __uuid& __id) noexcept { + inline void* __default_query_system_context_interface(const __uuid& __id) noexcept { if (__id == system_scheduler::__interface_identifier) { return __instance_holder::__singleton().__get_current_instance(); } else if (__id == __system_context_replaceability::__interface_identifier) { diff --git a/include/exec/__detail/__system_context_default_impl_entry.hpp b/include/exec/__detail/__system_context_default_impl_entry.hpp index bf4c71542..e7b10ea7f 100644 --- a/include/exec/__detail/__system_context_default_impl_entry.hpp +++ b/include/exec/__detail/__system_context_default_impl_entry.hpp @@ -21,7 +21,7 @@ # error "STDEXEC_SYSTEM_CONTEXT_INLINE must be defined before including this header" #endif -#include "__system_context_default_impl.hpp" +#include "__system_context_default_impl.hpp" // IWYU pragma: keep STDEXEC_PRAGMA_PUSH() STDEXEC_PRAGMA_IGNORE_GNU("-Wattributes") // warning: inline function '[...]' declared weak diff --git a/include/exec/__detail/__system_context_replaceability_api.hpp b/include/exec/__detail/__system_context_replaceability_api.hpp index 3beb5618c..6996033ca 100644 --- a/include/exec/__detail/__system_context_replaceability_api.hpp +++ b/include/exec/__detail/__system_context_replaceability_api.hpp @@ -17,13 +17,12 @@ #ifndef STDEXEC_SYSTEM_CONTEXT_REPLACEABILITY_API_H #define STDEXEC_SYSTEM_CONTEXT_REPLACEABILITY_API_H -#include "stdexec/__detail/__execution_fwd.hpp" - -#include +#include +#include struct __uuid { - uint64_t __parts1; - uint64_t __parts2; + std::uint64_t __parts1; + std::uint64_t __parts2; friend bool operator==(__uuid, __uuid) noexcept = default; }; @@ -37,7 +36,8 @@ namespace exec::system_context_replaceability { template <__uuid X> using __check_constexpr_uuid = void; - //! Concept for a queryable interface. Ensures that the interface has a `__interface_identifier` member. + //! Concept for a queryable interface. Ensures that the interface has a `__interface_identifier` + //! member. template concept __queryable_interface = requires() { typename __check_constexpr_uuid<_T::__interface_identifier>; }; @@ -49,8 +49,8 @@ namespace exec::system_context_replaceability { __query_system_context_interface(_Interface::__interface_identifier)); } - /// Interface for completing a sender operation. - /// Backend will call frontend though this interface for completing the `schedule` and `schedule_bulk` operations. + /// Interface for completing a sender operation. Backend will call frontend though this interface + /// for completing the `schedule` and `schedule_bulk` operations. struct receiver { virtual ~receiver() = default; @@ -65,14 +65,14 @@ namespace exec::system_context_replaceability { /// Receiver for bulk sheduling operations. struct bulk_item_receiver : receiver { /// Called for each item of a bulk operation, possible on different threads. - virtual void start(uint32_t) noexcept = 0; + virtual void start(std::uint32_t) noexcept = 0; }; /// Describes a storage space. /// Used to pass preallocated storage from the frontend to the backend. struct storage { void* __data; - uint32_t __size; + std::uint32_t __size; }; /// Interface for the system scheduler @@ -81,10 +81,13 @@ namespace exec::system_context_replaceability { virtual ~system_scheduler() = default; - /// Schedule work on system scheduler, calling `__r` when done and using `__s` for preallocated memory. + /// Schedule work on system scheduler, calling `__r` when done and using `__s` for preallocated + /// memory. virtual void schedule(storage __s, receiver* __r) noexcept = 0; - /// Schedule bulk work of size `__n` on system scheduler, calling `__r` for each item and then when done, and using `__s` for preallocated memory. - virtual void bulk_schedule(uint32_t __n, storage __s, bulk_item_receiver* __r) noexcept = 0; + /// Schedule bulk work of size `__n` on system scheduler, calling `__r` for each item and then + /// when done, and using `__s` for preallocated memory. + virtual void + bulk_schedule(std::uint32_t __n, storage __s, bulk_item_receiver* __r) noexcept = 0; }; /// Implementation-defined mechanism for replacing the system scheduler backend at run-time. @@ -98,4 +101,4 @@ namespace exec::system_context_replaceability { } // namespace exec::system_context_replaceability -#endif \ No newline at end of file +#endif diff --git a/include/exec/__detail/intrusive_heap.hpp b/include/exec/__detail/intrusive_heap.hpp index d81cf6c7a..2a40aa305 100644 --- a/include/exec/__detail/intrusive_heap.hpp +++ b/include/exec/__detail/intrusive_heap.hpp @@ -20,6 +20,7 @@ #include #include +#include STDEXEC_PRAGMA_PUSH() STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_partial_spec_arg_list) diff --git a/include/exec/any_sender_of.hpp b/include/exec/any_sender_of.hpp index 0bad10044..67c9c6a07 100644 --- a/include/exec/any_sender_of.hpp +++ b/include/exec/any_sender_of.hpp @@ -15,11 +15,9 @@ */ #pragma once -#include "../stdexec/concepts.hpp" #include "../stdexec/execution.hpp" -#include "../stdexec/functional.hpp" -#include "./sequence_senders.hpp" +#include "sequence_senders.hpp" #include #include diff --git a/include/exec/at_coroutine_exit.hpp b/include/exec/at_coroutine_exit.hpp index 7716f4963..42993c3d5 100644 --- a/include/exec/at_coroutine_exit.hpp +++ b/include/exec/at_coroutine_exit.hpp @@ -19,9 +19,9 @@ // The original idea is taken from libunifex and adapted to stdexec. #include -#include #include "../stdexec/execution.hpp" + #include "inline_scheduler.hpp" #include "any_sender_of.hpp" diff --git a/include/exec/create.hpp b/include/exec/create.hpp index 995a981a0..5e00e9e2f 100644 --- a/include/exec/create.hpp +++ b/include/exec/create.hpp @@ -16,7 +16,6 @@ #pragma once #include "../stdexec/__detail/__meta.hpp" -#include "../stdexec/concepts.hpp" #include "../stdexec/execution.hpp" namespace exec { diff --git a/include/exec/finally.hpp b/include/exec/finally.hpp index 0caf6a781..1354591ec 100644 --- a/include/exec/finally.hpp +++ b/include/exec/finally.hpp @@ -17,7 +17,6 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/concepts.hpp" #include "../stdexec/__detail/__manual_lifetime.hpp" namespace exec { diff --git a/include/exec/inline_scheduler.hpp b/include/exec/inline_scheduler.hpp index cc489fb26..8f9cbb2ea 100644 --- a/include/exec/inline_scheduler.hpp +++ b/include/exec/inline_scheduler.hpp @@ -16,8 +16,6 @@ #pragma once #include "../stdexec/execution.hpp" -#include -#include namespace exec { // A simple scheduler that executes its continuation inline, on the diff --git a/include/exec/into_tuple.hpp b/include/exec/into_tuple.hpp index 1a15aaa08..abc3f4d0e 100644 --- a/include/exec/into_tuple.hpp +++ b/include/exec/into_tuple.hpp @@ -16,8 +16,6 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/concepts.hpp" -#include "../stdexec/functional.hpp" #include "../stdexec/__detail/__meta.hpp" #include "../stdexec/__detail/__basic_sender.hpp" diff --git a/include/exec/just_from.hpp b/include/exec/just_from.hpp index 496c6ef50..4fb4ea1e8 100644 --- a/include/exec/just_from.hpp +++ b/include/exec/just_from.hpp @@ -16,7 +16,6 @@ #pragma once #include "../stdexec/__detail/__meta.hpp" -#include "../stdexec/concepts.hpp" #include "../stdexec/execution.hpp" namespace exec { diff --git a/include/exec/libdispatch_queue.hpp b/include/exec/libdispatch_queue.hpp index e0d7891a9..ac2beeded 100644 --- a/include/exec/libdispatch_queue.hpp +++ b/include/exec/libdispatch_queue.hpp @@ -16,6 +16,8 @@ #pragma once +#if __has_include() + // TODO: This is needed for libdispatch to compile with GCC. Need to look for // workaround. #ifndef __has_feature @@ -496,3 +498,5 @@ namespace exec { }; } // namespace exec + +#endif // __has_include() diff --git a/include/exec/materialize.hpp b/include/exec/materialize.hpp index 99e6217f3..dbf97bbe2 100644 --- a/include/exec/materialize.hpp +++ b/include/exec/materialize.hpp @@ -17,7 +17,6 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/concepts.hpp" namespace exec { namespace __materialize { diff --git a/include/exec/on_coro_disposition.hpp b/include/exec/on_coro_disposition.hpp index 0ec4fbea4..8819508e4 100644 --- a/include/exec/on_coro_disposition.hpp +++ b/include/exec/on_coro_disposition.hpp @@ -25,7 +25,6 @@ #include "any_sender_of.hpp" #include -#include namespace exec { namespace __on_coro_disp { diff --git a/include/exec/repeat_effect_until.hpp b/include/exec/repeat_effect_until.hpp index b79a195fe..5060d7df2 100644 --- a/include/exec/repeat_effect_until.hpp +++ b/include/exec/repeat_effect_until.hpp @@ -17,13 +17,10 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/concepts.hpp" -#include "../stdexec/functional.hpp" #include "../stdexec/__detail/__meta.hpp" #include "../stdexec/__detail/__basic_sender.hpp" #include "../stdexec/__detail/__manual_lifetime.hpp" -#include "on.hpp" #include "trampoline_scheduler.hpp" #include diff --git a/include/exec/repeat_n.hpp b/include/exec/repeat_n.hpp index 560929a97..1f8d0e305 100644 --- a/include/exec/repeat_n.hpp +++ b/include/exec/repeat_n.hpp @@ -17,17 +17,13 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/concepts.hpp" -#include "../stdexec/functional.hpp" #include "../stdexec/__detail/__meta.hpp" #include "../stdexec/__detail/__basic_sender.hpp" #include "../stdexec/__detail/__manual_lifetime.hpp" -#include "on.hpp" #include "trampoline_scheduler.hpp" #include -#include #include #include #include diff --git a/include/exec/reschedule.hpp b/include/exec/reschedule.hpp index 966d89dc2..eed9cdaee 100644 --- a/include/exec/reschedule.hpp +++ b/include/exec/reschedule.hpp @@ -47,7 +47,8 @@ namespace exec { struct __sender { using sender_concept = sender_t; - auto get_completion_signatures(__ignore = {}) noexcept -> __completions<_Env> { + template + auto get_completion_signatures(_Env&&) noexcept -> __completions<_Env> { return {}; } @@ -55,8 +56,8 @@ namespace exec { requires receiver_of<_Receiver, __completions>> auto connect(_Receiver __rcvr) const -> connect_result_t<__schedule_sender_t>, _Receiver> { - auto __sched = get_scheduler(get_env(__rcvr)); - return stdexec::connect(schedule(__sched), static_cast<_Receiver&&>(__rcvr)); + auto __sched = get_scheduler(stdexec::get_env(__rcvr)); + return stdexec::connect(stdexec::schedule(__sched), static_cast<_Receiver&&>(__rcvr)); } auto get_env() const noexcept { diff --git a/include/exec/start_now.hpp b/include/exec/start_now.hpp index 8e805bd76..31f7ad1d8 100644 --- a/include/exec/start_now.hpp +++ b/include/exec/start_now.hpp @@ -22,13 +22,10 @@ #include "stdexec/__detail/__receivers.hpp" #include "stdexec/__detail/__senders.hpp" #include "stdexec/__detail/__meta.hpp" -#include "stdexec/__detail/__type_traits.hpp" #include "async_scope.hpp" #include -#include -#include namespace exec { ///////////////////////////////////////////////////////////////////////////// diff --git a/include/exec/task.hpp b/include/exec/task.hpp index fea7287ed..f15e79dbe 100644 --- a/include/exec/task.hpp +++ b/include/exec/task.hpp @@ -20,7 +20,6 @@ #include #include -#include "../stdexec/coroutine.hpp" #include "../stdexec/execution.hpp" #include "../stdexec/__detail/__meta.hpp" #include "../stdexec/__detail/__optional.hpp" diff --git a/include/exec/timed_scheduler.hpp b/include/exec/timed_scheduler.hpp index c6ce54c7e..aa2d41d94 100644 --- a/include/exec/timed_scheduler.hpp +++ b/include/exec/timed_scheduler.hpp @@ -17,7 +17,6 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/functional.hpp" namespace exec { namespace __now { diff --git a/include/exec/timed_thread_scheduler.hpp b/include/exec/timed_thread_scheduler.hpp index 8fd32c0d3..663300b2a 100644 --- a/include/exec/timed_thread_scheduler.hpp +++ b/include/exec/timed_thread_scheduler.hpp @@ -23,8 +23,6 @@ #include "../stdexec/__detail/__intrusive_mpsc_queue.hpp" #include "../stdexec/__detail/__spin_loop_pause.hpp" -#include - namespace exec { class timed_thread_scheduler; diff --git a/include/exec/trampoline_scheduler.hpp b/include/exec/trampoline_scheduler.hpp index 0617b028d..b9df1fd12 100644 --- a/include/exec/trampoline_scheduler.hpp +++ b/include/exec/trampoline_scheduler.hpp @@ -17,10 +17,8 @@ #pragma once #include "../stdexec/execution.hpp" -#include "../stdexec/stop_token.hpp" #include -#include #include namespace exec { diff --git a/include/exec/variant_sender.hpp b/include/exec/variant_sender.hpp index 015b0f298..77fe1c4ce 100644 --- a/include/exec/variant_sender.hpp +++ b/include/exec/variant_sender.hpp @@ -19,7 +19,6 @@ #include "../stdexec/execution.hpp" #include -#include namespace exec { namespace __variant { diff --git a/include/exec/when_any.hpp b/include/exec/when_any.hpp index 18413981f..beca4a20d 100644 --- a/include/exec/when_any.hpp +++ b/include/exec/when_any.hpp @@ -16,11 +16,9 @@ */ #pragma once -#include "../stdexec/concepts.hpp" #include "../stdexec/execution.hpp" #include "../stdexec/stop_token.hpp" -#include #include STDEXEC_PRAGMA_PUSH() diff --git a/include/stdexec/__detail/__as_awaitable.hpp b/include/stdexec/__detail/__as_awaitable.hpp index fba7e57c9..04280dc29 100644 --- a/include/stdexec/__detail/__as_awaitable.hpp +++ b/include/stdexec/__detail/__as_awaitable.hpp @@ -15,12 +15,11 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__awaitable.hpp" #include "__concepts.hpp" #include "__config.hpp" -#include "__cpo.hpp" #include "__meta.hpp" #include "__receivers.hpp" #include "__senders.hpp" diff --git a/include/stdexec/__detail/__basic_sender.hpp b/include/stdexec/__detail/__basic_sender.hpp index 264c59d44..c7d443901 100644 --- a/include/stdexec/__detail/__basic_sender.hpp +++ b/include/stdexec/__detail/__basic_sender.hpp @@ -15,12 +15,11 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" #include "__diagnostics.hpp" #include "__env.hpp" -#include "__manual_lifetime.hpp" #include "__meta.hpp" #include "__senders_core.hpp" #include "__sender_introspection.hpp" diff --git a/include/stdexec/__detail/__bulk.hpp b/include/stdexec/__detail/__bulk.hpp index 12dd91898..3b3cdf596 100644 --- a/include/stdexec/__detail/__bulk.hpp +++ b/include/stdexec/__detail/__bulk.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" @@ -26,7 +26,7 @@ #include "__sender_adaptor_closure.hpp" #include "__transform_completion_signatures.hpp" #include "__transform_sender.hpp" -#include "__senders.hpp" +#include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender STDEXEC_PRAGMA_PUSH() STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") diff --git a/include/stdexec/__detail/__completion_signatures.hpp b/include/stdexec/__detail/__completion_signatures.hpp index 743dcad41..304496ffd 100644 --- a/include/stdexec/__detail/__completion_signatures.hpp +++ b/include/stdexec/__detail/__completion_signatures.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__config.hpp b/include/stdexec/__detail/__config.hpp index 4be52a23b..e9056ffd6 100644 --- a/include/stdexec/__detail/__config.hpp +++ b/include/stdexec/__detail/__config.hpp @@ -34,7 +34,7 @@ #endif #include -#include +#include // IWYU pragma: keep #define STDEXEC_STRINGIZE(_ARG) #_ARG @@ -186,9 +186,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #if __cpp_impl_coroutine >= 201902 && __cpp_lib_coroutine >= 201902 -# include +# include // IWYU pragma: keep # define STDEXEC_STD_NO_COROUTINES() 0 -namespace __coro = std; +namespace __coro = std; // NOLINT(misc-unused-alias-decls) #elif defined(__cpp_coroutines) && __has_include() # include # define STDEXEC_STD_NO_COROUTINES() 0 diff --git a/include/stdexec/__detail/__connect_awaitable.hpp b/include/stdexec/__detail/__connect_awaitable.hpp index 4425a6569..acc1e9915 100644 --- a/include/stdexec/__detail/__connect_awaitable.hpp +++ b/include/stdexec/__detail/__connect_awaitable.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__awaitable.hpp" #include "__completion_signatures.hpp" diff --git a/include/stdexec/__detail/__continues_on.hpp b/include/stdexec/__detail/__continues_on.hpp index 5eef33036..770caff1d 100644 --- a/include/stdexec/__detail/__continues_on.hpp +++ b/include/stdexec/__detail/__continues_on.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" @@ -26,7 +26,7 @@ #include "__schedulers.hpp" #include "__sender_introspection.hpp" #include "__sender_adaptor_closure.hpp" -#include "__senders.hpp" +#include "__senders_core.hpp" #include "__tag_invoke.hpp" #include "__transform_sender.hpp" #include "__type_traits.hpp" diff --git a/include/stdexec/__detail/__cpo.hpp b/include/stdexec/__detail/__cpo.hpp index 991aa26a5..44e5e5b1c 100644 --- a/include/stdexec/__detail/__cpo.hpp +++ b/include/stdexec/__detail/__cpo.hpp @@ -16,7 +16,7 @@ #pragma once #include "__config.hpp" -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep /////////////////////////////////////////////////////////////////////////////// /// To hook a customization point like stdexec::get_env, first bring the names diff --git a/include/stdexec/__detail/__debug.hpp b/include/stdexec/__detail/__debug.hpp index ff3639ab4..bb0cc455c 100644 --- a/include/stdexec/__detail/__debug.hpp +++ b/include/stdexec/__detail/__debug.hpp @@ -15,15 +15,16 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" -#include "__cpo.hpp" #include "__diagnostics.hpp" #include "__env.hpp" #include "__meta.hpp" #include "__tag_invoke.hpp" +#include // IWYU pragma: keep for std::terminate + namespace stdexec { ///////////////////////////////////////////////////////////////////////////// // Some utilities for debugging senders diff --git a/include/stdexec/__detail/__domain.hpp b/include/stdexec/__detail/__domain.hpp index 6d0148530..903241b60 100644 --- a/include/stdexec/__detail/__domain.hpp +++ b/include/stdexec/__detail/__domain.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__config.hpp" #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__ensure_started.hpp b/include/stdexec/__detail/__ensure_started.hpp index d651712b3..a11a0744f 100644 --- a/include/stdexec/__detail/__ensure_started.hpp +++ b/include/stdexec/__detail/__ensure_started.hpp @@ -15,12 +15,11 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" #include "__concepts.hpp" -#include "__intrusive_ptr.hpp" #include "__meta.hpp" #include "__sender_adaptor_closure.hpp" #include "__senders.hpp" @@ -28,8 +27,6 @@ #include "__transform_sender.hpp" #include "__type_traits.hpp" -#include - namespace stdexec { ///////////////////////////////////////////////////////////////////////////// // [execution.senders.adaptors.ensure_started] diff --git a/include/stdexec/__detail/__env.hpp b/include/stdexec/__detail/__env.hpp index 6b3875202..2c1442e8f 100644 --- a/include/stdexec/__detail/__env.hpp +++ b/include/stdexec/__detail/__env.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" #include "__cpo.hpp" @@ -25,8 +25,7 @@ #include "__tuple.hpp" #include -#include -#include +#include // IWYU pragma: keep for unwrap_reference_t STDEXEC_PRAGMA_PUSH() STDEXEC_PRAGMA_IGNORE_EDG(probable_guiding_friend) diff --git a/include/stdexec/__detail/__execute.hpp b/include/stdexec/__detail/__execute.hpp index 2f82383db..3570aa1bc 100644 --- a/include/stdexec/__detail/__execute.hpp +++ b/include/stdexec/__detail/__execute.hpp @@ -15,19 +15,15 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" -#include "__cpo.hpp" -#include "__completion_signatures.hpp" -#include "__meta.hpp" #include "__receivers.hpp" #include "__senders.hpp" #include "__schedulers.hpp" #include "__submit.hpp" #include "__tag_invoke.hpp" #include "__transform_sender.hpp" -#include "__type_traits.hpp" #include diff --git a/include/stdexec/__detail/__execution_fwd.hpp b/include/stdexec/__detail/__execution_fwd.hpp index 78a653774..afc3f2957 100644 --- a/include/stdexec/__detail/__execution_fwd.hpp +++ b/include/stdexec/__detail/__execution_fwd.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__config.hpp" +#include "__config.hpp" // IWYU pragma: keep #include "__meta.hpp" #include "__concepts.hpp" #include "__type_traits.hpp" diff --git a/include/stdexec/__detail/__inline_scheduler.hpp b/include/stdexec/__detail/__inline_scheduler.hpp index d16fecde5..cc17318de 100644 --- a/include/stdexec/__detail/__inline_scheduler.hpp +++ b/include/stdexec/__detail/__inline_scheduler.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__basic_sender.hpp" #include "__cpo.hpp" diff --git a/include/stdexec/__detail/__into_variant.hpp b/include/stdexec/__detail/__into_variant.hpp index 2bb070ba0..6fc1fe8a4 100644 --- a/include/stdexec/__detail/__into_variant.hpp +++ b/include/stdexec/__detail/__into_variant.hpp @@ -15,23 +15,22 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" #include "__concepts.hpp" #include "__domain.hpp" -#include "__env.hpp" #include "__meta.hpp" #include "__sender_adaptor_closure.hpp" -#include "__senders.hpp" +#include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender #include "__transform_completion_signatures.hpp" #include "__transform_sender.hpp" #include "__utility.hpp" #include #include -#include +#include // IWYU pragma: keep namespace stdexec { ///////////////////////////////////////////////////////////////////////////// diff --git a/include/stdexec/__detail/__intrusive_ptr.hpp b/include/stdexec/__detail/__intrusive_ptr.hpp index c5ee59355..bdc11573c 100644 --- a/include/stdexec/__detail/__intrusive_ptr.hpp +++ b/include/stdexec/__detail/__intrusive_ptr.hpp @@ -16,13 +16,12 @@ #pragma once #include "__concepts.hpp" -#include "__meta.hpp" #include -#include -#include +#include // IWYU pragma: keep for ::new #include #include +#include #if STDEXEC_TSAN() # include diff --git a/include/stdexec/__detail/__just.hpp b/include/stdexec/__detail/__just.hpp index 2ac7267f8..bbdb65254 100644 --- a/include/stdexec/__detail/__just.hpp +++ b/include/stdexec/__detail/__just.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__basic_sender.hpp" #include "__completion_signatures.hpp" diff --git a/include/stdexec/__detail/__let.hpp b/include/stdexec/__detail/__let.hpp index 1e26ae259..f20798bb8 100644 --- a/include/stdexec/__detail/__let.hpp +++ b/include/stdexec/__detail/__let.hpp @@ -15,16 +15,16 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" #include "__diagnostics.hpp" #include "__domain.hpp" #include "__env.hpp" -#include "__inline_scheduler.hpp" #include "__meta.hpp" -#include "__receiver_ref.hpp" +#include "__receiver_ref.hpp" // IWYU pragma: keep for __any::__receiver_ref +#include "__schedulers.hpp" #include "__sender_adaptor_closure.hpp" #include "__senders.hpp" #include "__tag_invoke.hpp" diff --git a/include/stdexec/__detail/__manual_lifetime.hpp b/include/stdexec/__detail/__manual_lifetime.hpp index 9de20d5ba..89a8ec324 100644 --- a/include/stdexec/__detail/__manual_lifetime.hpp +++ b/include/stdexec/__detail/__manual_lifetime.hpp @@ -16,12 +16,10 @@ */ #pragma once -#include "../concepts.hpp" +#include "__concepts.hpp" -#include #include #include -#include namespace stdexec { diff --git a/include/stdexec/__detail/__meta.hpp b/include/stdexec/__detail/__meta.hpp index fe70b6f7c..6463ea7a6 100644 --- a/include/stdexec/__detail/__meta.hpp +++ b/include/stdexec/__detail/__meta.hpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/include/stdexec/__detail/__on.hpp b/include/stdexec/__detail/__on.hpp index b4376e0df..a65726d25 100644 --- a/include/stdexec/__detail/__on.hpp +++ b/include/stdexec/__detail/__on.hpp @@ -15,13 +15,12 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" #include "__concepts.hpp" #include "__continues_on.hpp" -#include "__cpo.hpp" #include "__diagnostics.hpp" #include "__domain.hpp" #include "__env.hpp" diff --git a/include/stdexec/__detail/__operation_states.hpp b/include/stdexec/__detail/__operation_states.hpp index 9f708a02e..e412723d6 100644 --- a/include/stdexec/__detail/__operation_states.hpp +++ b/include/stdexec/__detail/__operation_states.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__optional.hpp b/include/stdexec/__detail/__optional.hpp index a49fb3ae8..f7eab1e9c 100644 --- a/include/stdexec/__detail/__optional.hpp +++ b/include/stdexec/__detail/__optional.hpp @@ -15,13 +15,12 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" -#include "__type_traits.hpp" -#include +#include // IWYU pragma: keep for ::new #include #include #include diff --git a/include/stdexec/__detail/__ranges.hpp b/include/stdexec/__detail/__ranges.hpp index 876ad24d3..66b29e0d2 100644 --- a/include/stdexec/__detail/__ranges.hpp +++ b/include/stdexec/__detail/__ranges.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__config.hpp" +#include "__config.hpp" // IWYU pragma: keep #include "__type_traits.hpp" #if 0 //STDEXEC_HAS_STD_RANGES() diff --git a/include/stdexec/__detail/__read_env.hpp b/include/stdexec/__detail/__read_env.hpp index 854a8c2e3..5f7cf10b9 100644 --- a/include/stdexec/__detail/__read_env.hpp +++ b/include/stdexec/__detail/__read_env.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/__detail/__receiver_adaptor.hpp b/include/stdexec/__detail/__receiver_adaptor.hpp index 8ef8deb8a..6649f4971 100644 --- a/include/stdexec/__detail/__receiver_adaptor.hpp +++ b/include/stdexec/__detail/__receiver_adaptor.hpp @@ -15,12 +15,10 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" -#include "__cpo.hpp" #include "__receivers.hpp" -#include "__tag_invoke.hpp" #include "__type_traits.hpp" #include "__utility.hpp" diff --git a/include/stdexec/__detail/__receiver_ref.hpp b/include/stdexec/__detail/__receiver_ref.hpp index 35101d058..8220b2642 100644 --- a/include/stdexec/__detail/__receiver_ref.hpp +++ b/include/stdexec/__detail/__receiver_ref.hpp @@ -15,12 +15,11 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__completion_signatures.hpp" -#include "__cpo.hpp" #include "__env.hpp" -#include "__schedulers.hpp" +#include "__receivers.hpp" #include diff --git a/include/stdexec/__detail/__receivers.hpp b/include/stdexec/__detail/__receivers.hpp index 3ce16342a..a27dead2b 100644 --- a/include/stdexec/__detail/__receivers.hpp +++ b/include/stdexec/__detail/__receivers.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" #include "__diagnostics.hpp" diff --git a/include/stdexec/__detail/__run_loop.hpp b/include/stdexec/__detail/__run_loop.hpp index 0ff797c61..54b795713 100644 --- a/include/stdexec/__detail/__run_loop.hpp +++ b/include/stdexec/__detail/__run_loop.hpp @@ -15,11 +15,10 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__completion_signatures.hpp" -#include "__cpo.hpp" #include "__env.hpp" #include "__meta.hpp" #include "__receivers.hpp" diff --git a/include/stdexec/__detail/__schedule_from.hpp b/include/stdexec/__detail/__schedule_from.hpp index 217dc5d98..f06bd4f1f 100644 --- a/include/stdexec/__detail/__schedule_from.hpp +++ b/include/stdexec/__detail/__schedule_from.hpp @@ -15,15 +15,16 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp +#include "__basic_sender.hpp" #include "__concepts.hpp" #include "__domain.hpp" #include "__env.hpp" #include "__meta.hpp" #include "__operation_states.hpp" -#include "__senders_core.hpp" +#include "__senders.hpp" #include "__schedulers.hpp" #include "__transform_completion_signatures.hpp" #include "__tuple.hpp" diff --git a/include/stdexec/__detail/__schedulers.hpp b/include/stdexec/__detail/__schedulers.hpp index 556505cb7..b38d30339 100644 --- a/include/stdexec/__detail/__schedulers.hpp +++ b/include/stdexec/__detail/__schedulers.hpp @@ -15,13 +15,12 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" -#include "__cpo.hpp" #include "__env.hpp" -#include "__senders.hpp" +#include "__senders_core.hpp" #include "__tag_invoke.hpp" namespace stdexec { diff --git a/include/stdexec/__detail/__scope.hpp b/include/stdexec/__detail/__scope.hpp index cfba03caa..bf12d0d84 100644 --- a/include/stdexec/__detail/__scope.hpp +++ b/include/stdexec/__detail/__scope.hpp @@ -16,7 +16,8 @@ #pragma once #include "__config.hpp" -#include "__meta.hpp" +#include "__concepts.hpp" +#include "__utility.hpp" namespace stdexec { template diff --git a/include/stdexec/__detail/__sender_adaptor_closure.hpp b/include/stdexec/__detail/__sender_adaptor_closure.hpp index 421792703..5641fabfc 100644 --- a/include/stdexec/__detail/__sender_adaptor_closure.hpp +++ b/include/stdexec/__detail/__sender_adaptor_closure.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" #include "__senders_core.hpp" diff --git a/include/stdexec/__detail/__sender_introspection.hpp b/include/stdexec/__detail/__sender_introspection.hpp index 838480350..2e77040f6 100644 --- a/include/stdexec/__detail/__sender_introspection.hpp +++ b/include/stdexec/__detail/__sender_introspection.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep namespace stdexec { namespace __detail { diff --git a/include/stdexec/__detail/__senders.hpp b/include/stdexec/__detail/__senders.hpp index fdeca45dd..f0df9b0e3 100644 --- a/include/stdexec/__detail/__senders.hpp +++ b/include/stdexec/__detail/__senders.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__awaitable.hpp" diff --git a/include/stdexec/__detail/__senders_core.hpp b/include/stdexec/__detail/__senders_core.hpp index 8e589015c..bd96da3fb 100644 --- a/include/stdexec/__detail/__senders_core.hpp +++ b/include/stdexec/__detail/__senders_core.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__awaitable.hpp" @@ -23,7 +23,6 @@ #include "__concepts.hpp" #include "__domain.hpp" #include "__env.hpp" -#include "__receivers.hpp" #include "__type_traits.hpp" namespace stdexec { diff --git a/include/stdexec/__detail/__shared.hpp b/include/stdexec/__detail/__shared.hpp index 320c4e37c..9e41a0781 100644 --- a/include/stdexec/__detail/__shared.hpp +++ b/include/stdexec/__detail/__shared.hpp @@ -15,21 +15,20 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" -#include "__cpo.hpp" #include "__env.hpp" #include "__intrusive_slist.hpp" #include "__optional.hpp" #include "__meta.hpp" +#include "__receivers.hpp" #include "__transform_completion_signatures.hpp" #include "__tuple.hpp" -#include "__variant.hpp" +#include "__variant.hpp" // IWYU pragma: keep #include "../stop_token.hpp" -#include "../functional.hpp" #include #include diff --git a/include/stdexec/__detail/__split.hpp b/include/stdexec/__detail/__split.hpp index ad78fa8d1..3849fbff4 100644 --- a/include/stdexec/__detail/__split.hpp +++ b/include/stdexec/__detail/__split.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/__detail/__start_detached.hpp b/include/stdexec/__detail/__start_detached.hpp index 2b8494348..11d81bbeb 100644 --- a/include/stdexec/__detail/__start_detached.hpp +++ b/include/stdexec/__detail/__start_detached.hpp @@ -15,10 +15,9 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__meta.hpp" -#include "__cpo.hpp" #include "__env.hpp" #include "__receivers.hpp" #include "__senders.hpp" diff --git a/include/stdexec/__detail/__starts_on.hpp b/include/stdexec/__detail/__starts_on.hpp index 4c1bb9e74..a38cdef30 100644 --- a/include/stdexec/__detail/__starts_on.hpp +++ b/include/stdexec/__detail/__starts_on.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__stop_token.hpp b/include/stdexec/__detail/__stop_token.hpp index b7bc650e9..95f71cd0c 100644 --- a/include/stdexec/__detail/__stop_token.hpp +++ b/include/stdexec/__detail/__stop_token.hpp @@ -16,7 +16,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__stopped_as_error.hpp b/include/stdexec/__detail/__stopped_as_error.hpp index 02dda2cd1..e3f3e1327 100644 --- a/include/stdexec/__detail/__stopped_as_error.hpp +++ b/include/stdexec/__detail/__stopped_as_error.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__stopped_as_optional.hpp b/include/stdexec/__detail/__stopped_as_optional.hpp index fc1790584..0cacffe2a 100644 --- a/include/stdexec/__detail/__stopped_as_optional.hpp +++ b/include/stdexec/__detail/__stopped_as_optional.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/__detail/__submit.hpp b/include/stdexec/__detail/__submit.hpp index ee1a78c2a..13028beba 100644 --- a/include/stdexec/__detail/__submit.hpp +++ b/include/stdexec/__detail/__submit.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__concepts.hpp" #include "__env.hpp" diff --git a/include/stdexec/__detail/__sync_wait.hpp b/include/stdexec/__detail/__sync_wait.hpp index ed0fdbcc6..f50b48dda 100644 --- a/include/stdexec/__detail/__sync_wait.hpp +++ b/include/stdexec/__detail/__sync_wait.hpp @@ -15,12 +15,11 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__concepts.hpp" -#include "__cpo.hpp" -#include "__debug.hpp" +#include "__debug.hpp" // IWYU pragma: keep #include "__diagnostics.hpp" #include "__domain.hpp" #include "__env.hpp" diff --git a/include/stdexec/__detail/__then.hpp b/include/stdexec/__detail/__then.hpp index d06edf246..79e7fdd9e 100644 --- a/include/stdexec/__detail/__then.hpp +++ b/include/stdexec/__detail/__then.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__basic_sender.hpp" #include "__diagnostics.hpp" diff --git a/include/stdexec/__detail/__transfer_just.hpp b/include/stdexec/__detail/__transfer_just.hpp index ad0589b5c..cc8480cc9 100644 --- a/include/stdexec/__detail/__transfer_just.hpp +++ b/include/stdexec/__detail/__transfer_just.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/__detail/__transform_completion_signatures.hpp b/include/stdexec/__detail/__transform_completion_signatures.hpp index ba32765ba..21506c5ca 100644 --- a/include/stdexec/__detail/__transform_completion_signatures.hpp +++ b/include/stdexec/__detail/__transform_completion_signatures.hpp @@ -15,16 +15,17 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__completion_signatures.hpp" #include "__concepts.hpp" #include "__debug.hpp" // IWYU pragma: keep -#include "__diagnostics.hpp" #include "__senders_core.hpp" #include "__meta.hpp" +#include "__transform_completion_signatures.hpp" // IWYU pragma: keep for __eptr_completion_if +#include #include #include diff --git a/include/stdexec/__detail/__transform_sender.hpp b/include/stdexec/__detail/__transform_sender.hpp index 1964d208a..a3661970e 100644 --- a/include/stdexec/__detail/__transform_sender.hpp +++ b/include/stdexec/__detail/__transform_sender.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/__detail/__type_traits.hpp b/include/stdexec/__detail/__type_traits.hpp index b4cb20cb3..7f43920e3 100644 --- a/include/stdexec/__detail/__type_traits.hpp +++ b/include/stdexec/__detail/__type_traits.hpp @@ -17,7 +17,7 @@ #include "__config.hpp" -#include +#include // IWYU pragma: keep namespace stdexec { diff --git a/include/stdexec/__detail/__upon_error.hpp b/include/stdexec/__detail/__upon_error.hpp index b9fce9bdd..fc4da337f 100644 --- a/include/stdexec/__detail/__upon_error.hpp +++ b/include/stdexec/__detail/__upon_error.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__basic_sender.hpp" #include "__diagnostics.hpp" @@ -25,7 +25,7 @@ #include "__sender_adaptor_closure.hpp" #include "__transform_completion_signatures.hpp" #include "__transform_sender.hpp" -#include "__senders.hpp" +#include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender // include these after __execution_fwd.hpp namespace stdexec { diff --git a/include/stdexec/__detail/__upon_stopped.hpp b/include/stdexec/__detail/__upon_stopped.hpp index b7ffe6fa0..ab364296a 100644 --- a/include/stdexec/__detail/__upon_stopped.hpp +++ b/include/stdexec/__detail/__upon_stopped.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__basic_sender.hpp" #include "__diagnostics.hpp" @@ -25,7 +25,7 @@ #include "__sender_adaptor_closure.hpp" #include "__transform_completion_signatures.hpp" #include "__transform_sender.hpp" -#include "__senders.hpp" +#include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender // include these after __execution_fwd.hpp namespace stdexec { diff --git a/include/stdexec/__detail/__utility.hpp b/include/stdexec/__detail/__utility.hpp index fcb4a2329..1edbaf6b5 100644 --- a/include/stdexec/__detail/__utility.hpp +++ b/include/stdexec/__detail/__utility.hpp @@ -20,7 +20,6 @@ #include "__type_traits.hpp" #include -#include // for addressof #include namespace stdexec { diff --git a/include/stdexec/__detail/__variant.hpp b/include/stdexec/__detail/__variant.hpp index bdcec1031..49188f03b 100644 --- a/include/stdexec/__detail/__variant.hpp +++ b/include/stdexec/__detail/__variant.hpp @@ -22,7 +22,6 @@ #include #include #include -#include /********************************************************************************/ /* NB: The variant type implemented here default-constructs into the valueless */ diff --git a/include/stdexec/__detail/__when_all.hpp b/include/stdexec/__detail/__when_all.hpp index ae97640d0..b80e66f47 100644 --- a/include/stdexec/__detail/__when_all.hpp +++ b/include/stdexec/__detail/__when_all.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/__detail/__with_awaitable_senders.hpp b/include/stdexec/__detail/__with_awaitable_senders.hpp index 64530a595..600595a8b 100644 --- a/include/stdexec/__detail/__with_awaitable_senders.hpp +++ b/include/stdexec/__detail/__with_awaitable_senders.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep #include "__as_awaitable.hpp" #include "__concepts.hpp" diff --git a/include/stdexec/__detail/__write_env.hpp b/include/stdexec/__detail/__write_env.hpp index ebd3deafb..15774f950 100644 --- a/include/stdexec/__detail/__write_env.hpp +++ b/include/stdexec/__detail/__write_env.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__execution_fwd.hpp" +#include "__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp #include "__basic_sender.hpp" diff --git a/include/stdexec/coroutine.hpp b/include/stdexec/coroutine.hpp index bdabefd23..1a59425a3 100644 --- a/include/stdexec/coroutine.hpp +++ b/include/stdexec/coroutine.hpp @@ -15,7 +15,7 @@ */ #pragma once -#include "__detail/__awaitable.hpp" +#include "__detail/__awaitable.hpp" // IWYU pragma: keep #include "__detail/__config.hpp" #if STDEXEC_MSVC() && _MSC_VER <= 1939 diff --git a/include/stdexec/execution.hpp b/include/stdexec/execution.hpp index 6f266bbfa..b22f0c273 100644 --- a/include/stdexec/execution.hpp +++ b/include/stdexec/execution.hpp @@ -15,61 +15,61 @@ */ #pragma once -#include "__detail/__execution_fwd.hpp" +#include "__detail/__execution_fwd.hpp" // IWYU pragma: keep // include these after __execution_fwd.hpp -#include "__detail/__as_awaitable.hpp" -#include "__detail/__basic_sender.hpp" -#include "__detail/__bulk.hpp" -#include "__detail/__completion_signatures.hpp" -#include "__detail/__connect_awaitable.hpp" -#include "__detail/__continues_on.hpp" -#include "__detail/__cpo.hpp" -#include "__detail/__debug.hpp" -#include "__detail/__domain.hpp" -#include "__detail/__ensure_started.hpp" -#include "__detail/__env.hpp" -#include "__detail/__execute.hpp" -#include "__detail/__inline_scheduler.hpp" -#include "__detail/__into_variant.hpp" -#include "__detail/__intrusive_ptr.hpp" -#include "__detail/__intrusive_slist.hpp" -#include "__detail/__just.hpp" -#include "__detail/__let.hpp" -#include "__detail/__meta.hpp" -#include "__detail/__on.hpp" -#include "__detail/__operation_states.hpp" -#include "__detail/__read_env.hpp" -#include "__detail/__receivers.hpp" -#include "__detail/__receiver_adaptor.hpp" -#include "__detail/__run_loop.hpp" -#include "__detail/__schedule_from.hpp" -#include "__detail/__schedulers.hpp" -#include "__detail/__senders.hpp" -#include "__detail/__sender_adaptor_closure.hpp" -#include "__detail/__split.hpp" -#include "__detail/__start_detached.hpp" -#include "__detail/__starts_on.hpp" -#include "__detail/__stopped_as_error.hpp" -#include "__detail/__stopped_as_optional.hpp" -#include "__detail/__submit.hpp" -#include "__detail/__sync_wait.hpp" -#include "__detail/__then.hpp" -#include "__detail/__transfer_just.hpp" -#include "__detail/__transform_sender.hpp" -#include "__detail/__transform_completion_signatures.hpp" -#include "__detail/__type_traits.hpp" -#include "__detail/__upon_error.hpp" -#include "__detail/__upon_stopped.hpp" -#include "__detail/__utility.hpp" -#include "__detail/__when_all.hpp" -#include "__detail/__with_awaitable_senders.hpp" -#include "__detail/__write_env.hpp" +#include "__detail/__as_awaitable.hpp" // IWYU pragma: export +#include "__detail/__basic_sender.hpp" // IWYU pragma: export +#include "__detail/__bulk.hpp" // IWYU pragma: export +#include "__detail/__completion_signatures.hpp" // IWYU pragma: export +#include "__detail/__connect_awaitable.hpp" // IWYU pragma: export +#include "__detail/__continues_on.hpp" // IWYU pragma: export +#include "__detail/__cpo.hpp" // IWYU pragma: export +#include "__detail/__debug.hpp" // IWYU pragma: export +#include "__detail/__domain.hpp" // IWYU pragma: export +#include "__detail/__ensure_started.hpp" // IWYU pragma: export +#include "__detail/__env.hpp" // IWYU pragma: export +#include "__detail/__execute.hpp" // IWYU pragma: export +#include "__detail/__inline_scheduler.hpp" // IWYU pragma: export +#include "__detail/__into_variant.hpp" // IWYU pragma: export +#include "__detail/__intrusive_ptr.hpp" // IWYU pragma: export +#include "__detail/__intrusive_slist.hpp" // IWYU pragma: export +#include "__detail/__just.hpp" // IWYU pragma: export +#include "__detail/__let.hpp" // IWYU pragma: export +#include "__detail/__meta.hpp" // IWYU pragma: export +#include "__detail/__on.hpp" // IWYU pragma: export +#include "__detail/__operation_states.hpp" // IWYU pragma: export +#include "__detail/__read_env.hpp" // IWYU pragma: export +#include "__detail/__receivers.hpp" // IWYU pragma: export +#include "__detail/__receiver_adaptor.hpp" // IWYU pragma: export +#include "__detail/__run_loop.hpp" // IWYU pragma: export +#include "__detail/__schedule_from.hpp" // IWYU pragma: export +#include "__detail/__schedulers.hpp" // IWYU pragma: export +#include "__detail/__senders.hpp" // IWYU pragma: export +#include "__detail/__sender_adaptor_closure.hpp" // IWYU pragma: export +#include "__detail/__split.hpp" // IWYU pragma: export +#include "__detail/__start_detached.hpp" // IWYU pragma: export +#include "__detail/__starts_on.hpp" // IWYU pragma: export +#include "__detail/__stopped_as_error.hpp" // IWYU pragma: export +#include "__detail/__stopped_as_optional.hpp" // IWYU pragma: export +#include "__detail/__submit.hpp" // IWYU pragma: export +#include "__detail/__sync_wait.hpp" // IWYU pragma: export +#include "__detail/__then.hpp" // IWYU pragma: export +#include "__detail/__transfer_just.hpp" // IWYU pragma: export +#include "__detail/__transform_sender.hpp" // IWYU pragma: export +#include "__detail/__transform_completion_signatures.hpp" // IWYU pragma: export +#include "__detail/__type_traits.hpp" // IWYU pragma: export +#include "__detail/__upon_error.hpp" // IWYU pragma: export +#include "__detail/__upon_stopped.hpp" // IWYU pragma: export +#include "__detail/__utility.hpp" // IWYU pragma: export +#include "__detail/__when_all.hpp" // IWYU pragma: export +#include "__detail/__with_awaitable_senders.hpp" // IWYU pragma: export +#include "__detail/__write_env.hpp" // IWYU pragma: export -#include "functional.hpp" -#include "concepts.hpp" -#include "coroutine.hpp" -#include "stop_token.hpp" +#include "functional.hpp" // IWYU pragma: export +#include "concepts.hpp" // IWYU pragma: export +#include "coroutine.hpp" // IWYU pragma: export +#include "stop_token.hpp" // IWYU pragma: export // For issuing a meaningful diagnostic for the erroneous `snd1 | snd2`. template diff --git a/include/stdexec/functional.hpp b/include/stdexec/functional.hpp index 5e0648e55..b6a2ded55 100644 --- a/include/stdexec/functional.hpp +++ b/include/stdexec/functional.hpp @@ -17,9 +17,8 @@ #include "__detail/__config.hpp" #include "__detail/__meta.hpp" -#include "__detail/__tag_invoke.hpp" -#include "concepts.hpp" +#include "concepts.hpp" // IWYU pragma: keep #include #include From 6c8f7dcfd2dad904ad8d02917e0e47710ff820aa Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Tue, 21 Jan 2025 16:17:59 -0800 Subject: [PATCH 2/2] test that stdexec/ and exec/ headers are self-contained with the VERIFY_INTERFACE_HEADER_SETS property --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a86a852e..c5186855c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,12 @@ set_target_properties(stdexec PROPERTIES VERSION "${STDEXEC_VERSION}" SOVERSION "${STDEXEC_VERSION_MAJOR}") +if (BUILD_TESTING) + # Test headers are self-contained + set_target_properties(stdexec PROPERTIES + VERIFY_INTERFACE_HEADER_SETS TRUE) +endif() + # Declare the public include directories include(GNUInstallDirs)