File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ namespace STDEXEC
5757 }
5858
5959 _Receiver __rcvr_;
60- __optional<_Ty> __result_;
60+ __optional<_Ty> __result_ = __nullopt ;
6161 };
6262
6363 template <class _Receiver , class _Query , class _Ty >
Original file line number Diff line number Diff line change 1414# limitations under the License.
1515#=============================================================================
1616
17+ function (add_compile_diagnostics TARGET )
18+ if (CMAKE_CXX_COMPILER_ID STREQUAL Clang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU)
19+ target_compile_options (${TARGET} PRIVATE -Wall -Wextra -Wpedantic -Werror )
20+ endif ()
21+ endfunction ()
22+
1723set (stdexec_test_sources
1824 test_main.cpp
1925 stdexec/cpos/test_cpo_bulk.cpp
@@ -97,6 +103,7 @@ target_link_libraries(common_test_settings INTERFACE $<TARGET_NAME_IF_EXISTS:TBB
97103# $<$<NOT:$<AND:$<CXX_COMPILER_ID:NVHPC>,$<COMPILE_LANGUAGE:CXX>>>:STDEXEC_ENABLE_EXTRA_TYPE_CHECKING>)
98104
99105add_executable (test .stdexec ${stdexec_test_sources} )
106+ add_compile_diagnostics (test .stdexec )
100107target_link_libraries (test .stdexec
101108 PUBLIC
102109 STDEXEC::stdexec
@@ -109,6 +116,7 @@ if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
109116 add_executable (test .parallel_scheduler_replacement
110117 test_main.cpp
111118 stdexec/schedulers/test_parallel_scheduler_replacement.cpp )
119+ add_compile_diagnostics (test .parallel_scheduler_replacement )
112120 target_link_libraries (test .parallel_scheduler_replacement
113121 PUBLIC
114122 STDEXEC::stdexec
@@ -120,6 +128,7 @@ if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
120128endif ()
121129
122130add_executable (test .scratch test_main.cpp test_scratch.cpp )
131+ add_compile_diagnostics (test .scratch )
123132target_link_libraries (test .scratch
124133 PUBLIC
125134 STDEXEC::stdexec
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ set_source_files_properties(test_any_sender.cpp
6868 COMPILE_FLAGS $<$<CXX_COMPILER_ID :MSVC >:/bigobj >)
6969
7070add_executable (test .exec ${exec_test_sources} )
71+ add_compile_diagnostics (test .exec )
7172target_link_libraries (test .exec
7273 PUBLIC
7374 STDEXEC::stdexec
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ namespace
5656 -> ex::completion_signatures_of_t<ex::__child_of<std::remove_cvref_t<Sender>>, Env...>
5757 {
5858 return {};
59- };
59+ }
6060 };
6161
6262 struct counting_resource : std::pmr::memory_resource
You can’t perform that action at this time.
0 commit comments