diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 591f68d77..cdb3d039e 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -28,12 +28,12 @@ endfunction() function(def_example example) split(${example} target source) add_executable(${target} ${source}) + target_compile_options(${target} PUBLIC + $<$:-Wno-maybe-uninitialized>) # warnings being emitted from stdlib headers, why? target_link_libraries(${target} PRIVATE STDEXEC::stdexec stdexec_executable_flags $) - target_compile_options(${target} INTERFACE - $<$:-Wno-maybe-uninitialized>) # warnings being emitted from stdlib headers, why? endfunction() set(stdexec_examples diff --git a/include/exec/detail/system_context_replaceability_api.hpp b/include/exec/detail/system_context_replaceability_api.hpp index 462f55bd9..4d63f7e4f 100644 --- a/include/exec/detail/system_context_replaceability_api.hpp +++ b/include/exec/detail/system_context_replaceability_api.hpp @@ -20,7 +20,6 @@ #include "../../stdexec/__detail/__execution_fwd.hpp" #include "../../stdexec/__detail/__system_context_replaceability_api.hpp" -#include #include namespace experimental::execution::system_context_replaceability diff --git a/include/exec/execute.hpp b/include/exec/execute.hpp index eda0fcb6d..b728bcab2 100644 --- a/include/exec/execute.hpp +++ b/include/exec/execute.hpp @@ -18,7 +18,6 @@ #include "../stdexec/__detail/__execution_fwd.hpp" #include "../stdexec/__detail/__concepts.hpp" -#include "../stdexec/__detail/__receivers.hpp" #include "../stdexec/__detail/__schedulers.hpp" #include "../stdexec/__detail/__senders.hpp" #include "../stdexec/__detail/__then.hpp" diff --git a/include/exec/sequence_senders.hpp b/include/exec/sequence_senders.hpp index 5c9f6d4d4..e224a3eb0 100644 --- a/include/exec/sequence_senders.hpp +++ b/include/exec/sequence_senders.hpp @@ -849,10 +849,9 @@ namespace experimental::execution return STDEXEC::connect(static_cast&&>(__next), __stopped_means_break<_Receiver>{ static_cast<_Receiver&&>(__rcvr)}); - // NOLINTNEXTLINE(bugprone-branch-clone) } else if constexpr (__subscribable_with_static_member<__tfx_seq_t, _Receiver>) - { + { // NOLINT(bugprone-branch-clone) return __tfx_seq.subscribe(static_cast<__tfx_seq_t&&>(__tfx_seq), static_cast<_Receiver&&>(__rcvr)); } diff --git a/include/stdexec/__detail/__any.hpp b/include/stdexec/__detail/__any.hpp index 624248e70..8b4402878 100644 --- a/include/stdexec/__detail/__any.hpp +++ b/include/stdexec/__detail/__any.hpp @@ -1198,7 +1198,8 @@ namespace STDEXEC::__any [[nodiscard]] static constexpr auto __value_(_Self &&__self) noexcept -> auto && { - using __from_ref_t = __if_c, _Value &, _Value &&>; + using __from_ref_t + [[maybe_unused]] = __if_c, _Value &, _Value &&>; using __to_ref_t = __copy_cvref_t<_Self &&, __value_type>; STDEXEC_IF_NOT_CONSTEVAL diff --git a/include/stdexec/__detail/__atomic_intrusive_queue.hpp b/include/stdexec/__detail/__atomic_intrusive_queue.hpp index ae72c0de9..1a11f3975 100644 --- a/include/stdexec/__detail/__atomic_intrusive_queue.hpp +++ b/include/stdexec/__detail/__atomic_intrusive_queue.hpp @@ -22,7 +22,6 @@ #include "__intrusive_queue.hpp" #include -#include namespace STDEXEC { diff --git a/include/stdexec/__detail/__bulk.hpp b/include/stdexec/__detail/__bulk.hpp index fdbf8147b..920c4b6ce 100644 --- a/include/stdexec/__detail/__bulk.hpp +++ b/include/stdexec/__detail/__bulk.hpp @@ -176,8 +176,8 @@ namespace STDEXEC __with_error_invoke_t<_AlgoTag, _Fun, _Shape, _CvSender, _Env...>>; template - struct __generic_bulk_t - { // NOLINT(bugprone-crtp-constructor-accessibility) + struct __generic_bulk_t // NOLINT(bugprone-crtp-constructor-accessibility) + { template -#include STDEXEC_PRAGMA_PUSH() STDEXEC_PRAGMA_IGNORE_GNU("-Wsubobject-linkage") @@ -199,22 +197,22 @@ namespace STDEXEC union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __awaitable_t __awaitable_; }; union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __awaiter_t __awaiter_; }; }; - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) _Awaitable __source_awaitable_; union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __state __awaiter_; }; @@ -277,16 +275,16 @@ namespace STDEXEC union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __awaiter_t __awaiter_; }; }; - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) _Awaitable __source_awaitable_; union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __state __awaiter_; }; @@ -348,16 +346,16 @@ namespace STDEXEC union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __awaiter_t __awaiter_; }; }; - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) _Awaitable __source_awaitable_; union { - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) __state __awaiter_; }; @@ -389,7 +387,7 @@ namespace STDEXEC { // _Awaitable has neither a distinct awaiter, nor a distinct awaitable // so we don't need separate storage for either - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) _Awaitable __awaiter_; template <__not_decays_to<__awaitable_state> _Awaitable2> @@ -534,11 +532,11 @@ namespace STDEXEC } __synthetic_coro_frame __synthetic_frame_{&__promise_t::__resume}; - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) _Receiver __rcvr_; [[neo_unique_addres]] __awaitable_state<_Awaitable, __promise_t> __awaiter_; - [[no_unique_address]] + STDEXEC_ATTRIBUTE(no_unique_address) bool __started_{false}; }; } // namespace __connect_await diff --git a/include/stdexec/__detail/__execution_legacy.hpp b/include/stdexec/__detail/__execution_legacy.hpp index 5305fd8f0..5f69cd144 100644 --- a/include/stdexec/__detail/__execution_legacy.hpp +++ b/include/stdexec/__detail/__execution_legacy.hpp @@ -18,7 +18,7 @@ #include "__config.hpp" #if !STDEXEC_NO_STDCPP_EXECUTION_POLICY() -# include +# include // IWYU pragma: keep #endif namespace STDEXEC diff --git a/include/stdexec/__detail/__inline_scheduler.hpp b/include/stdexec/__detail/__inline_scheduler.hpp index e11cefff2..2a4bf8817 100644 --- a/include/stdexec/__detail/__inline_scheduler.hpp +++ b/include/stdexec/__detail/__inline_scheduler.hpp @@ -18,7 +18,6 @@ #include "__execution_fwd.hpp" #include "__completion_behavior.hpp" -#include "__queries.hpp" #include "__receivers.hpp" #include "__schedulers.hpp" diff --git a/include/stdexec/__detail/__manual_lifetime.hpp b/include/stdexec/__detail/__manual_lifetime.hpp index 10861ca96..08a33e55e 100644 --- a/include/stdexec/__detail/__manual_lifetime.hpp +++ b/include/stdexec/__detail/__manual_lifetime.hpp @@ -17,7 +17,6 @@ #pragma once #include "__concepts.hpp" -#include "__utility.hpp" #include #include @@ -36,7 +35,7 @@ namespace STDEXEC constexpr __manual_lifetime() noexcept = default; //! Destructor does nothing: It's on you to call `__destroy()` if you mean to. - constexpr ~__manual_lifetime() = default; + constexpr ~__manual_lifetime() {} STDEXEC_IMMOVABLE(__manual_lifetime); diff --git a/include/stdexec/__detail/__ranges.hpp b/include/stdexec/__detail/__ranges.hpp index e0b705c80..756d75c25 100644 --- a/include/stdexec/__detail/__ranges.hpp +++ b/include/stdexec/__detail/__ranges.hpp @@ -16,7 +16,6 @@ #pragma once #include "__config.hpp" -#include "__type_traits.hpp" #if !STDEXEC_NO_STDCPP_RANGES() diff --git a/include/stdexec/__detail/__receiver_ref.hpp b/include/stdexec/__detail/__receiver_ref.hpp index 1ba55438d..8fe5a8a7c 100644 --- a/include/stdexec/__detail/__receiver_ref.hpp +++ b/include/stdexec/__detail/__receiver_ref.hpp @@ -18,7 +18,6 @@ #include "__concepts.hpp" #include "__config.hpp" #include "__execution_fwd.hpp" -#include "__operation_states.hpp" #include "__receivers.hpp" #include "__sender_concepts.hpp" diff --git a/include/stdexec/__detail/__spawn_common.hpp b/include/stdexec/__detail/__spawn_common.hpp index 0ed6d824b..73373505e 100644 --- a/include/stdexec/__detail/__spawn_common.hpp +++ b/include/stdexec/__detail/__spawn_common.hpp @@ -20,7 +20,6 @@ #include "__concepts.hpp" #include "__env.hpp" -#include "__queries.hpp" #include @@ -69,7 +68,7 @@ namespace STDEXEC::__spawn_common // [exec.spawn] paragraph 9 // [exec.spawn.future] paragraph 15 if constexpr (__callable) - { + { // NOLINT(bugprone-branch-clone) // (9/15.1) -- if the expression get_allocator(env) is well-formed, then ... // senv is the expression env; return static_cast<_Env&&>(__env); diff --git a/include/stdexec/__detail/__starts_on.hpp b/include/stdexec/__detail/__starts_on.hpp index 39f33f386..c24e8bab0 100644 --- a/include/stdexec/__detail/__starts_on.hpp +++ b/include/stdexec/__detail/__starts_on.hpp @@ -28,7 +28,6 @@ #include "__senders.hpp" #include "__sequence.hpp" #include "__utility.hpp" -#include "__write_env.hpp" namespace STDEXEC { diff --git a/include/stdexec/__detail/__task.hpp b/include/stdexec/__detail/__task.hpp index 69a1001e2..a6297f2df 100644 --- a/include/stdexec/__detail/__task.hpp +++ b/include/stdexec/__detail/__task.hpp @@ -156,7 +156,7 @@ namespace STDEXEC using __callback_fn_t = __forward_stop_request<_StopSource>; using __stop_callback_t = stop_callback_for_t<_StopToken, __callback_fn_t>; - constexpr __stop_callback_box() {} + constexpr __stop_callback_box() noexcept {} constexpr ~__stop_callback_box() {} diff --git a/include/stdexec/__detail/__tuple.hpp b/include/stdexec/__detail/__tuple.hpp index 4bd47669f..9a19ca2c2 100644 --- a/include/stdexec/__detail/__tuple.hpp +++ b/include/stdexec/__detail/__tuple.hpp @@ -252,7 +252,7 @@ namespace STDEXEC noexcept(__nothrow_callable<__impl_t<_Tuple>, _Fn, _Tuple, _Us...>) -> __call_result_t<__impl_t<_Tuple>, _Fn, _Tuple, _Us...> { - constexpr size_t __size = STDEXEC_REMOVE_REFERENCE(_Tuple)::__size; + STDEXEC_CONSTEXPR_LOCAL size_t __size = STDEXEC_REMOVE_REFERENCE(_Tuple)::__size; if constexpr (__size == 0) { diff --git a/include/stdexec/functional.hpp b/include/stdexec/functional.hpp index 77d5cbf2e..09d0e8ed6 100644 --- a/include/stdexec/functional.hpp +++ b/include/stdexec/functional.hpp @@ -21,7 +21,6 @@ #include "concepts.hpp" // IWYU pragma: keep -#include #include namespace STDEXEC diff --git a/test/exec/test_any_sender.cpp b/test/exec/test_any_sender.cpp index cc28f1603..1dc8a78c9 100644 --- a/test/exec/test_any_sender.cpp +++ b/test/exec/test_any_sender.cpp @@ -36,6 +36,7 @@ STDEXEC_PRAGMA_IGNORE_MSVC(4702) // unreachable code STDEXEC_PRAGMA_IGNORE_MSVC(4996) // 'function' was declared deprecated STDEXEC_PRAGMA_IGNORE_GNU("-Wdeprecated-declarations") STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity) +STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity_with_custom_message) namespace { diff --git a/test/exec/test_bwos_lifo_queue.cpp b/test/exec/test_bwos_lifo_queue.cpp index a6df5377a..f2d294e67 100644 --- a/test/exec/test_bwos_lifo_queue.cpp +++ b/test/exec/test_bwos_lifo_queue.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include