From fc0c71355593e3a10e8c2083c072cbf0bdc9b1de Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Sat, 2 May 2026 20:23:45 -0700 Subject: [PATCH] centralize handling of annoying macros and warnings in prologue/epilogue headers --- .clangd | 8 +++ include/stdexec/__detail/__affine.hpp | 4 ++ include/stdexec/__detail/__any.hpp | 5 +- include/stdexec/__detail/__any_allocator.hpp | 5 +- include/stdexec/__detail/__as_awaitable.hpp | 5 +- include/stdexec/__detail/__associate.hpp | 4 ++ include/stdexec/__detail/__atomic.hpp | 5 +- .../__detail/__atomic_intrusive_queue.hpp | 4 ++ include/stdexec/__detail/__awaitable.hpp | 4 ++ include/stdexec/__detail/__basic_sender.hpp | 5 +- include/stdexec/__detail/__bulk.hpp | 5 +- .../__detail/__completion_behavior.hpp | 4 ++ .../stdexec/__detail/__completion_info.hpp | 4 ++ .../__detail/__completion_signatures.hpp | 4 ++ .../__detail/__completion_signatures_of.hpp | 4 ++ include/stdexec/__detail/__concepts.hpp | 4 ++ include/stdexec/__detail/__connect.hpp | 4 ++ .../stdexec/__detail/__connect_awaitable.hpp | 5 +- include/stdexec/__detail/__continues_on.hpp | 4 ++ .../stdexec/__detail/__counting_scopes.hpp | 4 ++ include/stdexec/__detail/__debug.hpp | 4 ++ include/stdexec/__detail/__deprecations.hpp | 4 ++ include/stdexec/__detail/__diagnostics.hpp | 4 ++ include/stdexec/__detail/__domain.hpp | 4 ++ include/stdexec/__detail/__env.hpp | 5 +- include/stdexec/__detail/__epilogue.hpp | 51 +++++++++++++++ include/stdexec/__detail/__execution_fwd.hpp | 6 +- .../stdexec/__detail/__execution_legacy.hpp | 4 ++ include/stdexec/__detail/__finally.hpp | 4 ++ .../__detail/__get_completion_signatures.hpp | 4 ++ .../stdexec/__detail/__inline_scheduler.hpp | 4 ++ include/stdexec/__detail/__into_variant.hpp | 4 ++ .../__detail/__intrusive_mpsc_queue.hpp | 4 ++ include/stdexec/__detail/__intrusive_ptr.hpp | 4 ++ .../stdexec/__detail/__intrusive_queue.hpp | 4 ++ .../stdexec/__detail/__intrusive_slist.hpp | 4 ++ include/stdexec/__detail/__just.hpp | 5 +- include/stdexec/__detail/__let.hpp | 4 ++ .../stdexec/__detail/__manual_lifetime.hpp | 4 ++ include/stdexec/__detail/__memory.hpp | 4 ++ include/stdexec/__detail/__meta.hpp | 4 ++ include/stdexec/__detail/__on.hpp | 5 +- .../stdexec/__detail/__operation_states.hpp | 4 ++ include/stdexec/__detail/__optional.hpp | 4 ++ .../stdexec/__detail/__parallel_scheduler.hpp | 4 ++ .../__detail/__parallel_scheduler_backend.hpp | 5 +- .../__parallel_scheduler_default_impl.hpp | 4 ++ ..._parallel_scheduler_default_impl_entry.hpp | 4 ++ .../__parallel_scheduler_replacement_api.hpp | 4 ++ include/stdexec/__detail/__prologue.hpp | 62 +++++++++++++++++++ include/stdexec/__detail/__queries.hpp | 4 ++ include/stdexec/__detail/__query.hpp | 4 ++ include/stdexec/__detail/__ranges.hpp | 8 +++ include/stdexec/__detail/__read_env.hpp | 4 ++ .../stdexec/__detail/__receiver_adaptor.hpp | 4 ++ include/stdexec/__detail/__receiver_ref.hpp | 4 ++ include/stdexec/__detail/__receivers.hpp | 4 ++ include/stdexec/__detail/__run_loop.hpp | 4 ++ include/stdexec/__detail/__schedule_from.hpp | 4 ++ include/stdexec/__detail/__schedulers.hpp | 4 ++ include/stdexec/__detail/__scope.hpp | 4 ++ include/stdexec/__detail/__scope_concepts.hpp | 4 ++ .../__detail/__sender_adaptor_closure.hpp | 4 ++ .../stdexec/__detail/__sender_concepts.hpp | 4 ++ .../__detail/__sender_introspection.hpp | 5 +- include/stdexec/__detail/__sender_ref.hpp | 4 ++ include/stdexec/__detail/__senders.hpp | 4 ++ include/stdexec/__detail/__sequence.hpp | 5 +- include/stdexec/__detail/__spawn.hpp | 4 ++ include/stdexec/__detail/__spawn_common.hpp | 4 ++ include/stdexec/__detail/__spawn_future.hpp | 4 ++ include/stdexec/__detail/__starts_on.hpp | 4 ++ include/stdexec/__detail/__static_vector.hpp | 4 ++ include/stdexec/__detail/__stop_token.hpp | 4 ++ include/stdexec/__detail/__stop_when.hpp | 4 ++ .../stdexec/__detail/__stopped_as_error.hpp | 4 ++ .../__detail/__stopped_as_optional.hpp | 4 ++ include/stdexec/__detail/__submit.hpp | 4 ++ include/stdexec/__detail/__sync_wait.hpp | 5 +- include/stdexec/__detail/__tag_invoke.hpp | 4 ++ include/stdexec/__detail/__task.hpp | 5 +- include/stdexec/__detail/__task_scheduler.hpp | 5 +- include/stdexec/__detail/__then.hpp | 5 +- include/stdexec/__detail/__transfer_just.hpp | 7 ++- .../__transform_completion_signatures.hpp | 4 ++ .../stdexec/__detail/__transform_sender.hpp | 5 +- include/stdexec/__detail/__tuple.hpp | 5 +- include/stdexec/__detail/__type_traits.hpp | 4 ++ include/stdexec/__detail/__typeinfo.hpp | 5 +- include/stdexec/__detail/__unstoppable.hpp | 4 ++ include/stdexec/__detail/__upon_error.hpp | 5 +- include/stdexec/__detail/__upon_stopped.hpp | 5 +- include/stdexec/__detail/__utility.hpp | 5 +- include/stdexec/__detail/__variant.hpp | 5 +- include/stdexec/__detail/__when_all.hpp | 4 ++ .../__detail/__with_awaitable_senders.hpp | 4 ++ include/stdexec/__detail/__write_env.hpp | 4 ++ 97 files changed, 481 insertions(+), 49 deletions(-) create mode 100644 include/stdexec/__detail/__epilogue.hpp create mode 100644 include/stdexec/__detail/__prologue.hpp diff --git a/.clangd b/.clangd index b58b56f4e..197f79420 100644 --- a/.clangd +++ b/.clangd @@ -8,6 +8,14 @@ If: --- +If: + PathMatch: .*/stdexec/__detail/__epilogue[.]hpp +CompileFlags: + Add: + - -include stdexec/__detail/__prologue.hpp + +--- + # Apply a config conditionally to all CUDA files If: PathMatch: .*\.cuh?$ diff --git a/include/stdexec/__detail/__affine.hpp b/include/stdexec/__detail/__affine.hpp index a4b63a0d0..5995bb713 100644 --- a/include/stdexec/__detail/__affine.hpp +++ b/include/stdexec/__detail/__affine.hpp @@ -22,6 +22,8 @@ #include "__senders.hpp" #include "__unstoppable.hpp" +#include "__prologue.hpp" + namespace STDEXEC { struct _CANNOT_MAKE_SENDER_AFFINE_TO_THE_STARTING_SCHEDULER_; @@ -166,3 +168,5 @@ namespace STDEXEC }; }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__any.hpp b/include/stdexec/__detail/__any.hpp index 5abc26e89..65c72e33f 100644 --- a/include/stdexec/__detail/__any.hpp +++ b/include/stdexec/__detail/__any.hpp @@ -33,7 +33,8 @@ #include #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wredundant-consteval-if") STDEXEC_PRAGMA_IGNORE_GNU("-Warray-bounds") @@ -2179,4 +2180,4 @@ namespace STDEXEC::__any // NOLINTEND(moderize-use-override) -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__any_allocator.hpp b/include/stdexec/__detail/__any_allocator.hpp index 5c216b546..a72bd483a 100644 --- a/include/stdexec/__detail/__any_allocator.hpp +++ b/include/stdexec/__detail/__any_allocator.hpp @@ -23,7 +23,8 @@ #include "__memory.hpp" #include "__typeinfo.hpp" -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Warray-bounds") namespace STDEXEC @@ -124,4 +125,4 @@ namespace STDEXEC __any_allocator(std::allocator) -> __any_allocator; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__as_awaitable.hpp b/include/stdexec/__detail/__as_awaitable.hpp index 436810b04..c56f086fa 100644 --- a/include/stdexec/__detail/__as_awaitable.hpp +++ b/include/stdexec/__detail/__as_awaitable.hpp @@ -35,7 +35,8 @@ #include #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") STDEXEC_PRAGMA_IGNORE_MSVC(4714) // marked as __forceinline not inlined @@ -476,4 +477,4 @@ namespace STDEXEC #endif } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__associate.hpp b/include/stdexec/__detail/__associate.hpp index 79b175b2a..38b1033e6 100644 --- a/include/stdexec/__detail/__associate.hpp +++ b/include/stdexec/__detail/__associate.hpp @@ -36,6 +36,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -285,3 +287,5 @@ namespace STDEXEC struct __sexpr_impl : __associate::__associate_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__atomic.hpp b/include/stdexec/__detail/__atomic.hpp index 09c672e52..ecf7c0520 100644 --- a/include/stdexec/__detail/__atomic.hpp +++ b/include/stdexec/__detail/__atomic.hpp @@ -28,7 +28,8 @@ #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wdeprecated-declarations") STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity) STDEXEC_PRAGMA_IGNORE_MSVC(4996) // 'foo': was declared deprecated @@ -244,4 +245,4 @@ namespace STDEXEC::__std } // namespace STDEXEC::__std -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__atomic_intrusive_queue.hpp b/include/stdexec/__detail/__atomic_intrusive_queue.hpp index 1a11f3975..4114e4b93 100644 --- a/include/stdexec/__detail/__atomic_intrusive_queue.hpp +++ b/include/stdexec/__detail/__atomic_intrusive_queue.hpp @@ -23,6 +23,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { @@ -78,3 +80,5 @@ namespace STDEXEC }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__awaitable.hpp b/include/stdexec/__detail/__awaitable.hpp index e3c234820..717889cbc 100644 --- a/include/stdexec/__detail/__awaitable.hpp +++ b/include/stdexec/__detail/__awaitable.hpp @@ -20,6 +20,8 @@ #include "__config.hpp" #include "__meta.hpp" +#include "__prologue.hpp" + namespace STDEXEC { #if !STDEXEC_NO_STDCPP_COROUTINES() @@ -108,3 +110,5 @@ namespace STDEXEC #endif } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__basic_sender.hpp b/include/stdexec/__detail/__basic_sender.hpp index 972b4b4c8..0d05c6dd4 100644 --- a/include/stdexec/__detail/__basic_sender.hpp +++ b/include/stdexec/__detail/__basic_sender.hpp @@ -32,7 +32,8 @@ #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -461,4 +462,4 @@ namespace STDEXEC } // namespace __detail } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__bulk.hpp b/include/stdexec/__detail/__bulk.hpp index 138eafc8b..f3ccbc156 100644 --- a/include/stdexec/__detail/__bulk.hpp +++ b/include/stdexec/__detail/__bulk.hpp @@ -27,7 +27,8 @@ #include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender #include "__transform_completion_signatures.hpp" -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -411,4 +412,4 @@ namespace STDEXEC {}; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__completion_behavior.hpp b/include/stdexec/__detail/__completion_behavior.hpp index d3f66f2d7..c20f6ddd9 100644 --- a/include/stdexec/__detail/__completion_behavior.hpp +++ b/include/stdexec/__detail/__completion_behavior.hpp @@ -26,6 +26,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { ////////////////////////////////////////////////////////////////////////////////////////// @@ -247,3 +249,5 @@ namespace STDEXEC #endif // !defined(STDEXEC_DOXYGEN_INVOKED) } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__completion_info.hpp b/include/stdexec/__detail/__completion_info.hpp index 0512af80b..e846b7963 100644 --- a/include/stdexec/__detail/__completion_info.hpp +++ b/include/stdexec/__detail/__completion_info.hpp @@ -31,6 +31,8 @@ #include // IWYU pragma: end_keep +#include "__prologue.hpp" + namespace STDEXEC { template @@ -149,3 +151,5 @@ namespace STDEXEC } } // namespace __cmplsigs } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__completion_signatures.hpp b/include/stdexec/__detail/__completion_signatures.hpp index db05d2f5e..282457711 100644 --- a/include/stdexec/__detail/__completion_signatures.hpp +++ b/include/stdexec/__detail/__completion_signatures.hpp @@ -26,6 +26,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -586,3 +588,5 @@ namespace STDEXEC #endif // ^^^ constexpr exceptions ^^^ } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__completion_signatures_of.hpp b/include/stdexec/__detail/__completion_signatures_of.hpp index 285430607..c09b281c8 100644 --- a/include/stdexec/__detail/__completion_signatures_of.hpp +++ b/include/stdexec/__detail/__completion_signatures_of.hpp @@ -22,6 +22,8 @@ #include "__get_completion_signatures.hpp" #include "__sender_concepts.hpp" // IWYU pragma: export +#include "__prologue.hpp" + namespace STDEXEC { #if STDEXEC_ENABLE_EXTRA_TYPE_CHECKING() @@ -47,3 +49,5 @@ namespace STDEXEC using completion_signatures_of_t = __completion_signatures_of_t<_CvSender, _Env...>; #endif } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__concepts.hpp b/include/stdexec/__detail/__concepts.hpp index 7e2bcb6b0..af43ca566 100644 --- a/include/stdexec/__detail/__concepts.hpp +++ b/include/stdexec/__detail/__concepts.hpp @@ -31,6 +31,8 @@ # include #endif +#include "__prologue.hpp" + namespace STDEXEC { ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -329,3 +331,5 @@ namespace STDEXEC && __std::copy_constructible<_Alloc> // && __std::equality_comparable<_Alloc>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__connect.hpp b/include/stdexec/__detail/__connect.hpp index 5f45479a0..264859130 100644 --- a/include/stdexec/__detail/__connect.hpp +++ b/include/stdexec/__detail/__connect.hpp @@ -24,6 +24,8 @@ #include "__transform_sender.hpp" #include "__type_traits.hpp" +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -271,3 +273,5 @@ namespace STDEXEC && __nothrow_callable; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__connect_awaitable.hpp b/include/stdexec/__detail/__connect_awaitable.hpp index 9b24af9ec..b13f76965 100644 --- a/include/stdexec/__detail/__connect_awaitable.hpp +++ b/include/stdexec/__detail/__connect_awaitable.hpp @@ -28,7 +28,8 @@ #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wsubobject-linkage") namespace STDEXEC @@ -534,4 +535,4 @@ namespace STDEXEC inline constexpr __connect_awaitable_t __connect_awaitable{}; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__continues_on.hpp b/include/stdexec/__detail/__continues_on.hpp index c14fbec02..6e0baf4e3 100644 --- a/include/stdexec/__detail/__continues_on.hpp +++ b/include/stdexec/__detail/__continues_on.hpp @@ -32,6 +32,8 @@ #include "__utility.hpp" #include "__variant.hpp" // IWYU pragma: keep for __variant +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -437,3 +439,5 @@ namespace STDEXEC struct __sexpr_impl : __trnsfr::__continues_on_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__counting_scopes.hpp b/include/stdexec/__detail/__counting_scopes.hpp index 7d3f18ba4..aee4e6750 100644 --- a/include/stdexec/__detail/__counting_scopes.hpp +++ b/include/stdexec/__detail/__counting_scopes.hpp @@ -34,6 +34,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { struct _JOINING_A_COUNTING_SCOPE_NEEDS_A_SCHEDULER_IN_THE_ENVIRONMENT_ @@ -866,3 +868,5 @@ namespace STDEXEC } }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__debug.hpp b/include/stdexec/__detail/__debug.hpp index 0329f22c0..daf98f052 100644 --- a/include/stdexec/__detail/__debug.hpp +++ b/include/stdexec/__detail/__debug.hpp @@ -26,6 +26,8 @@ #include // IWYU pragma: keep for std::terminate +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -212,3 +214,5 @@ namespace STDEXEC } } } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__deprecations.hpp b/include/stdexec/__detail/__deprecations.hpp index 9a9c004f0..83d1c27c4 100644 --- a/include/stdexec/__detail/__deprecations.hpp +++ b/include/stdexec/__detail/__deprecations.hpp @@ -17,6 +17,8 @@ #include "__execution_fwd.hpp" +#include "__prologue.hpp" + namespace STDEXEC { using execute_may_block_caller_t [[deprecated]] = __execute_may_block_caller_t; @@ -85,3 +87,5 @@ namespace STDEXEC [[deprecated]] inline constexpr exec::__execute_t const & execute = exec::__execute; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__diagnostics.hpp b/include/stdexec/__detail/__diagnostics.hpp index 62af3a31c..b587daaf8 100644 --- a/include/stdexec/__detail/__diagnostics.hpp +++ b/include/stdexec/__detail/__diagnostics.hpp @@ -22,6 +22,8 @@ #include // IWYU pragma: keep for std::exception +#include "__prologue.hpp" + namespace STDEXEC { struct sender_tag; @@ -455,3 +457,5 @@ namespace STDEXEC "'connect'\n" \ "member function that accepts sync_wait's receiver.\n" \ STDEXEC_ERROR_CANNOT_CONNECT_SENDER_TO_RECEIVER + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__domain.hpp b/include/stdexec/__detail/__domain.hpp index 096671ccc..d1f8a056d 100644 --- a/include/stdexec/__detail/__domain.hpp +++ b/include/stdexec/__detail/__domain.hpp @@ -26,6 +26,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __detail @@ -487,3 +489,5 @@ namespace std }; } // namespace std + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__env.hpp b/include/stdexec/__detail/__env.hpp index 87e397f95..6e56e6e94 100644 --- a/include/stdexec/__detail/__env.hpp +++ b/include/stdexec/__detail/__env.hpp @@ -27,7 +27,8 @@ #include // IWYU pragma: keep for unwrap_reference_t #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_EDG(probable_guiding_friend) STDEXEC_PRAGMA_IGNORE_EDG(type_qualifiers_ignored_on_reference) STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") @@ -297,4 +298,4 @@ namespace STDEXEC concept __environment_provider = __minvocable_q<__call_result_t, get_env_t, _EnvProvider const &>; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__epilogue.hpp b/include/stdexec/__detail/__epilogue.hpp new file mode 100644 index 000000000..0616b4a12 --- /dev/null +++ b/include/stdexec/__detail/__epilogue.hpp @@ -0,0 +1,51 @@ + +/* + * Copyright (c) 2026 NVIDIA Corporation + * + * Licensed under the Apache License Version 2.0 with LLVM Exceptions + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * https://llvm.org/LICENSE.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// NO include guard or `#pragma once` here (this file is included multiple times) + +#if !defined(STDEXEC_PROLOGUE_INCLUDED) +# error \ + " must be included before " +#endif +#undef STDEXEC_PROLOGUE_INCLUDED + +#if defined(STDEXEC_POP_MACRO___callback) +# pragma pop_macro("__callback") +# undef STDEXEC_POP_MACRO___callback +#endif // defined(STDEXEC_POP_MACRO___callback) + +#if defined(STDEXEC_POP_MACRO___valid) +# pragma pop_macro("__valid") +# undef STDEXEC_POP_MACRO___valid +#endif // defined(STDEXEC_POP_MACRO___valid) + +#if defined(STDEXEC_POP_MACRO_max) +# pragma pop_macro("max") +# undef STDEXEC_POP_MACRO_max +#endif // defined(STDEXEC_POP_MACRO_max) + +#if defined(STDEXEC_POP_MACRO_min) +# pragma pop_macro("min") +# undef STDEXEC_POP_MACRO_min +#endif // defined(STDEXEC_POP_MACRO_min) + +#if defined(STDEXEC_POP_MACRO_interface) +# pragma pop_macro("interface") +# undef STDEXEC_POP_MACRO_interface +#endif // defined(STDEXEC_POP_MACRO_interface) + +STDEXEC_PRAGMA_POP() diff --git a/include/stdexec/__detail/__execution_fwd.hpp b/include/stdexec/__detail/__execution_fwd.hpp index 031b5a5a0..d7852d2bf 100644 --- a/include/stdexec/__detail/__execution_fwd.hpp +++ b/include/stdexec/__detail/__execution_fwd.hpp @@ -15,6 +15,8 @@ */ #pragma once +// IWYU pragma: always_keep + #include "__config.hpp" // IWYU pragma: export #include "__concepts.hpp" @@ -22,7 +24,7 @@ #include "__type_traits.hpp" #include "__utility.hpp" -// IWYU pragma: always_keep +#include "__prologue.hpp" STDEXEC_NAMESPACE_STD_BEGIN struct monostate; @@ -404,3 +406,5 @@ namespace STDEXEC STDEXEC_P2300_DEPRECATED_SYMBOL(std::this_thread::sync_wait_with_variant_t) STDEXEC_P2300_DEPRECATED_SYMBOL(std::this_thread::sync_wait_with_variant) } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__execution_legacy.hpp b/include/stdexec/__detail/__execution_legacy.hpp index 5f69cd144..cff627017 100644 --- a/include/stdexec/__detail/__execution_legacy.hpp +++ b/include/stdexec/__detail/__execution_legacy.hpp @@ -21,6 +21,8 @@ # include // IWYU pragma: keep #endif +#include "__prologue.hpp" + namespace STDEXEC { @@ -98,3 +100,5 @@ namespace STDEXEC #endif } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__finally.hpp b/include/stdexec/__detail/__finally.hpp index 433781399..56b7b487a 100644 --- a/include/stdexec/__detail/__finally.hpp +++ b/include/stdexec/__detail/__finally.hpp @@ -29,6 +29,8 @@ #include "__utility.hpp" #include "__variant.hpp" +#include "__prologue.hpp" + namespace STDEXEC { namespace __final @@ -410,3 +412,5 @@ namespace STDEXEC } }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__get_completion_signatures.hpp b/include/stdexec/__detail/__get_completion_signatures.hpp index 87f71325a..1d0fa839e 100644 --- a/include/stdexec/__detail/__get_completion_signatures.hpp +++ b/include/stdexec/__detail/__get_completion_signatures.hpp @@ -30,6 +30,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __detail @@ -435,3 +437,5 @@ namespace STDEXEC } } } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__inline_scheduler.hpp b/include/stdexec/__detail/__inline_scheduler.hpp index b72695204..fd2176a5e 100644 --- a/include/stdexec/__detail/__inline_scheduler.hpp +++ b/include/stdexec/__detail/__inline_scheduler.hpp @@ -21,6 +21,8 @@ #include "__receivers.hpp" #include "__schedulers.hpp" +#include "__prologue.hpp" + namespace STDEXEC { struct __inline_attrs @@ -85,3 +87,5 @@ namespace STDEXEC static_assert(__completes_inline>>); } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__into_variant.hpp b/include/stdexec/__detail/__into_variant.hpp index adc52c703..fb039927c 100644 --- a/include/stdexec/__detail/__into_variant.hpp +++ b/include/stdexec/__detail/__into_variant.hpp @@ -30,6 +30,8 @@ #include #include // IWYU pragma: keep +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -128,3 +130,5 @@ namespace STDEXEC struct __sexpr_impl : __into_variant::__into_variant_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__intrusive_mpsc_queue.hpp b/include/stdexec/__detail/__intrusive_mpsc_queue.hpp index 7a1dcfd6d..01b9d4d4f 100644 --- a/include/stdexec/__detail/__intrusive_mpsc_queue.hpp +++ b/include/stdexec/__detail/__intrusive_mpsc_queue.hpp @@ -25,6 +25,8 @@ #include "stdexec/__detail/__config.hpp" +#include "__prologue.hpp" + namespace STDEXEC { template @@ -104,3 +106,5 @@ namespace STDEXEC }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__intrusive_ptr.hpp b/include/stdexec/__detail/__intrusive_ptr.hpp index 3ccfb5814..7a5cb6977 100644 --- a/include/stdexec/__detail/__intrusive_ptr.hpp +++ b/include/stdexec/__detail/__intrusive_ptr.hpp @@ -27,6 +27,8 @@ # include #endif +#include "__prologue.hpp" + namespace STDEXEC { namespace __ptr @@ -375,3 +377,5 @@ namespace STDEXEC inline constexpr __ptr::__make_intrusive_t<_Ty, _ReservedBits> __make_intrusive{}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__intrusive_queue.hpp b/include/stdexec/__detail/__intrusive_queue.hpp index cbfa23f85..653936295 100644 --- a/include/stdexec/__detail/__intrusive_queue.hpp +++ b/include/stdexec/__detail/__intrusive_queue.hpp @@ -22,6 +22,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __queue @@ -295,3 +297,5 @@ namespace STDEXEC using __queue::__intrusive_queue; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__intrusive_slist.hpp b/include/stdexec/__detail/__intrusive_slist.hpp index 3cb161be3..0788430e4 100644 --- a/include/stdexec/__detail/__intrusive_slist.hpp +++ b/include/stdexec/__detail/__intrusive_slist.hpp @@ -22,6 +22,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __slist @@ -171,3 +173,5 @@ namespace STDEXEC using __slist::__intrusive_slist; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__just.hpp b/include/stdexec/__detail/__just.hpp index a9a3e7fbb..29a6ce570 100644 --- a/include/stdexec/__detail/__just.hpp +++ b/include/stdexec/__detail/__just.hpp @@ -25,7 +25,8 @@ #include "__sender_introspection.hpp" #include "__type_traits.hpp" -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -137,4 +138,4 @@ namespace STDEXEC inline constexpr just_stopped_t just_stopped{}; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__let.hpp b/include/stdexec/__detail/__let.hpp index b911aee38..201c44dea 100644 --- a/include/stdexec/__detail/__let.hpp +++ b/include/stdexec/__detail/__let.hpp @@ -35,6 +35,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { ////////////////////////////////////////////////////////////////////////////// @@ -708,3 +710,5 @@ namespace STDEXEC struct __sexpr_impl : __let::__impls {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__manual_lifetime.hpp b/include/stdexec/__detail/__manual_lifetime.hpp index 08a33e55e..20f0514b9 100644 --- a/include/stdexec/__detail/__manual_lifetime.hpp +++ b/include/stdexec/__detail/__manual_lifetime.hpp @@ -22,6 +22,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { //! Holds storage for a `_Ty`, but allows clients to `__construct(...)`, `__destry()`, @@ -173,3 +175,5 @@ namespace STDEXEC } }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__memory.hpp b/include/stdexec/__detail/__memory.hpp index 00c9c0fd7..8f26f6841 100644 --- a/include/stdexec/__detail/__memory.hpp +++ b/include/stdexec/__detail/__memory.hpp @@ -22,6 +22,8 @@ // include these after __execution_fwd.hpp #include // IWYU pragma: export +#include "__prologue.hpp" + namespace STDEXEC { namespace __detail @@ -124,3 +126,5 @@ namespace STDEXEC } } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__meta.hpp b/include/stdexec/__detail/__meta.hpp index 5d87d5218..a73363b8c 100644 --- a/include/stdexec/__detail/__meta.hpp +++ b/include/stdexec/__detail/__meta.hpp @@ -26,6 +26,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { //! Convenience metafunction getting the dependent type `__t` out of `_Tp`. @@ -1018,3 +1020,5 @@ namespace STDEXEC __detail::__msort_impl(std::array{__mtypeid<_Ts>...})>::__t; }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__on.hpp b/include/stdexec/__detail/__on.hpp index 73dedba98..dcf5fc197 100644 --- a/include/stdexec/__detail/__on.hpp +++ b/include/stdexec/__detail/__on.hpp @@ -32,7 +32,8 @@ #include "__starts_on.hpp" #include "__utility.hpp" -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -254,4 +255,4 @@ namespace STDEXEC }; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__operation_states.hpp b/include/stdexec/__detail/__operation_states.hpp index f43930409..20f528c5f 100644 --- a/include/stdexec/__detail/__operation_states.hpp +++ b/include/stdexec/__detail/__operation_states.hpp @@ -23,6 +23,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { // operation state tag type @@ -65,3 +67,5 @@ namespace STDEXEC concept operation_state = __std::destructible<_Op> && std::is_object_v<_Op> && requires(_Op &__op) { STDEXEC::start(__op); }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__optional.hpp b/include/stdexec/__detail/__optional.hpp index 371c4780b..18f5a41ff 100644 --- a/include/stdexec/__detail/__optional.hpp +++ b/include/stdexec/__detail/__optional.hpp @@ -27,6 +27,8 @@ #include // IWYU pragma: keep for ::new #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __opt @@ -253,3 +255,5 @@ namespace STDEXEC using __opt::__bad_optional_access; using __opt::__nullopt; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__parallel_scheduler.hpp b/include/stdexec/__detail/__parallel_scheduler.hpp index 44e1f2157..7a81b221a 100644 --- a/include/stdexec/__detail/__parallel_scheduler.hpp +++ b/include/stdexec/__detail/__parallel_scheduler.hpp @@ -30,6 +30,8 @@ #include #include +#include "__prologue.hpp" + #if defined(STDEXEC_SYSTEM_CONTEXT_SCHEDULE_OP_SIZE) \ || defined(STDEXEC_SYSTEM_CONTEXT_SCHEDULE_OP_ALIGN) \ || defined(STDEXEC_SYSTEM_CONTEXT_BULK_SCHEDULE_OP_SIZE) \ @@ -782,6 +784,8 @@ namespace STDEXEC } } // namespace STDEXEC +#include "__epilogue.hpp" + #if defined(STDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY) # define STDEXEC_PARALLEL_SCHEDULER_INLINE inline # include "__parallel_scheduler_default_impl_entry.hpp" diff --git a/include/stdexec/__detail/__parallel_scheduler_backend.hpp b/include/stdexec/__detail/__parallel_scheduler_backend.hpp index 34fd069de..85a10474c 100644 --- a/include/stdexec/__detail/__parallel_scheduler_backend.hpp +++ b/include/stdexec/__detail/__parallel_scheduler_backend.hpp @@ -34,7 +34,8 @@ #include #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_MSVC(4702) // warning C4702: unreachable code STDEXEC_PRAGMA_IGNORE_GNU("-Warray-bounds") @@ -409,4 +410,4 @@ namespace STDEXEC } // namespace __detail } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__parallel_scheduler_default_impl.hpp b/include/stdexec/__detail/__parallel_scheduler_default_impl.hpp index 290bb1dd8..724e98a88 100644 --- a/include/stdexec/__detail/__parallel_scheduler_default_impl.hpp +++ b/include/stdexec/__detail/__parallel_scheduler_default_impl.hpp @@ -40,6 +40,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC::__parallel_scheduler_default_impl { using parallel_scheduler_replacement::__parallel_scheduler_backend_factory_t; @@ -400,3 +402,5 @@ namespace STDEXEC::__parallel_scheduler_default_impl __parallel_scheduler_backend_singleton{}; } // namespace STDEXEC::__parallel_scheduler_default_impl + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__parallel_scheduler_default_impl_entry.hpp b/include/stdexec/__detail/__parallel_scheduler_default_impl_entry.hpp index 59c7935b7..2291d33ed 100644 --- a/include/stdexec/__detail/__parallel_scheduler_default_impl_entry.hpp +++ b/include/stdexec/__detail/__parallel_scheduler_default_impl_entry.hpp @@ -29,6 +29,8 @@ #include "__parallel_scheduler_default_impl.hpp" // IWYU pragma: keep +#include "__prologue.hpp" + namespace STDEXEC::parallel_scheduler_replacement { @@ -52,3 +54,5 @@ namespace STDEXEC::parallel_scheduler_replacement .__set_backend_factory(__new_factory); } } // namespace STDEXEC::parallel_scheduler_replacement + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__parallel_scheduler_replacement_api.hpp b/include/stdexec/__detail/__parallel_scheduler_replacement_api.hpp index d1b7d0b52..2629284db 100644 --- a/include/stdexec/__detail/__parallel_scheduler_replacement_api.hpp +++ b/include/stdexec/__detail/__parallel_scheduler_replacement_api.hpp @@ -21,6 +21,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC::parallel_scheduler_replacement { /// Get the backend for the parallel scheduler. @@ -43,3 +45,5 @@ namespace STDEXEC::parallel_scheduler_replacement auto set_parallel_scheduler_backend(__parallel_scheduler_backend_factory_t __new_factory) -> __parallel_scheduler_backend_factory_t; } // namespace STDEXEC::parallel_scheduler_replacement + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__prologue.hpp b/include/stdexec/__detail/__prologue.hpp new file mode 100644 index 000000000..a6e582ebe --- /dev/null +++ b/include/stdexec/__detail/__prologue.hpp @@ -0,0 +1,62 @@ + +/* + * Copyright (c) 2026 NVIDIA Corporation + * + * Licensed under the Apache License Version 2.0 with LLVM Exceptions + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * https://llvm.org/LICENSE.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// NO include guard or `#pragma once` here (this file is included multiple times) + +#if defined(STDEXEC_PROLOGUE_INCLUDED) +# error \ + " must be included before is included again" +#endif +#define STDEXEC_PROLOGUE_INCLUDED() 1 + +#include + +STDEXEC_PRAGMA_PUSH() + +// Windows.h macros: + +#if defined(interface) +# pragma push_macro("interface") +# undef interface +# define STDEXEC_POP_MACRO_interface +#endif // defined(interface) + +#if defined(min) +# pragma push_macro("min") +# undef min +# define STDEXEC_POP_MACRO_min +#endif // defined(min) + +#if defined(max) +# pragma push_macro("max") +# undef max +# define STDEXEC_POP_MACRO_max +#endif // defined(max) + +// sal.h on Windows + +#if defined(__valid) +# pragma push_macro("__valid") +# undef __valid +# define STDEXEC_POP_MACRO___valid +#endif // defined(__valid) + +#if defined(__callback) +# pragma push_macro("__callback") +# undef __callback +# define STDEXEC_POP_MACRO___callback +#endif // defined(__callback) diff --git a/include/stdexec/__detail/__queries.hpp b/include/stdexec/__detail/__queries.hpp index 3dd58b7e1..737421724 100644 --- a/include/stdexec/__detail/__queries.hpp +++ b/include/stdexec/__detail/__queries.hpp @@ -23,6 +23,8 @@ #include "__config.hpp" #include "__query.hpp" +#include "__prologue.hpp" + namespace STDEXEC { ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -75,6 +77,8 @@ namespace STDEXEC STDEXEC_HOST_DEVICE_DEDUCTION_GUIDE __sync_attrs(_Sender const &) -> __sync_attrs<_Sender>; } // namespace STDEXEC +#include "__epilogue.hpp" + STDEXEC_P2300_NAMESPACE_BEGIN() ////////////////////////////////////////////////////////////////////////////////// // [exec.get.allocator] diff --git a/include/stdexec/__detail/__query.hpp b/include/stdexec/__detail/__query.hpp index 16e73aeb8..f6a912592 100644 --- a/include/stdexec/__detail/__query.hpp +++ b/include/stdexec/__detail/__query.hpp @@ -25,6 +25,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { // [exec.queries.queryable] @@ -174,3 +176,5 @@ STDEXEC_P2300_NAMESPACE_BEGIN() inline constexpr forwarding_query_t forwarding_query{}; STDEXEC_P2300_NAMESPACE_END() + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__ranges.hpp b/include/stdexec/__detail/__ranges.hpp index 756d75c25..71e738a63 100644 --- a/include/stdexec/__detail/__ranges.hpp +++ b/include/stdexec/__detail/__ranges.hpp @@ -21,6 +21,8 @@ # include +# include "__prologue.hpp" + namespace STDEXEC::ranges { using std::ranges::begin; @@ -32,10 +34,14 @@ namespace STDEXEC::ranges using std::ranges::sentinel_t; } // namespace STDEXEC::ranges +# include "__epilogue.hpp" + #else # include +# include "__prologue.hpp" + namespace STDEXEC::ranges { @@ -116,4 +122,6 @@ namespace STDEXEC::ranges } // namespace STDEXEC::ranges +# include "__epilogue.hpp" + #endif diff --git a/include/stdexec/__detail/__read_env.hpp b/include/stdexec/__detail/__read_env.hpp index b6fed2217..4361edaa4 100644 --- a/include/stdexec/__detail/__read_env.hpp +++ b/include/stdexec/__detail/__read_env.hpp @@ -34,6 +34,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __read_env @@ -187,3 +189,5 @@ STDEXEC_P2300_NAMESPACE_BEGIN() return STDEXEC::read_env(get_stop_token); } STDEXEC_P2300_NAMESPACE_END() + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__receiver_adaptor.hpp b/include/stdexec/__detail/__receiver_adaptor.hpp index 52c92d48d..f49033c8f 100644 --- a/include/stdexec/__detail/__receiver_adaptor.hpp +++ b/include/stdexec/__detail/__receiver_adaptor.hpp @@ -21,6 +21,8 @@ #include "__receivers.hpp" #include "__type_traits.hpp" +#include "__prologue.hpp" + namespace STDEXEC { namespace __adaptors @@ -182,3 +184,5 @@ namespace STDEXEC "instead")]] = __receiver_adaptor<_Derived, _Base>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__receiver_ref.hpp b/include/stdexec/__detail/__receiver_ref.hpp index 144a7204f..959a5de4f 100644 --- a/include/stdexec/__detail/__receiver_ref.hpp +++ b/include/stdexec/__detail/__receiver_ref.hpp @@ -24,6 +24,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __detail @@ -102,3 +104,5 @@ namespace STDEXEC {} }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__receivers.hpp b/include/stdexec/__detail/__receivers.hpp index 5650273b9..5887af74b 100644 --- a/include/stdexec/__detail/__receivers.hpp +++ b/include/stdexec/__detail/__receivers.hpp @@ -26,6 +26,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __detail @@ -275,3 +277,5 @@ namespace STDEXEC } }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__run_loop.hpp b/include/stdexec/__detail/__run_loop.hpp index 3a4901eda..7e908048f 100644 --- a/include/stdexec/__detail/__run_loop.hpp +++ b/include/stdexec/__detail/__run_loop.hpp @@ -29,6 +29,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -403,3 +405,5 @@ namespace STDEXEC } } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__schedule_from.hpp b/include/stdexec/__detail/__schedule_from.hpp index e92d9d580..209dc5090 100644 --- a/include/stdexec/__detail/__schedule_from.hpp +++ b/include/stdexec/__detail/__schedule_from.hpp @@ -23,6 +23,8 @@ #include "__queries.hpp" #include "__sender_introspection.hpp" +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -55,3 +57,5 @@ namespace STDEXEC } }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__schedulers.hpp b/include/stdexec/__detail/__schedulers.hpp index 5d6b32201..ae52f0ab9 100644 --- a/include/stdexec/__detail/__schedulers.hpp +++ b/include/stdexec/__detail/__schedulers.hpp @@ -28,6 +28,8 @@ #include "__type_traits.hpp" #include "__utility.hpp" +#include "__prologue.hpp" + namespace STDEXEC { // scheduler concept opt-in tag @@ -566,3 +568,5 @@ namespace STDEXEC "renamed get_delegation_scheduler")]] = get_delegation_scheduler; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__scope.hpp b/include/stdexec/__detail/__scope.hpp index 1d973bc92..f1ca7944b 100644 --- a/include/stdexec/__detail/__scope.hpp +++ b/include/stdexec/__detail/__scope.hpp @@ -20,6 +20,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { template @@ -115,3 +117,5 @@ namespace STDEXEC STDEXEC_HOST_DEVICE_DEDUCTION_GUIDE __scope_guard(_Fn, _Ts...) -> __scope_guard<_Fn, std::unwrap_reference_t<_Ts>...>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__scope_concepts.hpp b/include/stdexec/__detail/__scope_concepts.hpp index 695342221..b6308da59 100644 --- a/include/stdexec/__detail/__scope_concepts.hpp +++ b/include/stdexec/__detail/__scope_concepts.hpp @@ -26,6 +26,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -74,3 +76,5 @@ namespace STDEXEC { __token.wrap(__declval<__scope_concepts::__test_sender>()) } -> sender_in>; }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__sender_adaptor_closure.hpp b/include/stdexec/__detail/__sender_adaptor_closure.hpp index 95473f36b..b7f2c37ba 100644 --- a/include/stdexec/__detail/__sender_adaptor_closure.hpp +++ b/include/stdexec/__detail/__sender_adaptor_closure.hpp @@ -22,6 +22,8 @@ #include "__tuple.hpp" #include "__type_traits.hpp" +#include "__prologue.hpp" + namespace STDEXEC { template @@ -124,3 +126,5 @@ namespace STDEXEC template STDEXEC_HOST_DEVICE_DEDUCTION_GUIDE __closure(_Fn, _As...) -> __closure<_Fn, _As...>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__sender_concepts.hpp b/include/stdexec/__detail/__sender_concepts.hpp index a3101933d..04e1c7984 100644 --- a/include/stdexec/__detail/__sender_concepts.hpp +++ b/include/stdexec/__detail/__sender_concepts.hpp @@ -27,6 +27,8 @@ #include "__receivers.hpp" #include "__type_traits.hpp" +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -183,3 +185,5 @@ namespace STDEXEC _Env...>(); } } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__sender_introspection.hpp b/include/stdexec/__detail/__sender_introspection.hpp index 9fd98b0ae..6c43527e6 100644 --- a/include/stdexec/__detail/__sender_introspection.hpp +++ b/include/stdexec/__detail/__sender_introspection.hpp @@ -24,7 +24,8 @@ #include #include // IWYU pragma: keep for std::terminate -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wc++26-extensions") namespace STDEXEC @@ -281,4 +282,4 @@ namespace STDEXEC " instead") = __sender_for<_Sender, _Tag>; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__sender_ref.hpp b/include/stdexec/__detail/__sender_ref.hpp index f5e10310b..6aad681ed 100644 --- a/include/stdexec/__detail/__sender_ref.hpp +++ b/include/stdexec/__detail/__sender_ref.hpp @@ -22,6 +22,8 @@ #include "__env.hpp" #include "__get_completion_signatures.hpp" +#include "__prologue.hpp" + namespace STDEXEC { // A wrapper around a sender to be used when an adaptor with a sender transform wants to @@ -86,3 +88,5 @@ namespace STDEXEC template STDEXEC_HOST_DEVICE_DEDUCTION_GUIDE __sender_ref(_Sender&) -> __sender_ref<_Sender>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__senders.hpp b/include/stdexec/__detail/__senders.hpp index 0ab140789..51101de60 100644 --- a/include/stdexec/__detail/__senders.hpp +++ b/include/stdexec/__detail/__senders.hpp @@ -22,6 +22,8 @@ #include "__connect.hpp" // IWYU pragma: export #include "__sender_concepts.hpp" // IWYU pragma: export +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -67,3 +69,5 @@ namespace STDEXEC constexpr void __ensure_well_formed_sender() noexcept {} } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__sequence.hpp b/include/stdexec/__detail/__sequence.hpp index 9ba8081a7..b41f3a8ba 100644 --- a/include/stdexec/__detail/__sequence.hpp +++ b/include/stdexec/__detail/__sequence.hpp @@ -26,7 +26,8 @@ #include "__transform_completion_signatures.hpp" #include "__variant.hpp" -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_EDG(expr_has_no_effect) STDEXEC_PRAGMA_IGNORE_EDG(type_qualifiers_ignored_on_reference) STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") @@ -504,4 +505,4 @@ namespace STDEXEC } // namespace __detail } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__spawn.hpp b/include/stdexec/__detail/__spawn.hpp index 6219d35dd..168625e21 100644 --- a/include/stdexec/__detail/__spawn.hpp +++ b/include/stdexec/__detail/__spawn.hpp @@ -31,6 +31,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -192,3 +194,5 @@ namespace STDEXEC inline constexpr spawn_t spawn{}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__spawn_common.hpp b/include/stdexec/__detail/__spawn_common.hpp index 73373505e..0f3c5a155 100644 --- a/include/stdexec/__detail/__spawn_common.hpp +++ b/include/stdexec/__detail/__spawn_common.hpp @@ -23,6 +23,8 @@ #include +#include "__prologue.hpp" + ////////////////////////////////////////////////////////////////////////////////////////////////// // [exec.spawn] paragraph 9 // [exec.spawn.future] paragraph 15 @@ -91,3 +93,5 @@ namespace STDEXEC::__spawn_common inline constexpr __choose_senv_fn __choose_senv{}; } // namespace STDEXEC::__spawn_common + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__spawn_future.hpp b/include/stdexec/__detail/__spawn_future.hpp index 385956932..9ca00d16d 100644 --- a/include/stdexec/__detail/__spawn_future.hpp +++ b/include/stdexec/__detail/__spawn_future.hpp @@ -35,6 +35,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { @@ -827,3 +829,5 @@ namespace STDEXEC struct __sexpr_impl : __spawn_future::__spawn_future_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__starts_on.hpp b/include/stdexec/__detail/__starts_on.hpp index c24e8bab0..d9490df97 100644 --- a/include/stdexec/__detail/__starts_on.hpp +++ b/include/stdexec/__detail/__starts_on.hpp @@ -29,6 +29,8 @@ #include "__sequence.hpp" #include "__utility.hpp" +#include "__prologue.hpp" + namespace STDEXEC { namespace __starts_on @@ -155,3 +157,5 @@ namespace STDEXEC }; }; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__static_vector.hpp b/include/stdexec/__detail/__static_vector.hpp index 97484332e..0f01046d8 100644 --- a/include/stdexec/__detail/__static_vector.hpp +++ b/include/stdexec/__detail/__static_vector.hpp @@ -23,6 +23,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { template @@ -204,3 +206,5 @@ namespace STDEXEC return __static_vector<_First, 1 + sizeof...(_Rest)>{__first, __rest...}; } } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__stop_token.hpp b/include/stdexec/__detail/__stop_token.hpp index a850357c5..7b02523c6 100644 --- a/include/stdexec/__detail/__stop_token.hpp +++ b/include/stdexec/__detail/__stop_token.hpp @@ -24,6 +24,8 @@ # include // IWYU pragma: export #endif +#include "__prologue.hpp" + // This shouldn't be necessary, but some standard library implementations claim support // for jthread but don't actually provide std::stop_token. STDEXEC_NAMESPACE_STD_BEGIN @@ -117,3 +119,5 @@ namespace STDEXEC STDEXEC_P2300_DEPRECATED_SYMBOL(std::unstoppable_token) STDEXEC_P2300_DEPRECATED_SYMBOL(std::never_stop_token) } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__stop_when.hpp b/include/stdexec/__detail/__stop_when.hpp index 670b670f9..1e1481b6a 100644 --- a/include/stdexec/__detail/__stop_when.hpp +++ b/include/stdexec/__detail/__stop_when.hpp @@ -29,6 +29,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -202,3 +204,5 @@ namespace STDEXEC struct __sexpr_impl<__stop_when_t> : __stop_when_::__stop_when_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__stopped_as_error.hpp b/include/stdexec/__detail/__stopped_as_error.hpp index 9e8e1eab4..b59b833b6 100644 --- a/include/stdexec/__detail/__stopped_as_error.hpp +++ b/include/stdexec/__detail/__stopped_as_error.hpp @@ -24,6 +24,8 @@ #include "__sender_adaptor_closure.hpp" #include "__senders.hpp" +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -49,3 +51,5 @@ namespace STDEXEC inline constexpr stopped_as_error_t stopped_as_error{}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__stopped_as_optional.hpp b/include/stdexec/__detail/__stopped_as_optional.hpp index 13a488420..b2b8a8d7b 100644 --- a/include/stdexec/__detail/__stopped_as_optional.hpp +++ b/include/stdexec/__detail/__stopped_as_optional.hpp @@ -32,6 +32,8 @@ #include #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -155,3 +157,5 @@ namespace STDEXEC struct __sexpr_impl : __sao::__stopped_as_optional_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__submit.hpp b/include/stdexec/__detail/__submit.hpp index d8ea3d80a..9ed43baa5 100644 --- a/include/stdexec/__detail/__submit.hpp +++ b/include/stdexec/__detail/__submit.hpp @@ -23,6 +23,8 @@ #include "__senders.hpp" #include "__type_traits.hpp" +#include "__prologue.hpp" + namespace STDEXEC { namespace __submit @@ -221,3 +223,5 @@ namespace STDEXEC submit_result(_Sender&&, _Receiver) -> submit_result<_Sender, _Receiver>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__sync_wait.hpp b/include/stdexec/__detail/__sync_wait.hpp index cfc11c87b..308c0ab26 100644 --- a/include/stdexec/__detail/__sync_wait.hpp +++ b/include/stdexec/__detail/__sync_wait.hpp @@ -37,7 +37,8 @@ #include #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_MSVC(4714) // marked as __forceinline not inlined namespace STDEXEC::__sync_wait @@ -374,4 +375,4 @@ STDEXEC_P2300_NAMESPACE_BEGIN(this_thread) STDEXEC_P2300_NAMESPACE_END(this_thread) -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__tag_invoke.hpp b/include/stdexec/__detail/__tag_invoke.hpp index a80a40060..5ea75ad6c 100644 --- a/include/stdexec/__detail/__tag_invoke.hpp +++ b/include/stdexec/__detail/__tag_invoke.hpp @@ -22,6 +22,8 @@ "The use of tag_invoke as a means of customization is deprecated. Please use member functions " \ "instead." +#include "__prologue.hpp" + namespace STDEXEC { // [func.tag_invoke], tag_invoke @@ -118,3 +120,5 @@ namespace STDEXEC using tag_t [[deprecated(STDEXEC_TAG_INVOKE_DEPRECATED_MSG)]] = __decay_t; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__task.hpp b/include/stdexec/__detail/__task.hpp index a2350be9e..a8f6e4593 100644 --- a/include/stdexec/__detail/__task.hpp +++ b/include/stdexec/__detail/__task.hpp @@ -30,7 +30,8 @@ #include #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmismatched-new-delete") namespace STDEXEC @@ -758,4 +759,4 @@ namespace STDEXEC #endif // !STDEXEC_NO_STDCPP_COROUTINES() } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__task_scheduler.hpp b/include/stdexec/__detail/__task_scheduler.hpp index ee3a007cc..81ccf1fe9 100644 --- a/include/stdexec/__detail/__task_scheduler.hpp +++ b/include/stdexec/__detail/__task_scheduler.hpp @@ -54,7 +54,8 @@ # define STDEXEC_TASK_BULK_SCHEDULE_OPSTATE_ALIGN 8 #endif -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Warray-bounds") namespace STDEXEC @@ -871,4 +872,4 @@ namespace STDEXEC } // namespace __detail } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__then.hpp b/include/stdexec/__detail/__then.hpp index 2dcb4eeab..9720f2702 100644 --- a/include/stdexec/__detail/__then.hpp +++ b/include/stdexec/__detail/__then.hpp @@ -26,7 +26,8 @@ #include "__senders.hpp" #include "__transform_completion_signatures.hpp" -// include these after __execution_fwd.hpp +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -109,3 +110,5 @@ namespace STDEXEC struct __sexpr_impl : __then::__then_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__transfer_just.hpp b/include/stdexec/__detail/__transfer_just.hpp index b8c199a7b..87881d035 100644 --- a/include/stdexec/__detail/__transfer_just.hpp +++ b/include/stdexec/__detail/__transfer_just.hpp @@ -25,10 +25,11 @@ #include "__schedulers.hpp" #include "__tuple.hpp" +#include "__prologue.hpp" + // Hide transfer_just from Doxygen since it's deprecated and we don't want to document it: #if !defined(STDEXEC_DOXYGEN_INVOKED) -STDEXEC_PRAGMA_PUSH() STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -101,6 +102,6 @@ namespace STDEXEC }; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() - #endif // STDEXEC_DOXYGEN_INVOKED + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__transform_completion_signatures.hpp b/include/stdexec/__detail/__transform_completion_signatures.hpp index 98b6d34c5..01fe17548 100644 --- a/include/stdexec/__detail/__transform_completion_signatures.hpp +++ b/include/stdexec/__detail/__transform_completion_signatures.hpp @@ -28,6 +28,8 @@ #include +#include "__prologue.hpp" + namespace STDEXEC { namespace __cmplsigs @@ -655,3 +657,5 @@ namespace STDEXEC _ErrorTransform, _StoppedSigs>; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__transform_sender.hpp b/include/stdexec/__detail/__transform_sender.hpp index 05f08a764..fb4e07316 100644 --- a/include/stdexec/__detail/__transform_sender.hpp +++ b/include/stdexec/__detail/__transform_sender.hpp @@ -23,7 +23,8 @@ #include "__meta.hpp" #include "__type_traits.hpp" -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_EDG(type_qualifiers_ignored_on_reference) namespace STDEXEC @@ -200,4 +201,4 @@ namespace STDEXEC _Scheduler>; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__tuple.hpp b/include/stdexec/__detail/__tuple.hpp index bd42e9f3f..e51c90b3a 100644 --- a/include/stdexec/__detail/__tuple.hpp +++ b/include/stdexec/__detail/__tuple.hpp @@ -36,7 +36,8 @@ # define STDEXEC_CWG1835_TEMPLATE template #endif -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -530,4 +531,4 @@ namespace STDEXEC } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__type_traits.hpp b/include/stdexec/__detail/__type_traits.hpp index 58f1a7601..7a10098f7 100644 --- a/include/stdexec/__detail/__type_traits.hpp +++ b/include/stdexec/__detail/__type_traits.hpp @@ -21,6 +21,8 @@ #include // IWYU pragma: export #include // IWYU pragma: keep +#include "__prologue.hpp" + namespace STDEXEC { @@ -170,3 +172,5 @@ namespace STDEXEC using __mfalse = __mbool; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__typeinfo.hpp b/include/stdexec/__detail/__typeinfo.hpp index 483de8292..416efda93 100644 --- a/include/stdexec/__detail/__typeinfo.hpp +++ b/include/stdexec/__detail/__typeinfo.hpp @@ -23,7 +23,8 @@ #include #include -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wunused-private-field") ////////////////////////////////////////////////////////////////////////////////////////// @@ -275,4 +276,4 @@ namespace STDEXEC static_assert(STDEXEC_IS_SAME(void, __msplice<__mtypeid>)); } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__unstoppable.hpp b/include/stdexec/__detail/__unstoppable.hpp index 0c4051bd8..5d81fe1f0 100644 --- a/include/stdexec/__detail/__unstoppable.hpp +++ b/include/stdexec/__detail/__unstoppable.hpp @@ -22,7 +22,11 @@ #include "__env.hpp" #include "__write_env.hpp" +#include "__prologue.hpp" + namespace STDEXEC { inline constexpr auto unstoppable = write_env(prop{get_stop_token, never_stop_token{}}); } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__upon_error.hpp b/include/stdexec/__detail/__upon_error.hpp index e738a38d1..957cb688d 100644 --- a/include/stdexec/__detail/__upon_error.hpp +++ b/include/stdexec/__detail/__upon_error.hpp @@ -25,7 +25,8 @@ #include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender #include "__transform_completion_signatures.hpp" -// include these after __execution_fwd.hpp +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -95,3 +96,5 @@ namespace STDEXEC struct __sexpr_impl : __upon_error::__upon_error_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__upon_stopped.hpp b/include/stdexec/__detail/__upon_stopped.hpp index e496bb0b0..910db47cc 100644 --- a/include/stdexec/__detail/__upon_stopped.hpp +++ b/include/stdexec/__detail/__upon_stopped.hpp @@ -25,7 +25,8 @@ #include "__senders.hpp" // IWYU pragma: keep for __well_formed_sender #include "__transform_completion_signatures.hpp" -// include these after __execution_fwd.hpp +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -100,3 +101,5 @@ namespace STDEXEC {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__utility.hpp b/include/stdexec/__detail/__utility.hpp index 8a28a9adb..c4755042f 100644 --- a/include/stdexec/__detail/__utility.hpp +++ b/include/stdexec/__detail/__utility.hpp @@ -26,7 +26,8 @@ #include // IWYU pragma: keep for std::launder #include // IWYU pragma: keep for std::unreachable -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wduplicate-decl-specifier") namespace STDEXEC @@ -380,4 +381,4 @@ namespace STDEXEC } } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__variant.hpp b/include/stdexec/__detail/__variant.hpp index 106742d6c..b78e1e341 100644 --- a/include/stdexec/__detail/__variant.hpp +++ b/include/stdexec/__detail/__variant.hpp @@ -32,7 +32,8 @@ /* the need for a default constructor for each alternative type. */ /********************************************************************************/ -STDEXEC_PRAGMA_PUSH() +#include "__prologue.hpp" + STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces") namespace STDEXEC @@ -385,4 +386,4 @@ namespace STDEXEC using __uniqued_variant = __mcall<__munique<__qq<__variant>>, __decay_t...>; } // namespace STDEXEC -STDEXEC_PRAGMA_POP() +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__when_all.hpp b/include/stdexec/__detail/__when_all.hpp index 5e9dfa2f3..4e18a3c31 100644 --- a/include/stdexec/__detail/__when_all.hpp +++ b/include/stdexec/__detail/__when_all.hpp @@ -40,6 +40,8 @@ #include "__atomic.hpp" #include +#include "__prologue.hpp" + namespace STDEXEC { ///////////////////////////////////////////////////////////////////////////// @@ -642,3 +644,5 @@ namespace STDEXEC : __when_all::__transfer_when_all_with_variant_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__with_awaitable_senders.hpp b/include/stdexec/__detail/__with_awaitable_senders.hpp index 722328891..d0778bf7b 100644 --- a/include/stdexec/__detail/__with_awaitable_senders.hpp +++ b/include/stdexec/__detail/__with_awaitable_senders.hpp @@ -21,6 +21,8 @@ #include "__as_awaitable.hpp" #include "__concepts.hpp" +#include "__prologue.hpp" + namespace STDEXEC { #if !STDEXEC_NO_STDCPP_COROUTINES() @@ -84,3 +86,5 @@ namespace STDEXEC }; #endif } // namespace STDEXEC + +#include "__epilogue.hpp" diff --git a/include/stdexec/__detail/__write_env.hpp b/include/stdexec/__detail/__write_env.hpp index 941623547..ef0f0f2b1 100644 --- a/include/stdexec/__detail/__write_env.hpp +++ b/include/stdexec/__detail/__write_env.hpp @@ -23,6 +23,8 @@ #include "__queries.hpp" #include "__sender_adaptor_closure.hpp" +#include "__prologue.hpp" + namespace STDEXEC { ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -77,3 +79,5 @@ namespace STDEXEC struct __sexpr_impl<__write_env_t> : __write::__write_env_impl {}; } // namespace STDEXEC + +#include "__epilogue.hpp"