diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bede8f33..de206595 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -5,29 +5,7 @@ name: Linux Build on: push: - branches: ["main"] - paths: - - "include/**" - - "src/**" - - "tests/**" - - "examples/**" - - "cmake/**" - - "Makefile" - - "CMakePresets.json" - - "CMakeLists.txt" - - ".github/workflows/linux.yml" pull_request: - branches: ["main"] - paths: - - "include/**" - - "src/**" - - "tests/**" - - "examples/**" - - "cmake/**" - - "Makefile" - - "CMakePresets.json" - - "CMakeLists.txt" - - ".github/workflows/linux.yml" jobs: build: @@ -38,7 +16,8 @@ jobs: matrix: # TODO: sanitizer: [debug, release, asan, usan, tsan, lsan, msan] preset: [debug, release] - compiler: [g++-14, clang++-19] + # TODO: compiler: [g++-15, clang++-19] + compiler: [clang++-19] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d4de55eb..55d2f907 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -5,29 +5,7 @@ name: Macos Build on: push: - branches: ["main"] - paths: - - "include/**" - - "src/**" - - "tests/**" - - "examples/**" - - "cmake/**" - - "Makefile" - - "CMakePresets.json" - - "CMakeLists.txt" - - ".github/workflows/macos.yml" pull_request: - branches: ["main"] - paths: - - "include/**" - - "src/**" - - "tests/**" - - "examples/**" - - "cmake/**" - - "Makefile" - - "CMakePresets.json" - - "CMakeLists.txt" - - ".github/workflows/macos.yml" jobs: build: @@ -37,8 +15,8 @@ jobs: matrix: preset: [debug, release] - # TODO: compiler: [g++, clang++-19] - compiler: [g++, clang++-18] + # TODO: compiler: [g++-15, clang++-19] + compiler: [clang++-19] steps: - uses: actions/checkout@v4 @@ -47,9 +25,6 @@ jobs: # if: startsWith(matrix.compiler, 'clang') uses: aminya/setup-cpp@v1 with: - # TODO: compiler: llvm-19 - # clangtidy: true - # cmake: true ninja: true - name: Install llvm-19 @@ -57,13 +32,13 @@ jobs: run: | brew install llvm@19 || echo ignored - - name: macos clang++-18 ${{ matrix.preset }} + - name: macos clang++-19 ${{ matrix.preset }} if: startsWith(matrix.compiler, 'clang') - run: CXX=$(brew --prefix llvm@18)/bin/clang++ cmake --workflow --preset ${{ matrix.preset }} + run: CXX=$(brew --prefix llvm@19)/bin/clang++ cmake --workflow --preset ${{ matrix.preset }} - - name: macos clang++-18 sanitizer + - name: macos clang++-19 sanitizer if: startsWith(matrix.compiler, 'clang') && startsWith(matrix.preset, 'debug') - run: CXX=$(brew --prefix llvm@18)/bin/clang++ make all + run: CXX=$(brew --prefix llvm@19)/bin/clang++ make all - name: macos g++ ${{ matrix.preset }} if: startsWith(matrix.compiler, 'g++') diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3474fcd2..0f9506dd 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,27 +5,7 @@ name: Windows Build on: push: - branches: ["main"] - paths: - - "include/**" - - "src/**" - - "tests/**" - - "examples/**" - - "cmake/**" - - "CMakePresets.json" - - "CMakeLists.txt" - - ".github/workflows/windows.yml" pull_request: - branches: ["main"] - paths: - - "include/**" - - "src/**" - - "tests/**" - - "examples/**" - - "cmake/**" - - "CMakePresets.json" - - "CMakeLists.txt" - - ".github/workflows/windows.yml" jobs: build: diff --git a/CMakeLists.txt b/CMakeLists.txt index c6874da7..84149c09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,14 +3,18 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # cmake-format: on -cmake_minimum_required(VERSION 3.25...3.31) +cmake_minimum_required(VERSION 3.30...3.31) -project(beman_execution26 VERSION 0.0.1 LANGUAGES CXX) +project(beman_execution26 VERSION 0.1.0 LANGUAGES CXX) if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "In-source builds are not allowed!") endif() +# Note that scanning is only performed if C++20 or higher is enabled for the target. Scanning for modules in the target's +# sources belonging to file sets of type CXX_MODULES is always performed. +# not needed: set(CMAKE_CXX_SCAN_FOR_MODULES ON) + set(TARGET_NAME execution26) set(TARGET_NAMESPACE beman) # FIXME: not used in install(EXPORT ...) CK? set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME}) @@ -19,6 +23,9 @@ set(TARGET_ALIAS ${TARGET_LIBRARY}::${TARGET_LIBRARY}) set(TARGET_PACKAGE_NAME ${PROJECT_NAME}-config) set(TARGETS_EXPORT_NAME ${PROJECT_NAME}-targets) +# This variable is a special case of the more-general CMAKE__POSTFIX variable for the DEBUG configuration. +set(CMAKE_DEBUG_POSTFIX D) + include(GNUInstallDirs) set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) @@ -55,7 +62,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug) ENABLE_SANITIZER_POINTER_COMPARE ENABLE_SANITIZER_POINTER_SUBTRACT ENABLE_CONTROL_FLOW_PROTECTION - ENABLE_STACK_PROTECTION + # XXX ENABLE_STACK_PROTECTION ENABLE_OVERFLOW_PROTECTION # ENABLE_ELF_PROTECTION # ENABLE_RUNTIME_SYMBOLS_RESOLUTION @@ -85,7 +92,7 @@ include(CMakePackageConfigHelpers) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PACKAGE_NAME}-version.cmake VERSION ${CMAKE_PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion + COMPATIBILITY SameMajorVersion ) configure_package_config_file( diff --git a/cmake/CMakeGenericPresets.json b/cmake/CMakeGenericPresets.json index 7014512d..44fd4775 100644 --- a/cmake/CMakeGenericPresets.json +++ b/cmake/CMakeGenericPresets.json @@ -12,7 +12,7 @@ "type": "path", "value": "${sourceDir}/stagedir" }, - "CMAKE_CXX_EXTENSIONS": false, + "CMAKE_CXX_EXTENSIONS": true, "CMAKE_CXX_STANDARD": "23", "CMAKE_CXX_STANDARD_REQUIRED": true, "CMAKE_EXPORT_COMPILE_COMMANDS": true, diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 847e50af..e47e4f0e 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -6,6 +6,7 @@ list( APPEND EXAMPLES + modules playground sender-demo when_all-cancel diff --git a/examples/modules.cpp b/examples/modules.cpp new file mode 100644 index 00000000..c76e60b2 --- /dev/null +++ b/examples/modules.cpp @@ -0,0 +1,20 @@ +// examples/modules.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +// import std; +#include +#include +#if __cpp_modules < 201907L +#include +#else +import beman_execution26; +#endif + +namespace ex = beman::execution26; + +int main() { + auto [result] = ex::sync_wait(ex::when_all(ex::just(std::string("hello, ")), ex::just(std::string("world"))) | + ex::then([](const auto& s1, const auto& s2) { return s1 + s2; })) + .value_or(std::tuple(std::string("oops"))); + std::cout << "result='" << result << "'\n"; +} diff --git a/include/beman/execution26/execution.hpp b/include/beman/execution26/execution.hpp index b0837407..cff98751 100644 --- a/include/beman/execution26/execution.hpp +++ b/include/beman/execution26/execution.hpp @@ -20,6 +20,7 @@ #include #include #include +//-dk:TODO #include #include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include #include #include diff --git a/src/beman/execution26/CMakeLists.txt b/src/beman/execution26/CMakeLists.txt index 6edb36a2..9380b125 100644 --- a/src/beman/execution26/CMakeLists.txt +++ b/src/beman/execution26/CMakeLists.txt @@ -7,7 +7,8 @@ add_library(${TARGET_LIBRARY} STATIC) add_library(${TARGET_ALIAS} ALIAS ${TARGET_LIBRARY}) if(CMAKE_BUILD_TYPE STREQUAL Debug) - target_link_libraries(${TARGET_LIBRARY} PUBLIC $) + # NOTE: Sanitizer or gcov is not possible for CXX_MODULES! CK + # XXX target_link_libraries(${TARGET_LIBRARY} PUBLIC $) target_link_libraries(${TARGET_LIBRARY} PUBLIC $) endif() @@ -16,7 +17,6 @@ cmake_print_variables(TARGET_ALIAS TARGET_LIBRARY TARGET_PREFIX PROJECT_SOURCE_D target_sources( ${TARGET_LIBRARY} - PRIVATE execution.cpp PUBLIC FILE_SET ${TARGET_LIBRARY}_public_headers TYPE @@ -188,18 +188,27 @@ target_compile_features(${TARGET_LIBRARY} PUBLIC "$<$>:cxx_std_23>" ) +target_sources( + ${TARGET_LIBRARY} + PUBLIC FILE_SET ${TARGET_LIBRARY}_modules + TYPE CXX_MODULES FILES execution.cppm +) + install( TARGETS ${TARGET_LIBRARY} - EXPORT ${TARGETS_EXPORT_NAME}1 - ARCHIVE DESTINATION lib/$ + EXPORT ${TARGETS_EXPORT_NAME} + ARCHIVE # XXX DESTINATION lib/$ + FILE_SET ${TARGET_LIBRARY}_modules + # There's currently no convention for this location + DESTINATION ${INSTALL_CONFIGDIR}/src FILE_SET ${TARGET_LIBRARY}_public_headers FILE_SET ${TARGET_LIBRARY}_detail_headers ) -# cmake-format: on install( - EXPORT ${TARGETS_EXPORT_NAME}1 - FILE ${TARGETS_EXPORT_NAME}.cmake + EXPORT ${TARGETS_EXPORT_NAME} DESTINATION "${INSTALL_CONFIGDIR}" + CXX_MODULES_DIRECTORY . NAMESPACE ${TARGET_LIBRARY}:: ) +# cmake-format: on diff --git a/src/beman/execution26/execution.cpp b/src/beman/execution26/execution.cpp deleted file mode 100644 index 14b64107..00000000 --- a/src/beman/execution26/execution.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// src/beman/execution26/execution.cpp -*-C++-*- -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// ---------------------------------------------------------------------------- - -namespace beman::execution26 { -int version{000}; -} \ No newline at end of file diff --git a/src/beman/execution26/execution.cppm b/src/beman/execution26/execution.cppm new file mode 100644 index 00000000..c1390eb9 --- /dev/null +++ b/src/beman/execution26/execution.cppm @@ -0,0 +1,222 @@ +// src/beman/execution26/execution.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// ---------------------------------------------------------------------------- + +module; +#include +#include +#include +#include + +export module beman_execution26; + +namespace beman::execution26 { +export int version(0); +// [stoptoken.concepts], stop token concepts +export using ::beman::execution26::stoppable_token; +export using ::beman::execution26::unstoppable_token; + +// [stoptoken], class stop_token +export using ::beman::execution26::stop_token; + +// [stopsource], class stop_source +export using ::beman::execution26::stop_source; + +// no-shared-stop-state indicator +//-dk:TODO export using ::beman::execution26::no_stop_state_t; + +// [stopcallback], class template stop_callback +export using ::beman::execution26::stop_callback; + +// [stoptoken.never], class never_stop_token +export using ::beman::execution26::never_stop_token; + +// [stoptoken.inplace], class inplace_stop_token +export using ::beman::execution26::inplace_stop_token; + +// [stopsource.inplace], class inplace_stop_source +export using ::beman::execution26::inplace_stop_source; + +// [stopcallback.inplace], class template inplace_stop_callback +export using ::beman::execution26::inplace_stop_callback; +export using ::beman::execution26::stop_callback_for_t; + +#if 0 + //-dk:TODO enable the execution policies + export using ::std::is_execution_policy; + export using ::std::is_execution_policy_v; + + export using ::std::execution::sequenced_policy; + export using ::std::execution::parallel_policy; + export using ::std::execution::parallel_unsequenced_policy; + export using ::std::execution::unsequenced_policy; + + export using ::std::execution::seq; + export using ::std::execution::par; + export using ::std::execution::par_unseq; + export using ::std::execution::unseq; +#endif + +// [exec.queries], queries +export using ::beman::execution26::forwarding_query_t; +export using ::beman::execution26::get_allocator_t; +export using ::beman::execution26::get_stop_token_t; + +export using ::beman::execution26::forwarding_query; +export using ::beman::execution26::get_allocator; +export using ::beman::execution26::get_stop_token; + +export using ::beman::execution26::stop_token_of_t; + +export using ::beman::execution26::get_domain_t; +export using ::beman::execution26::get_scheduler_t; +export using ::beman::execution26::get_delegation_scheduler_t; +//-dk:TODO export using ::beman::execution26::get_forward_progress_guarantee_t; +export using ::beman::execution26::get_completion_scheduler_t; + +export using ::beman::execution26::get_domain; +export using ::beman::execution26::get_scheduler; +export using ::beman::execution26::get_delegation_scheduler; +//-dk:TODO export using ::beman::execution26::forward_progress_guarantee; +//-dk:TODO export using ::beman::execution26::get_forward_progress_guarantee; +export using ::beman::execution26::get_completion_scheduler; + +export using ::beman::execution26::empty_env; +export using ::beman::execution26::get_env_t; +export using ::beman::execution26::get_env; + +export using ::beman::execution26::env_of_t; + +// [exec.domain.default], execution_domains +export using ::beman::execution26::default_domain; + +// [exec.sched], schedulers +export using ::beman::execution26::scheduler_t; +export using ::beman::execution26::scheduler; + +// [exec.recv], receivers +export using ::beman::execution26::receiver_t; +export using ::beman::execution26::receiver; +export using ::beman::execution26::receiver_of; + +export using ::beman::execution26::set_value_t; +export using ::beman::execution26::set_error_t; +export using ::beman::execution26::set_stopped_t; + +export using ::beman::execution26::set_value; +export using ::beman::execution26::set_error; +export using ::beman::execution26::set_stopped; + +// [exec.opstate], operation states +export using ::beman::execution26::operation_state_t; +export using ::beman::execution26::operation_state; +export using ::beman::execution26::start_t; +export using ::beman::execution26::start; + +// [exec.snd], senders +export using ::beman::execution26::sender_t; +export using ::beman::execution26::sender; +export using ::beman::execution26::sender_in; +//-dk:TODO export using ::beman::execution26::sender_to; + +// [exec.getcomplsigs], completion signatures +export using ::beman::execution26::get_completion_signatures_t; +export using ::beman::execution26::get_completion_signatures; +export using ::beman::execution26::completion_signatures_of_t; +export using ::beman::execution26::value_types_of_t; +export using ::beman::execution26::error_types_of_t; +export using ::beman::execution26::sends_stopped; +export using ::beman::execution26::tag_of_t; + +// [exec.snd.transform], sender transformations +export using ::beman::execution26::transform_sender; + +// [exec.snd.transform.env], environment transformations +//-dk:TODO export using ::beman::execution26::transform_env; + +// [exec.snd.apply], sender algorithm application +export using ::beman::execution26::apply_sender; + +// [exec.connect], the connect sender algorithm +export using ::beman::execution26::connect_t; +export using ::beman::execution26::connect; +export using ::beman::execution26::connect_result_t; + +// [exec.factories], sender factories +export using ::beman::execution26::just_t; +export using ::beman::execution26::just_error_t; +export using ::beman::execution26::just_stopped_t; +export using ::beman::execution26::schedule_t; + +export using ::beman::execution26::just; +export using ::beman::execution26::just_error; +export using ::beman::execution26::just_stopped; +export using ::beman::execution26::schedule; +export using ::beman::execution26::read_env; + +export using ::beman::execution26::schedule_result_t; + +// [exec.adapt], sender adaptors +export using ::beman::execution26::sender_adaptor_closure; + +export using ::beman::execution26::starts_on_t; +export using ::beman::execution26::continues_on_t; +//-dk:TODO export using ::beman::execution26::on_t; +export using ::beman::execution26::schedule_from_t; +export using ::beman::execution26::then_t; +export using ::beman::execution26::upon_error_t; +export using ::beman::execution26::upon_stopped_t; +export using ::beman::execution26::let_value_t; +export using ::beman::execution26::let_error_t; +export using ::beman::execution26::let_stopped_t; +//-dk:TODO export using ::beman::execution26::bulk_t; +//-dk:TODO export using ::beman::execution26::split_t; +export using ::beman::execution26::when_all_t; +export using ::beman::execution26::when_all_with_variant_t; +export using ::beman::execution26::into_variant_t; +//-dk:TODO export using ::beman::execution26::stopped_as_optional_t; +//-dk:TODO export using ::beman::execution26::stopped_as_error_t; + +export using ::beman::execution26::starts_on; +export using ::beman::execution26::continues_on; +//-dk:TODO export using ::beman::execution26::on; +export using ::beman::execution26::schedule_from; +export using ::beman::execution26::then; +export using ::beman::execution26::upon_error; +export using ::beman::execution26::upon_stopped; +export using ::beman::execution26::let_value; +export using ::beman::execution26::let_error; +export using ::beman::execution26::let_stopped; +//-dk:TODO export using ::beman::execution26::bulk; +//-dk:TODO export using ::beman::execution26::split; +export using ::beman::execution26::when_all; +export using ::beman::execution26::when_all_with_variant; +export using ::beman::execution26::into_variant; +//-dk:TODO export using ::beman::execution26::stopped_as_optional; +//-dk:TODO export using ::beman::execution26::stopped_as_error; + +// [exec.util.cmplsig] +export using ::beman::execution26::completion_signatures; + +// [exec.util.cmplsig.trans] +//-dk:TODO export using ::beman::execution26::transform_completion_signatures; +//-dk:TODO export using ::beman::execution26::transform_completion_signatures_of; + +// [exec.run.loop], run_loop +export using ::beman::execution26::run_loop; + +// [exec.consumers], consumers +export using ::beman::execution26::sync_wait_t; +//-dk:TODO export using ::beman::execution26::sync_wait_with_variant_t; + +export using ::beman::execution26::sync_wait; +//-dk:TODO export using ::beman::execution26::sync_wait_with_variant; + +// [exec.as.awaitable] +//-dk:TODO export using ::beman::execution26::as_awaitable_t; +//-dk:TODO export using ::beman::execution26::as_awaitable; + +// [exec.with.awaitable.senders] +//-dk:TODO export using ::beman::execution26::with_awaitable_senders; + +} // namespace beman::execution26 diff --git a/tests/beman/execution26/CMakeLists.txt b/tests/beman/execution26/CMakeLists.txt index 664c34da..8c8bcfce 100644 --- a/tests/beman/execution26/CMakeLists.txt +++ b/tests/beman/execution26/CMakeLists.txt @@ -1,6 +1,6 @@ # src/beman/execution26/tests/CMakeLists.txt # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.25...3.31) +cmake_minimum_required(VERSION 3.30...3.31) project(beman_execution26_tests LANGUAGES CXX) @@ -8,9 +8,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "In-source builds are not allowed!") endif() +list(APPEND execution_tests execution-module.test stop-token-module.test) + list( APPEND - execution_tests + xexecution_tests notify.test exec-scounting.test exec-awaitable.test @@ -106,9 +108,10 @@ endif() if(PROJECT_IS_TOP_LEVEL) enable_testing() - find_package(beman_execution26 0.0.1 EXACT QUIET) + find_package(beman_execution26 0.1.0 EXACT QUIET) if(beman_execution26_FOUND) - set(execution_tests exec-awaitable.test) # only one sample to save time! CK + set(execution_tests exec-awaitable.test) # only some samples to save time! CK + list(APPEND execution_tests execution-module.test) else() add_subdirectory(../../.. beman_execution26) @@ -127,24 +130,23 @@ foreach(test ${execution_tests}) endforeach() if(NOT PROJECT_IS_TOP_LEVEL) - # test if the targets are findable from the build directory + # test if the targets are findable from the install directory # cmake-format: off - add_test(NAME find-package-test - COMMAND ${CMAKE_CTEST_COMMAND} - # --verbose - --output-on-failure - -C $ - --build-and-test - "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_BINARY_DIR}/find-package-test" - --build-generator ${CMAKE_GENERATOR} - --build-makeprogram ${CMAKE_MAKE_PROGRAM} - --build-options - "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" - "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}" - "-DCMAKE_BUILD_TYPE=$" - "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" - # TODO(CK): Needed too? "--config $" - ) - # cmake-format: on +add_test(NAME find-package-test + COMMAND ${CMAKE_CTEST_COMMAND} + # --verbose + --output-on-failure + -C $ + --build-and-test + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/find-package-test" + --build-generator ${CMAKE_GENERATOR} + --build-makeprogram ${CMAKE_MAKE_PROGRAM} + --build-options + "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" + "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}" + "-DCMAKE_BUILD_TYPE=$" + "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" +) +# cmake-format: on endif() diff --git a/tests/beman/execution26/execution-module.test.cpp b/tests/beman/execution26/execution-module.test.cpp new file mode 100644 index 00000000..d7604a7a --- /dev/null +++ b/tests/beman/execution26/execution-module.test.cpp @@ -0,0 +1,194 @@ +// tests/beman/execution26/execution-module.test.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#if 0 +#include +#else +import beman_execution26; +#endif + +// ---------------------------------------------------------------------------- + +namespace { +// [exec.getcomplsigs], completion signatures +template +using value_types_of_t = test_stdex::value_types_of_t; +template +using error_types_of_t = test_stdex::error_types_of_t; +} // namespace + +TEST(execution_modules) { +#if 0 + //-dk:TOD enable execution policies + test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + + test::use(test_std::seq); + test::use(test_std::par); + test::use(test_std::par_unseq); + test::use(test_std::unseq); +#endif + // [exec.queries], queries + test::use_type(); + test::use_type(); + test::use_type(); + + test::use_type(); + test::use_type(); + test::use_type(); + + test::use_template(); + + test::use_type(); + test::use_type(); + test::use_type(); + //-dk:TODO test::use_type(); + test::use_template(); + + test::use(test_stdex::get_domain); + test::use(test_stdex::get_scheduler); + test::use(test_stdex::get_delegation_scheduler); + //-dk:TODO test::use_type(); + //-dk:TODO test::use(test_stdex::get_forward_progress_guarantee); + test::use(test_stdex::get_completion_scheduler); + + test::use_type(); + test::use_type(); + test::use(test_stdex::get_env); + test::use_template(); + + // [exec.domain.default], execution_domains + test::use_type(); + + // [exec.sched], schedulers + test::use_type(); + static_assert(not test_stdex::scheduler); + + // [exec.recv], receivers + test::use_type(); + static_assert(not test_stdex::receiver); + static_assert(not test_stdex::receiver_of>); + + test::use_type(); + test::use_type(); + test::use_type(); + + test::use(test_stdex::set_value); + test::use(test_stdex::set_error); + test::use(test_stdex::set_stopped); + + // [exec.opstate], operation states + test::use_type(); + static_assert(not test_stdex::operation_state); + test::use_type(); + test::use(test_stdex::start); + + // [exec.snd], senders + test::use_type(); + static_assert(not test_stdex::sender); + static_assert(not test_stdex::sender_in); + //-dk:TODO static_assert(not test_stdex::sender_to); + + // [exec.getcomplsigs], completion signatures + test::use_type(); + test::use(test_stdex::get_completion_signatures); + + test::use_template(); + static_assert(not test_stdex::sends_stopped); + test::use_template(); + + // [exec.snd.transform], sender transformations + test_stdex::transform_sender(test_stdex::default_domain{}, test_stdex::just()); + + // [exec.snd.transform.env], environment transformations + //-dk:TODO test_stdex::transform_env(test_stdex::default_domain{}, test_stdex::just(), test_stdex::empty_env{}); + + // [exec.snd.apply], sender algorithm application + //-dk:TODO test_stdex::apply_sender(test_stdex::default_domain{}, test_stdex::just_t{}, test_stdex::just()); + + // [exec.connect], the connect sender algorithm + test::use_type(); + test::use(test_stdex::connect); + test::use_template(); + + // [exec.factories], sender factories + test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + + test::use(test_stdex::just); + test::use(test_stdex::just_error); + test::use(test_stdex::just_stopped); + test::use(test_stdex::schedule); + test::use(test_stdex::read_env); + + test::use_template(); + + // [exec.adapt], sender adaptors + test::use_template(); + + test::use_type(); + test::use_type(); + //-dk:TODO test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + //-dk:TODO test::use_type(); + //-dk:TODO test::use_type(); + test::use_type(); + test::use_type(); + test::use_type(); + //-dk:TODO test::use_type(); + //-dk:TODO test::use_type(); + + test::use(test_stdex::starts_on); + test::use(test_stdex::continues_on); + //-dk:TODO test::use(test_stdex::on); + test::use(test_stdex::schedule_from); + test::use(test_stdex::then); + test::use(test_stdex::upon_error); + test::use(test_stdex::upon_stopped); + test::use(test_stdex::let_value); + test::use(test_stdex::let_error); + test::use(test_stdex::let_stopped); + //-dk:TODO test::use(test_stdex::bulk); + //-dk:TODO test::use(test_stdex::split); + test::use(test_stdex::when_all); + test::use(test_stdex::when_all_with_variant); + test::use(test_stdex::into_variant); + //-dk:TODO test::use(test_stdex::stopped_as_optional); + //-dk:TODO test::use(test_stdex::stopped_as_error); + + // [exec.util.cmplsig] + test::use_template(); + + // [exec.util.cmplsig.trans] + //-dk:TODO template using transform_completion_signatures = + // test_stdex::transform_completion_signatures; -dk:TODO template using + // transform_completion_signatures_of = test_stdex::transform_completion_signatures_of; + + // [exec.run.loop], run_loop + test::use_type(); + + // [exec.consumers], consumers + test::use_type(); + //-dk:TODO test::use_type(); + + test::use(test_std_this_thread::sync_wait); + //-dk:TODO test::use(test_std_this_thread::sync_wait_with_variant); + + // [exec.as.awaitable] + //-dk:TODO test::use_type(); + //-dk:TODO test::use(test_stdex::as_awaitable); + + // [exec.with.awaitable.senders] + //-dk:TODO test::use_template(); +} diff --git a/tests/beman/execution26/include/test/execution.hpp b/tests/beman/execution26/include/test/execution.hpp index aa87ee3d..4c6c08ed 100644 --- a/tests/beman/execution26/include/test/execution.hpp +++ b/tests/beman/execution26/include/test/execution.hpp @@ -4,7 +4,7 @@ #ifndef INCLUDED_TEST_EXECUTION #define INCLUDED_TEST_EXECUTION -#include +// #include #include #include @@ -16,7 +16,11 @@ namespace beman::execution26 {} +namespace beman::execution26::detail {} + namespace test_std = ::beman::execution26; +namespace test_stdex = ::beman::execution26; +namespace test_std_this_thread = ::beman::execution26; namespace test_detail = ::beman::execution26::detail; namespace test { @@ -27,6 +31,10 @@ auto check_type(T1&&) { static_assert(std::same_as); } +template