From 797854d774f42a5071bb2f257a9f4653d7f5cf0c Mon Sep 17 00:00:00 2001 From: LSUDOKO Date: Sun, 19 Apr 2026 14:13:52 +0530 Subject: [PATCH 01/19] Re-enable external build tests with C++ modules --- tests/unit/build/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/unit/build/CMakeLists.txt b/tests/unit/build/CMakeLists.txt index 7387f4ba7f5..40d5c716948 100644 --- a/tests/unit/build/CMakeLists.txt +++ b/tests/unit/build/CMakeLists.txt @@ -10,12 +10,6 @@ if(NOT HPX_WITH_TESTS_EXTERNAL_BUILD) return() endif() -# If C++ modules are enabled, exit now (we don't know yet how to setup a -# dependent HPX project to use the generated BMIs). -if(HPX_WITH_CXX_MODULES) - return() -endif() - # Try building an external cmake based project ... function( create_cmake_test From cdff10ba8256ee8e9197ce5d86623ee7d7556bb7 Mon Sep 17 00:00:00 2001 From: LSUDOKO Date: Sat, 25 Apr 2026 18:41:33 +0530 Subject: [PATCH 02/19] build: fix C++ modules BMI export and re-enable external build tests --- cmake/HPX_CXXModules.cmake | 46 ----- cmake/HPX_CollectStdHeaders.cmake | 2 + cmake/templates/hpx.ixx.in | 12 +- .../algorithms/traits/pointer_category.hpp | 24 +-- .../hpx/algorithms/traits/projected.hpp | 31 ++- .../hpx/algorithms/traits/projected_range.hpp | 9 +- .../traits/segmented_iterator_traits.hpp | 3 +- .../include/hpx/parallel/algorithms/copy.hpp | 6 +- .../parallel/algorithms/detail/dispatch.hpp | 14 +- .../hpx/parallel/algorithms/for_each.hpp | 12 +- .../hpx/parallel/algorithms/for_loop.hpp | 31 ++- .../algorithms/for_loop_induction.hpp | 6 +- .../include/hpx/parallel/algorithms/move.hpp | 6 +- .../hpx/parallel/algorithms/partition.hpp | 6 +- .../hpx/parallel/algorithms/reduce_by_key.hpp | 3 +- .../hpx/parallel/algorithms/transform.hpp | 33 ++-- .../container_algorithms/contains.hpp | 6 +- .../hpx/parallel/datapar/iterator_helpers.hpp | 6 +- .../include/hpx/parallel/datapar/loop.hpp | 6 +- .../hpx/parallel/datapar/zip_iterator.hpp | 12 +- .../hpx/parallel/util/cancellation_token.hpp | 3 +- .../hpx/parallel/util/compare_projected.hpp | 20 +- .../parallel/util/detail/algorithm_result.hpp | 24 +-- .../util/detail/chunk_size_iterator.hpp | 21 +-- .../util/detail/handle_local_exceptions.hpp | 3 +- .../util/detail/handle_remote_exceptions.hpp | 6 +- .../util/detail/partitioner_iteration.hpp | 9 +- .../util/detail/select_partitioner.hpp | 3 +- .../hpx/parallel/util/detail/sender_util.hpp | 3 +- .../hpx/parallel/util/invoke_projected.hpp | 6 +- .../include/hpx/parallel/util/loop.hpp | 3 +- .../include/hpx/parallel/util/prefetching.hpp | 6 +- .../include/hpx/parallel/util/transfer.hpp | 18 +- .../algorithms/tests/performance/utils.hpp | 12 +- .../tests/unit/algorithms/test_utils.hpp | 12 +- .../unit/container_algorithms/test_utils.hpp | 9 +- .../allocator_support/traits/is_allocator.hpp | 3 +- .../include/hpx/async_base/launch_policy.hpp | 3 +- .../hpx/async_base/scheduling_properties.hpp | 30 +-- .../hpx/async_combinators/wait_all.hpp | 18 +- .../hpx/async_combinators/when_all.hpp | 3 +- .../hpx/async_cuda/cublas_executor.hpp | 9 +- .../include/hpx/async_cuda/cuda_executor.hpp | 12 +- .../include/hpx/async_cuda/cuda_future.hpp | 6 +- .../hpx/async_cuda/transform_stream.hpp | 6 +- .../include/hpx/async_mpi/transform_mpi.hpp | 3 +- .../include/hpx/async_sycl/sycl_executor.hpp | 8 +- .../hpx/checkpoint_base/checkpoint_data.hpp | 3 +- .../compute_local/detail/get_proxy_type.hpp | 3 +- .../hpx/compute_local/host/block_executor.hpp | 18 +- .../host/block_fork_join_executor.hpp | 6 +- .../host/numa_binding_allocator.hpp | 3 +- .../host/traits/access_target.hpp | 6 +- .../compute_local/traits/allocator_traits.hpp | 12 +- .../include/hpx/concepts/has_member_xxx.hpp | 4 +- .../concepts/include/hpx/concepts/has_xxx.hpp | 2 +- .../hpx/concurrency/cache_line_data.hpp | 6 +- .../hpx/concurrency/concurrentqueue.hpp | 25 ++- .../detail/contiguous_index_queue.hpp | 6 +- .../concurrency/detail/tagged_ptr_pair.hpp | 6 +- .../include/hpx/coroutines/thread_id_type.hpp | 6 +- .../include/hpx/datastructures/any.hpp | 64 +++---- .../hpx/datastructures/detail/flat_map.hpp | 3 +- .../hpx/datastructures/detail/flat_set.hpp | 3 +- .../hpx/datastructures/detail/variant.hpp | 120 ++++-------- .../hpx/datastructures/member_pack.hpp | 6 +- .../serialization/serializable_any.hpp | 10 +- .../datastructures/serialization/tuple.hpp | 21 +-- .../datastructures/traits/is_tuple_like.hpp | 3 +- .../traits/supports_streaming_with_any.hpp | 3 +- .../include/hpx/datastructures/tuple.hpp | 83 +++----- .../debugging/include/hpx/debugging/print.hpp | 12 +- libs/core/errors/include/hpx/errors/error.hpp | 6 +- .../hpx/execution/algorithms/as_sender.hpp | 12 +- .../algorithms/detail/is_negative.hpp | 6 +- .../algorithms/detail/partial_algorithm.hpp | 5 +- .../algorithms/detail/predicates.hpp | 9 +- .../algorithms/detail/single_result.hpp | 28 +-- .../include/hpx/execution/algorithms/just.hpp | 5 +- .../hpx/execution/algorithms/keep_future.hpp | 6 +- .../hpx/execution/algorithms/let_value.hpp | 3 +- .../hpx/execution/algorithms/make_future.hpp | 13 +- .../hpx/execution/algorithms/sync_wait.hpp | 8 +- .../hpx/execution/algorithms/when_all.hpp | 3 +- .../execution/algorithms/when_all_vector.hpp | 6 +- .../detail/async_launch_policy_dispatch.hpp | 15 +- .../hpx/execution/detail/future_exec.hpp | 9 +- .../execution/detail/post_policy_dispatch.hpp | 12 +- .../detail/sync_launch_policy_dispatch.hpp | 9 +- .../executors/adaptive_static_chunk_size.hpp | 3 +- .../execution/executors/auto_chunk_size.hpp | 3 +- .../executors/collect_chunking_parameters.hpp | 3 +- .../executors/default_parameters.hpp | 3 +- .../executors/dynamic_chunk_size.hpp | 3 +- .../hpx/execution/executors/execution.hpp | 54 ++---- .../executors/execution_parameters.hpp | 72 +++---- .../executors/execution_parameters_fwd.hpp | 6 +- .../executors/fused_bulk_execute.hpp | 12 +- .../execution/executors/guided_chunk_size.hpp | 3 +- .../hpx/execution/executors/num_cores.hpp | 3 +- .../executors/persistent_auto_chunk_size.hpp | 3 +- .../executors/polymorphic_executor.hpp | 33 ++-- .../execution/executors/rebind_executor.hpp | 12 +- .../executors/rebind_executor_parameters.hpp | 18 +- .../detail/eve/vector_pack_alignment_size.hpp | 18 +- .../traits/detail/eve/vector_pack_type.hpp | 9 +- .../simd/vector_pack_alignment_size.hpp | 18 +- .../traits/detail/simd/vector_pack_type.hpp | 9 +- .../detail/vc/vector_pack_alignment_size.hpp | 55 ++---- .../detail/vc/vector_pack_load_store.hpp | 40 ++-- .../traits/detail/vc/vector_pack_type.hpp | 22 +-- .../hpx/execution/traits/executor_traits.hpp | 23 +-- .../traits/future_then_result_exec.hpp | 5 +- .../execution/traits/is_execution_policy.hpp | 3 +- .../traits/vector_pack_alignment_size.hpp | 6 +- .../hpx/execution/traits/vector_pack_type.hpp | 3 +- .../include/hpx/experimental/emulate_simd.hpp | 12 +- libs/core/execution/tests/unit/test_utils.hpp | 9 +- .../include/hpx/execution_base/any_sender.hpp | 6 +- .../execution_base/completion_scheduler.hpp | 8 +- .../execution_base/completion_signatures.hpp | 37 ++-- .../include/hpx/execution_base/get_env.hpp | 3 +- .../hpx/execution_base/operation_state.hpp | 9 +- .../include/hpx/execution_base/receiver.hpp | 39 ++-- .../include/hpx/execution_base/sender.hpp | 6 +- .../traits/is_executor_parameters.hpp | 21 +-- .../tests/include/coroutine_task.hpp | 15 +- .../hpx/executors/annotating_executor.hpp | 18 +- .../executors/include/hpx/executors/async.hpp | 9 +- .../include/hpx/executors/dataflow.hpp | 20 +- .../executors/datapar/execution_policy.hpp | 42 ++--- .../datapar/execution_policy_mappings.hpp | 6 +- .../include/hpx/executors/exception_list.hpp | 15 +- .../include/hpx/executors/execute_on.hpp | 9 +- .../hpx/executors/execution_policy.hpp | 105 ++++------- .../executors/execution_policy_mappings.hpp | 18 +- .../executors/explicit_scheduler_executor.hpp | 18 +- .../hpx/executors/fork_join_executor.hpp | 6 +- .../hpx/executors/guided_pool_executor.hpp | 15 +- .../include/hpx/executors/likwid_executor.hpp | 15 +- .../hpx/executors/limiting_executor.hpp | 21 +-- .../hpx/executors/parallel_executor.hpp | 21 +-- .../executors/include/hpx/executors/post.hpp | 3 +- .../restricted_thread_pool_executor.hpp | 12 +- .../hpx/executors/scheduler_executor.hpp | 15 +- .../hpx/executors/sequenced_executor.hpp | 15 +- .../hpx/executors/std_execution_policy.hpp | 24 +-- .../executors/include/hpx/executors/sync.hpp | 9 +- .../hpx/executors/thread_pool_scheduler.hpp | 3 +- libs/core/format/include/hpx/format/api.hpp | 21 +-- .../format/include/hpx/util/from_string.hpp | 6 +- .../format/include/hpx/util/to_string.hpp | 3 +- .../include/hpx/functional/bind.hpp | 38 ++-- .../include/hpx/functional/bind_back.hpp | 15 +- .../include/hpx/functional/bind_front.hpp | 15 +- .../include/hpx/functional/deferred_call.hpp | 12 +- .../hpx/functional/detail/basic_function.hpp | 3 +- .../hpx/functional/detail/runtime_get.hpp | 3 +- .../detail/vtable/callable_vtable.hpp | 3 +- .../detail/vtable/function_vtable.hpp | 6 +- .../include/hpx/functional/first_argument.hpp | 27 +-- .../include/hpx/functional/function.hpp | 12 +- .../include/hpx/functional/function_ref.hpp | 12 +- .../include/hpx/functional/invoke_fused.hpp | 6 +- .../hpx/functional/move_only_function.hpp | 12 +- .../include/hpx/functional/one_shot.hpp | 9 +- .../hpx/functional/reference_wrapper.hpp | 12 +- .../detail/serializable_basic_function.hpp | 3 +- .../traits/get_function_address.hpp | 9 +- .../hpx/functional/traits/is_action.hpp | 3 +- .../functional/traits/is_bind_expression.hpp | 3 +- .../hpx/functional/traits/is_placeholder.hpp | 3 +- .../hpx/futures/detail/future_data.hpp | 9 +- .../futures/include/hpx/futures/future.hpp | 17 +- .../include/hpx/futures/future_fwd.hpp | 6 +- .../include/hpx/futures/futures_factory.hpp | 31 ++- .../include/hpx/futures/packaged_task.hpp | 6 +- .../futures/include/hpx/futures/promise.hpp | 9 +- .../hpx/futures/traits/acquire_future.hpp | 9 +- .../futures/traits/acquire_shared_state.hpp | 12 +- .../traits/detail/future_await_traits.hpp | 12 +- .../futures/traits/detail/future_traits.hpp | 3 +- .../hpx/futures/traits/future_access.hpp | 27 +-- .../hpx/futures/traits/future_then_result.hpp | 3 +- .../hpx/futures/traits/future_traits.hpp | 21 +-- .../hpx/futures/traits/get_remote_result.hpp | 3 +- .../include/hpx/futures/traits/is_future.hpp | 12 +- .../hpx/futures/traits/is_future_range.hpp | 9 +- .../hpx/futures/traits/is_future_tuple.hpp | 3 +- .../futures/traits/promise_local_result.hpp | 3 +- .../futures/traits/promise_remote_result.hpp | 3 +- .../futures/tests/unit/test_allocator.hpp | 3 +- .../include/hpx/iostream/char_traits.hpp | 6 +- .../hpx/iostream/checked_operations.hpp | 12 +- .../iostream/include/hpx/iostream/close.hpp | 15 +- .../detail/adapter/concept_adapter.hpp | 18 +- .../iostream/include/hpx/iostream/flush.hpp | 18 +- .../iostream/include/hpx/iostream/imbue.hpp | 9 +- .../include/hpx/iostream/input_sequence.hpp | 3 +- .../hpx/iostream/optimal_buffer_size.hpp | 9 +- .../include/hpx/iostream/output_sequence.hpp | 3 +- .../iostream/include/hpx/iostream/read.hpp | 15 +- .../iostream/include/hpx/iostream/seek.hpp | 24 +-- .../iostream/include/hpx/iostream/traits.hpp | 3 +- .../iostream/include/hpx/iostream/write.hpp | 15 +- .../iostream/tests/unit/detail/closable.hpp | 39 ++-- .../iostream/tests/unit/detail/filters.hpp | 24 +-- .../iterator_support/counting_iterator.hpp | 5 +- .../hpx/iterator_support/iterator_facade.hpp | 18 +- .../include/hpx/iterator_support/range.hpp | 33 ++-- .../iterator_support/traits/is_iterator.hpp | 27 +-- .../hpx/iterator_support/traits/is_range.hpp | 3 +- .../hpx/iterator_support/zip_iterator.hpp | 42 ++--- .../iterator_support/tests/iterator_tests.hpp | 6 +- .../itt_notify/include/hpx/itt_notify/api.hpp | 4 +- .../include/hpx/lcos_local/channel.hpp | 27 +-- .../include/hpx/lcos_local/receive_buffer.hpp | 3 +- .../detail/register_locks.hpp | 3 +- .../hpx/memory/detail/sp_convertible.hpp | 9 +- .../detail/pack_traversal_async_impl.hpp | 23 +-- .../detail/pack_traversal_impl.hpp | 24 +-- .../hpx/pack_traversal/detail/unwrap_impl.hpp | 12 +- .../pack_traversal_rebind_container.hpp | 15 +- .../include/hpx/plugin/abstract_factory.hpp | 5 +- .../include/hpx/plugin/concrete_factory.hpp | 5 +- .../include/hpx/plugin/plugin_factory.hpp | 10 +- .../include/hpx/program_options/parsers.hpp | 3 +- .../hpx/program_options/value_semantic.hpp | 8 +- .../hpx/resiliency/async_replay_executor.hpp | 3 +- .../resiliency/async_replicate_executor.hpp | 3 +- .../hpx/resiliency/replay_executor.hpp | 6 +- .../hpx/resiliency/replicate_executor.hpp | 10 +- .../hpx/runtime_local/service_executors.hpp | 54 ++---- .../include/hpx/serialization/access.hpp | 3 +- .../include/hpx/serialization/base_object.hpp | 3 +- .../hpx/serialization/boost_variant.hpp | 6 +- .../include/hpx/serialization/complex.hpp | 6 +- .../hpx/serialization/detail/pointer.hpp | 6 +- .../detail/polymorphic_id_factory.hpp | 3 +- .../include/hpx/serialization/detail/vc.hpp | 22 +-- .../include/hpx/serialization/map.hpp | 6 +- .../hpx/serialization/serialize_buffer.hpp | 6 +- .../include/hpx/serialization/std_tuple.hpp | 11 +- .../traits/brace_initializable_traits.hpp | 3 +- .../traits/serialization_access_data.hpp | 3 +- .../include/hpx/serialization/variant.hpp | 6 +- .../hpx/string_util/token_functions.hpp | 6 +- .../hpx/synchronization/async_rw_mutex.hpp | 18 +- .../include/hpx/synchronization/barrier.hpp | 2 +- .../hpx/synchronization/channel_mpsc.hpp | 3 +- .../hpx/synchronization/channel_spsc.hpp | 3 +- .../include/hpx/functional/detail/invoke.hpp | 3 +- .../functional/detail/tag_fallback_invoke.hpp | 6 +- .../functional/detail/tag_priority_invoke.hpp | 6 +- .../include/hpx/functional/invoke_result.hpp | 3 +- .../include/hpx/functional/tag_invoke.hpp | 6 +- .../hpx/functional/traits/is_invocable.hpp | 9 +- .../include/hpx/threading_base/print.hpp | 12 +- .../hpx/threading_base/register_thread.hpp | 5 +- .../hpx/threading_base/thread_description.hpp | 3 +- .../hpx/thrust/detail/algorithm_map.hpp | 177 ++++++------------ .../core/thrust/include/hpx/thrust/policy.hpp | 72 +++---- .../hpx/timed_execution/timed_execution.hpp | 9 +- .../hpx/timed_execution/timed_executors.hpp | 24 +-- .../hpx/topology/scheduling_properties.hpp | 6 +- .../hpx/type_support/base_from_member.hpp | 6 +- .../include/hpx/type_support/decay.hpp | 3 +- .../include/hpx/type_support/equality.hpp | 9 +- .../include/hpx/type_support/generator.hpp | 3 +- .../type_support/is_contiguous_iterator.hpp | 27 +-- .../type_support/is_trivially_relocatable.hpp | 30 +-- .../hpx/type_support/lazy_enable_if.hpp | 3 +- .../include/hpx/type_support/meta.hpp | 15 +- .../include/hpx/type_support/pack.hpp | 18 +- .../include/hpx/type_support/unwrap_ref.hpp | 6 +- .../include/hpx/type_support/void_guard.hpp | 3 +- .../include/hpx/actions/post_helper.hpp | 6 +- .../hpx/actions_base/actions_base_support.hpp | 6 +- .../include/hpx/actions_base/basic_action.hpp | 11 +- .../hpx/actions_base/component_action.hpp | 12 +- .../hpx/actions_base/lambda_to_action.hpp | 3 +- .../include/hpx/actions_base/plain_action.hpp | 10 +- .../traits/action_remote_result.hpp | 3 +- .../traits/action_was_object_migrated.hpp | 3 +- .../hpx/actions_base/traits/is_client.hpp | 6 +- .../actions_base/traits/is_continuation.hpp | 3 +- .../hpx/async_colocated/async_colocated.hpp | 3 +- .../functional/colocated_helpers.hpp | 6 +- .../register_post_colocated.hpp | 3 +- .../include/hpx/async_distributed/async.hpp | 21 +-- .../hpx/async_distributed/async_callback.hpp | 18 +- .../async_distributed/base_lco_with_value.hpp | 21 +-- .../hpx/async_distributed/bind_action.hpp | 9 +- .../hpx/async_distributed/continuation.hpp | 6 +- .../hpx/async_distributed/dataflow.hpp | 9 +- .../detail/async_implementations.hpp | 12 +- .../async_distributed/detail/promise_base.hpp | 3 +- .../async_distributed/detail/promise_lco.hpp | 9 +- .../detail/sync_implementations.hpp | 3 +- .../hpx/async_distributed/lcos_fwd.hpp | 3 +- .../hpx/async_distributed/packaged_action.hpp | 6 +- .../include/hpx/async_distributed/promise.hpp | 6 +- .../include/hpx/async_distributed/sync.hpp | 21 +-- .../traits/action_trigger_continuation.hpp | 3 +- .../hpx/async_distributed/trigger_lco.hpp | 9 +- .../include/hpx/collectives/all_gather.hpp | 6 +- .../include/hpx/collectives/all_reduce.hpp | 6 +- .../include/hpx/collectives/all_to_all.hpp | 6 +- .../include/hpx/collectives/broadcast.hpp | 6 +- .../hpx/collectives/broadcast_direct.hpp | 15 +- .../hpx/collectives/detail/barrier_node.hpp | 3 +- .../hpx/collectives/exclusive_scan.hpp | 12 +- .../include/hpx/collectives/fold.hpp | 9 +- .../include/hpx/collectives/gather.hpp | 6 +- .../hpx/collectives/inclusive_scan.hpp | 6 +- .../include/hpx/collectives/reduce.hpp | 6 +- .../include/hpx/collectives/reduce_direct.hpp | 9 +- .../include/hpx/collectives/scatter.hpp | 6 +- .../include/hpx/components/client_base.hpp | 27 +-- .../server/managed_component_base.hpp | 18 +- .../traits/component_type_database.hpp | 3 +- .../components_base/traits/is_component.hpp | 24 +-- .../traits/managed_component_policies.hpp | 6 +- .../container_distribution_policy.hpp | 6 +- ...explicit_container_distribution_policy.hpp | 9 +- .../distribution_policy_executor.hpp | 9 +- .../include/hpx/lcos_distributed/channel.hpp | 3 +- .../tests/unit/test_allocator.hpp | 3 +- .../include/hpx/naming_base/gid_type.hpp | 3 +- .../include/hpx/naming_base/id_type.hpp | 12 +- .../hpx/parcelport_lci/parcelport_lci.hpp | 6 +- .../hpx/parcelport_lcw/parcelport_lcw.hpp | 6 +- .../hpx/parcelport_tcp/connection_handler.hpp | 3 +- .../include/hpx/runtime_components/new.hpp | 15 +- .../server/runtime_support.hpp | 12 +- .../segmented_algorithms/detail/dispatch.hpp | 33 ++-- .../segmented_algorithms/mismatch.hpp | 6 +- .../traits/zip_iterator.hpp | 6 +- 338 files changed, 1451 insertions(+), 2828 deletions(-) diff --git a/cmake/HPX_CXXModules.cmake b/cmake/HPX_CXXModules.cmake index f01bf4c3e0a..8e8dd45108a 100644 --- a/cmake/HPX_CXXModules.cmake +++ b/cmake/HPX_CXXModules.cmake @@ -103,35 +103,6 @@ function(hpx_configure_module_producer producer) # Make sure consumers scan for the BMI set_target_properties(${_iface} PROPERTIES INTERFACE_CXX_SCAN_FOR_MODULES On) - - if(MSVC) - # MSVC: CMake/MSVC handle IFCs automatically; create a target for - # convenience, consumers can link to this to get ordering and include info - return() - endif() - - # Compiler-specific flags to instruct where to write module cache - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES - "AppleClang" - ) - # Clang common flags - target_compile_options(${producer} PRIVATE "-fmodule-output=${_moddir}") - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # GCC: modern flags - hpx_add_target_compile_option_if_available( - ${producer} PRIVATE "-fmodule-output=${_moddir}" RESULT ok - ) - if(NOT ok) - hpx_error( - "hpx_configure_module_producer: the used version of gcc does not support '-fmodule-output'" - ) - endif() - else() - hpx_warn( - "hpx_configure_module_producer: unknown compiler '${CMAKE_CXX_COMPILER_ID}'; " - "exposing EXPORT_MODULE_DIR='${_moddir}' for manual handling" - ) - endif() endfunction() # hpx_configure_module_consumer( ]) @@ -159,28 +130,11 @@ function(hpx_configure_module_consumer consumer producer) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" ) - target_compile_options( - ${consumer} PRIVATE "-fprebuilt-module-path=${_module_dir}" - ) get_target_property(_type ${consumer} TYPE) if((_type STREQUAL "SHARED_LIBRARY") OR (_type STREQUAL "EXECUTABLE")) target_link_options(${consumer} PRIVATE "-fuse-ld=lld") target_link_options(${consumer} PRIVATE "-Wl,--error-limit=0") endif() - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - hpx_add_target_compile_option_if_available( - ${consumer} PRIVATE "-fprebuilt-module-path=${_module_dir}" RESULT ok - ) - if(NOT ok) - hpx_error( - "hpx_configure_module_consumer: the used version of gcc does not " - "support '-fprebuilt-module-path='" - ) - endif() - else() - hpx_warn( - "hpx_configure_module_consumer: unknown compiler '${CMAKE_CXX_COMPILER_ID}'" - ) endif() endif() endfunction() diff --git a/cmake/HPX_CollectStdHeaders.cmake b/cmake/HPX_CollectStdHeaders.cmake index 8faaf7bbef3..97a400754c5 100644 --- a/cmake/HPX_CollectStdHeaders.cmake +++ b/cmake/HPX_CollectStdHeaders.cmake @@ -98,6 +98,8 @@ set(STANDARD_LIBRARY_HEADERS "" "" "" + "" + "" "" "" "" diff --git a/cmake/templates/hpx.ixx.in b/cmake/templates/hpx.ixx.in index b31141b6b76..042d2354200 100644 --- a/cmake/templates/hpx.ixx.in +++ b/cmake/templates/hpx.ixx.in @@ -18,12 +18,12 @@ module; // violations. #include -export module HPX.@cap_libname@; +#if !defined(__ANDROID__) && !defined(ANDROID) && !defined(__APPLE__) +#include +#endif +#include -// Make sure the exported symbols are name-mangled using standard C++ rules. -// This is necessary as otherwise the symbols exported from the shared libraries -// will be exported from the module using a differently encoded name. -extern "C++" { +export module HPX.@cap_libname@; #if defined(HPX_MSVC) // disable warning C5244: '#include ' in the purview of module @@ -51,5 +51,3 @@ extern "C++" { #if defined(HPX_MSVC) #pragma warning(pop) #endif - -} // extern "C++" diff --git a/libs/core/algorithms/include/hpx/algorithms/traits/pointer_category.hpp b/libs/core/algorithms/include/hpx/algorithms/traits/pointer_category.hpp index 40ce683993f..66453590bd9 100644 --- a/libs/core/algorithms/include/hpx/algorithms/traits/pointer_category.hpp +++ b/libs/core/algorithms/include/hpx/algorithms/traits/pointer_category.hpp @@ -41,8 +41,7 @@ namespace hpx::traits { using type = std::underlying_type_t; }; - HPX_CXX_CORE_EXPORT template - struct unwrap_enum + template struct unwrap_enum { using type = T; }; @@ -69,28 +68,24 @@ namespace hpx::traits { }; // every type is layout-compatible with itself - HPX_CXX_CORE_EXPORT template - struct pointer_category_helper + template struct pointer_category_helper { using type = std::conditional_t, trivially_copyable_pointer_tag, general_pointer_tag>; }; // pointers are layout compatible - HPX_CXX_CORE_EXPORT template - struct pointer_category_helper + template struct pointer_category_helper { using type = trivially_copyable_pointer_tag; }; - HPX_CXX_CORE_EXPORT template - struct pointer_category_helper + template struct pointer_category_helper { using type = trivially_copyable_pointer_tag; }; - HPX_CXX_CORE_EXPORT template - struct pointer_category_helper + template struct pointer_category_helper { using type = trivially_copyable_pointer_tag; }; @@ -116,8 +111,7 @@ namespace hpx::traits { general_pointer_tag>; }; - HPX_CXX_CORE_EXPORT template - struct pointer_move_category + template struct pointer_move_category { using type = general_pointer_tag; }; @@ -134,8 +128,7 @@ namespace hpx::traits { general_pointer_tag>; }; - HPX_CXX_CORE_EXPORT template - struct pointer_copy_category + template struct pointer_copy_category { using type = general_pointer_tag; }; @@ -150,8 +143,7 @@ namespace hpx::traits { relocatable_pointer_tag, general_pointer_tag>; }; - HPX_CXX_CORE_EXPORT template - struct pointer_relocate_category + template struct pointer_relocate_category { using type = general_pointer_tag; }; diff --git a/libs/core/algorithms/include/hpx/algorithms/traits/projected.hpp b/libs/core/algorithms/include/hpx/algorithms/traits/projected.hpp index 0ef3f453742..835cf831878 100644 --- a/libs/core/algorithms/include/hpx/algorithms/traits/projected.hpp +++ b/libs/core/algorithms/include/hpx/algorithms/traits/projected.hpp @@ -28,8 +28,7 @@ namespace hpx::traits { // For segmented iterators, we consider the local_raw_iterator instead of // the given one. - HPX_CXX_CORE_EXPORT template - struct projected_iterator struct projected_iterator>> { using local_iterator = @@ -39,8 +38,7 @@ namespace hpx::traits { local_iterator>::local_raw_iterator; }; - HPX_CXX_CORE_EXPORT template - struct projected_iterator struct projected_iterator::proxy_type>> { using type = typename std::decay_t::proxy_type; @@ -59,8 +57,7 @@ namespace hpx::parallel::traits { typename Enable = void> struct projected_result_of; - HPX_CXX_CORE_EXPORT template - struct projected_result_of struct projected_result_of>> : hpx::util::invoke_result> { @@ -92,8 +89,7 @@ namespace hpx::parallel::traits { typename Enable = void> struct projected_result_of_vector_pack; - HPX_CXX_CORE_EXPORT template - struct projected_result_of_vector_pack struct projected_result_of_vector_pack> : projected_result_of_vector_pack_> @@ -123,8 +119,7 @@ namespace hpx::parallel::traits { // void // clang-format off - HPX_CXX_CORE_EXPORT template - struct is_projected struct is_projected && hpx::is_invocable_v> @@ -142,8 +137,7 @@ namespace hpx::parallel::traits { { }; - HPX_CXX_CORE_EXPORT template - struct is_projected_indirect struct is_projected_indirect> : detail::is_projected @@ -180,8 +174,7 @@ namespace hpx::parallel::traits { { }; - HPX_CXX_CORE_EXPORT template - struct is_projected_zip_iterator struct is_projected_zip_iterator> : hpx::traits::is_zip_iterator { @@ -201,9 +194,8 @@ namespace hpx::parallel::traits { { }; - HPX_CXX_CORE_EXPORT template - struct is_indirect_callable, + template struct is_indirect_callable, std::enable_if_t< hpx::util::all_of_v...> && (!hpx::is_vectorpack_execution_policy_v || @@ -218,9 +210,8 @@ namespace hpx::parallel::traits { // Vector pack execution policies used with zip-iterators require // special handling because zip_iterator<>::reference is not a real // reference type. - HPX_CXX_CORE_EXPORT template - struct is_indirect_callable, + template struct is_indirect_callable, std::enable_if_t< hpx::util::all_of_v...> && hpx::is_vectorpack_execution_policy_v && diff --git a/libs/core/algorithms/include/hpx/algorithms/traits/projected_range.hpp b/libs/core/algorithms/include/hpx/algorithms/traits/projected_range.hpp index dc4550dce90..6086bb0ed20 100644 --- a/libs/core/algorithms/include/hpx/algorithms/traits/projected_range.hpp +++ b/libs/core/algorithms/include/hpx/algorithms/traits/projected_range.hpp @@ -21,8 +21,7 @@ namespace hpx::parallel::traits { { }; - HPX_CXX_CORE_EXPORT template - struct projected_range_result_of struct projected_range_result_of>> : detail::projected_result_of, std::ranges::iterator_t> @@ -36,8 +35,7 @@ namespace hpx::parallel::traits { { }; - HPX_CXX_CORE_EXPORT template - struct is_projected_range struct is_projected_range>> : detail::is_projected, std::ranges::iterator_t> { @@ -54,8 +52,7 @@ namespace hpx::parallel::traits { { }; - HPX_CXX_CORE_EXPORT template - struct projected_range>> + template struct projected_range>> { using projector_type = std::decay_t; using iterator_type = std::ranges::iterator_t; diff --git a/libs/core/algorithms/include/hpx/algorithms/traits/segmented_iterator_traits.hpp b/libs/core/algorithms/include/hpx/algorithms/traits/segmented_iterator_traits.hpp index 31e4bf4e434..cef9f0fb1c5 100644 --- a/libs/core/algorithms/include/hpx/algorithms/traits/segmented_iterator_traits.hpp +++ b/libs/core/algorithms/include/hpx/algorithms/traits/segmented_iterator_traits.hpp @@ -63,8 +63,7 @@ namespace hpx::traits { }; // MSVC needs this for whatever reason - template <> - struct segmented_local_iterator_traits + template <> struct segmented_local_iterator_traits { using is_segmented_local_iterator = std::false_type; }; diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/copy.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/copy.hpp index 01328bc5563..45ca7575eb7 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/copy.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/copy.hpp @@ -439,8 +439,7 @@ namespace hpx::parallel { typename Enable = void> struct copy_iter; - HPX_CXX_CORE_EXPORT template - struct copy_iter struct copy_iter::value>> : public copy - struct copy_iter struct copy_iter::value>> : public copy> diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/detail/dispatch.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/detail/dispatch.hpp index e6941755a28..793f7b13591 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/detail/dispatch.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/detail/dispatch.hpp @@ -35,8 +35,7 @@ namespace hpx::parallel::detail { Result>::local_raw_iterator; }; - HPX_CXX_CORE_EXPORT template - struct local_algorithm_result> + template struct local_algorithm_result> { using type1 = typename hpx::traits::segmented_local_iterator_traits< Result1>::local_raw_iterator; @@ -46,8 +45,7 @@ namespace hpx::parallel::detail { using type = util::in_out_result; }; - HPX_CXX_CORE_EXPORT template - struct local_algorithm_result> + template struct local_algorithm_result> { using type1 = typename hpx::traits::segmented_local_iterator_traits< Result>::local_raw_iterator; @@ -55,9 +53,8 @@ namespace hpx::parallel::detail { using type = util::min_max_result; }; - HPX_CXX_CORE_EXPORT template - struct local_algorithm_result< + template struct local_algorithm_result< util::in_in_out_result> { using type1 = typename hpx::traits::segmented_local_iterator_traits< @@ -70,8 +67,7 @@ namespace hpx::parallel::detail { using type = util::in_in_out_result; }; - template <> - struct local_algorithm_result + template <> struct local_algorithm_result { using type = void; }; diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/for_each.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/for_each.hpp index 963d27626f0..9cc5a923bef 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/for_each.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/for_each.hpp @@ -327,8 +327,7 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct for_each_iteration + template struct for_each_iteration { using execution_policy_type = std::decay_t; using fun_type = std::decay_t; @@ -660,8 +659,7 @@ namespace hpx { #if defined(HPX_HAVE_THREAD_DESCRIPTION) namespace hpx::traits { - HPX_CXX_CORE_EXPORT template - struct get_function_address< + template struct get_function_address< parallel::detail::for_each_iteration> { [[nodiscard]] static constexpr std::size_t call( @@ -672,8 +670,7 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_annotation< + template struct get_function_annotation< parallel::detail::for_each_iteration> { [[nodiscard]] static constexpr char const* call( @@ -685,8 +682,7 @@ namespace hpx::traits { }; #if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX) - HPX_CXX_CORE_EXPORT template - struct get_function_annotation_itt< + template struct get_function_annotation_itt< parallel::detail::for_each_iteration> { [[nodiscard]] static util::itt::string_handle call( diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop.hpp index b44d719ec23..d3d3e15ccc7 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop.hpp @@ -811,9 +811,8 @@ namespace hpx::parallel { typename S = void, typename Tuple = hpx::tuple<>> struct part_iterations; - HPX_CXX_CORE_EXPORT template - struct part_iterations> + template struct part_iterations> { using fun_type = std::decay_t; @@ -915,8 +914,7 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct part_iterations> + template struct part_iterations> { using fun_type = std::decay_t; @@ -1016,9 +1014,8 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct part_iterations> + template struct part_iterations> { using fun_type = std::decay_t; @@ -1097,8 +1094,7 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct part_iterations> + template struct part_iterations> { using fun_type = std::decay_t; @@ -1845,9 +1841,8 @@ namespace hpx::experimental { #if defined(HPX_HAVE_THREAD_DESCRIPTION) namespace hpx::traits { - HPX_CXX_CORE_EXPORT template - struct get_function_address< + template struct get_function_address< hpx::parallel::detail::part_iterations> { static constexpr std::size_t call( @@ -1858,9 +1853,8 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_annotation< + template struct get_function_annotation< hpx::parallel::detail::part_iterations> { static constexpr char const* call( @@ -1872,9 +1866,8 @@ namespace hpx::traits { }; #if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX) - HPX_CXX_CORE_EXPORT template - struct get_function_annotation_itt< + template struct get_function_annotation_itt< hpx::parallel::detail::part_iterations> { static util::itt::string_handle call( diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop_induction.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop_induction.hpp index e0ec1c35848..c9118c5b90b 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop_induction.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/for_loop_induction.hpp @@ -58,8 +58,7 @@ namespace hpx::parallel::detail { T curr_; }; - HPX_CXX_CORE_EXPORT template - struct induction_helper + template struct induction_helper { explicit constexpr induction_helper(T& var) noexcept : live_out_var_(var) @@ -138,8 +137,7 @@ namespace hpx::parallel::detail { std::size_t stride_; }; - HPX_CXX_CORE_EXPORT template - struct induction_stride_helper + template struct induction_stride_helper { constexpr induction_stride_helper(T& var, std::size_t stride) noexcept : live_out_var_(var) diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/move.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/move.hpp index 97e5af73feb..fd40314d38c 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/move.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/move.hpp @@ -185,8 +185,7 @@ namespace hpx::parallel { typename Enable = void> struct move; - HPX_CXX_CORE_EXPORT template - struct move struct move::value>> : public move_pair - struct move struct move::value>> : public move_pair> diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/partition.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/partition.hpp index 562f13403d1..fcc46631e74 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/partition.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/partition.hpp @@ -820,8 +820,7 @@ namespace hpx::parallel { class block_manager; // block manager for random access iterator. - template - class block_manager class block_manager>> { public: @@ -900,8 +899,7 @@ namespace hpx::parallel { }; // block manager for forward access iterator. - template - class block_manager class block_manager && !std::random_access_iterator>> { diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/reduce_by_key.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/reduce_by_key.hpp index 2385655b134..992ace9a29c 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/reduce_by_key.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/reduce_by_key.hpp @@ -161,8 +161,7 @@ namespace hpx::parallel::detail { struct result; // specialize result for iterator type - template - struct result + template struct result { using element_type = typename std::iterator_traits::reference; diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/transform.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/transform.hpp index f83178bb24c..d857c257378 100644 --- a/libs/core/algorithms/include/hpx/parallel/algorithms/transform.hpp +++ b/libs/core/algorithms/include/hpx/parallel/algorithms/transform.hpp @@ -332,8 +332,7 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct transform_projected + template struct transform_projected { std::decay_t f_{}; @@ -407,8 +406,7 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct transform_iteration + template struct transform_iteration { using execution_policy_type = std::decay_t; using fun_type = std::decay_t; @@ -631,8 +629,7 @@ namespace hpx::parallel { } }; - HPX_CXX_CORE_EXPORT template - struct transform_binary_iteration struct transform_binary_iteration { using execution_policy_type = std::decay_t; @@ -858,8 +855,7 @@ namespace hpx::parallel { #if defined(HPX_HAVE_THREAD_DESCRIPTION) namespace hpx::traits { - HPX_CXX_CORE_EXPORT template - struct get_function_address< + template struct get_function_address< parallel::detail::transform_iteration> { [[nodiscard]] static constexpr std::size_t call( @@ -870,8 +866,7 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_annotation< + template struct get_function_annotation< parallel::detail::transform_iteration> { [[nodiscard]] static constexpr char const* call( @@ -882,9 +877,8 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_address< + template struct get_function_address< parallel::detail::transform_binary_iteration> { [[nodiscard]] static constexpr std::size_t call( @@ -895,9 +889,8 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_annotation< + template struct get_function_annotation< parallel::detail::transform_binary_iteration> { [[nodiscard]] static constexpr char const* call( @@ -909,8 +902,7 @@ namespace hpx::traits { }; #if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX) - HPX_CXX_CORE_EXPORT template - struct get_function_annotation_itt< + template struct get_function_annotation_itt< parallel::detail::transform_iteration> { [[nodiscard]] static util::itt::string_handle call( @@ -921,9 +913,8 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_annotation_itt< + template struct get_function_annotation_itt< parallel::detail::transform_binary_iteration> { [[nodiscard]] static util::itt::string_handle call( diff --git a/libs/core/algorithms/include/hpx/parallel/container_algorithms/contains.hpp b/libs/core/algorithms/include/hpx/parallel/container_algorithms/contains.hpp index ba227e97cf9..9a686a3ed15 100644 --- a/libs/core/algorithms/include/hpx/parallel/container_algorithms/contains.hpp +++ b/libs/core/algorithms/include/hpx/parallel/container_algorithms/contains.hpp @@ -86,8 +86,7 @@ namespace hpx::parallel::detail { typename Enable = void> struct contains_subrange_helper; - HPX_CXX_CORE_EXPORT template - struct contains_subrange_helper struct contains_subrange_helper>> { static bool get_result(T& itr, T& last) @@ -96,8 +95,7 @@ namespace hpx::parallel::detail { } }; - HPX_CXX_CORE_EXPORT template - struct contains_subrange_helper struct contains_subrange_helper>> { static hpx::future get_result(hpx::future& itr, T& last) diff --git a/libs/core/algorithms/include/hpx/parallel/datapar/iterator_helpers.hpp b/libs/core/algorithms/include/hpx/parallel/datapar/iterator_helpers.hpp index 80542464ec9..0e1d7025bf8 100644 --- a/libs/core/algorithms/include/hpx/parallel/datapar/iterator_helpers.hpp +++ b/libs/core/algorithms/include/hpx/parallel/datapar/iterator_helpers.hpp @@ -89,8 +89,7 @@ namespace hpx::parallel::util::detail { { }; - HPX_CXX_CORE_EXPORT template - struct iterator_datapar_compatible struct iterator_datapar_compatible>> : iterator_datapar_compatible_impl>::type { @@ -130,8 +129,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct datapar_loop_step>> + template struct datapar_loop_step>> { using V1 = traits::vector_pack_type_t; using V = traits::vector_pack_type_t; diff --git a/libs/core/algorithms/include/hpx/parallel/datapar/loop.hpp b/libs/core/algorithms/include/hpx/parallel/datapar/loop.hpp index b208ed4b11c..b1998785958 100644 --- a/libs/core/algorithms/include/hpx/parallel/datapar/loop.hpp +++ b/libs/core/algorithms/include/hpx/parallel/datapar/loop.hpp @@ -238,8 +238,7 @@ namespace hpx::parallel::util { HPX_CXX_CORE_EXPORT template struct datapar_loop_n; - HPX_CXX_CORE_EXPORT template - struct datapar_loop_n struct datapar_loop_n>> { using iterator_type = std::decay_t; @@ -306,8 +305,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct datapar_loop_n>> + template struct datapar_loop_n>> { using V = traits::vector_pack_type_t; diff --git a/libs/core/algorithms/include/hpx/parallel/datapar/zip_iterator.hpp b/libs/core/algorithms/include/hpx/parallel/datapar/zip_iterator.hpp index d5c35b0283a..548173e06fe 100644 --- a/libs/core/algorithms/include/hpx/parallel/datapar/zip_iterator.hpp +++ b/libs/core/algorithms/include/hpx/parallel/datapar/zip_iterator.hpp @@ -23,8 +23,7 @@ namespace hpx::parallel::util::detail { /////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct is_data_aligned_impl> + template struct is_data_aligned_impl> { template static HPX_FORCEINLINE constexpr bool call( @@ -43,8 +42,7 @@ namespace hpx::parallel::util::detail { }; /////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct iterator_datapar_compatible_impl> + template struct iterator_datapar_compatible_impl> : hpx::util::all_of::value_type>...> { @@ -84,8 +82,7 @@ namespace hpx::parallel::traits { } } // namespace detail - HPX_CXX_CORE_EXPORT template - struct vector_pack_load, ValueType> + template struct vector_pack_load, ValueType> { using value_type = hpx::tuple; @@ -136,8 +133,7 @@ namespace hpx::parallel::traits { } } // namespace detail - HPX_CXX_CORE_EXPORT template - struct vector_pack_store, ValueType> + template struct vector_pack_store, ValueType> { template static constexpr void aligned( diff --git a/libs/core/algorithms/include/hpx/parallel/util/cancellation_token.hpp b/libs/core/algorithms/include/hpx/parallel/util/cancellation_token.hpp index 4b96847330a..ed21b93b73f 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/cancellation_token.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/cancellation_token.hpp @@ -63,8 +63,7 @@ namespace hpx::parallel::util { // special case for when no additional data needs to be stored at the // cancellation point - template <> - class cancellation_token> + template <> class cancellation_token> { private: using flag_type = std::atomic; diff --git a/libs/core/algorithms/include/hpx/parallel/util/compare_projected.hpp b/libs/core/algorithms/include/hpx/parallel/util/compare_projected.hpp index f71b8bd16d6..8b1e2c64cbc 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/compare_projected.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/compare_projected.hpp @@ -20,8 +20,7 @@ namespace hpx::parallel::util { struct compare_projected; /////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct compare_projected + template struct compare_projected { template constexpr compare_projected(Compare_&& comp, Proj_&& proj) @@ -41,8 +40,7 @@ namespace hpx::parallel::util { Proj proj_; }; - HPX_CXX_CORE_EXPORT template - struct compare_projected + template struct compare_projected { template constexpr compare_projected(Compare_&& comp, hpx::identity) @@ -60,9 +58,8 @@ namespace hpx::parallel::util { }; /////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct compare_projected + template struct compare_projected { template constexpr compare_projected( @@ -85,8 +82,7 @@ namespace hpx::parallel::util { Proj2 proj2_; }; - HPX_CXX_CORE_EXPORT template - struct compare_projected + template struct compare_projected { template constexpr compare_projected( @@ -107,8 +103,7 @@ namespace hpx::parallel::util { Proj2 proj2_; }; - HPX_CXX_CORE_EXPORT template - struct compare_projected + template struct compare_projected { template constexpr compare_projected( @@ -129,8 +124,7 @@ namespace hpx::parallel::util { Proj1 proj1_; }; - HPX_CXX_CORE_EXPORT template - struct compare_projected + template struct compare_projected { template constexpr compare_projected( diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/algorithm_result.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/algorithm_result.hpp index 42f29592b0d..54fb20bc86e 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/algorithm_result.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/algorithm_result.hpp @@ -30,8 +30,7 @@ namespace hpx::parallel::util::detail { typename Enable = void> struct algorithm_result_impl; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && !hpx::execution_policy_has_scheduler_executor_v>> { @@ -58,8 +57,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && !hpx::execution_policy_has_scheduler_executor_v>> { @@ -83,8 +81,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && !hpx::execution_policy_has_scheduler_executor_v>> { @@ -103,8 +100,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && !hpx::execution_policy_has_scheduler_executor_v>> { @@ -134,8 +130,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && hpx::execution_policy_has_scheduler_executor_v>> { @@ -174,8 +169,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && hpx::execution_policy_has_scheduler_executor_v>> { @@ -196,8 +190,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && hpx::execution_policy_has_scheduler_executor_v>> { @@ -220,8 +213,7 @@ namespace hpx::parallel::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct algorithm_result_impl struct algorithm_result_impl && hpx::execution_policy_has_scheduler_executor_v>> { diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/chunk_size_iterator.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/chunk_size_iterator.hpp index 6f9a92a23bb..730f8b2b5da 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/chunk_size_iterator.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/chunk_size_iterator.hpp @@ -26,29 +26,25 @@ namespace hpx::parallel::util::detail { HPX_CXX_CORE_EXPORT template struct chunk_size_iterator_category; - HPX_CXX_CORE_EXPORT template - struct chunk_size_iterator_category struct chunk_size_iterator_category>> { using type = std::random_access_iterator_tag; }; - HPX_CXX_CORE_EXPORT template - struct chunk_size_iterator_category struct chunk_size_iterator_category>> { using type = hpx::traits::iter_category_t; }; - HPX_CXX_CORE_EXPORT template - struct chunk_size_iterator_category struct chunk_size_iterator_category>> { using type = hpx::traits::range_category_t; }; - HPX_CXX_CORE_EXPORT template - struct chunk_size_iterator_category struct chunk_size_iterator_category>> { using type = std::random_access_iterator_tag; @@ -61,23 +57,20 @@ namespace hpx::parallel::util::detail { HPX_CXX_CORE_EXPORT template struct iterator_type; - HPX_CXX_CORE_EXPORT template - struct iterator_type struct iterator_type || hpx::traits::is_range_generator_v>> { using type = T; }; - HPX_CXX_CORE_EXPORT template - struct iterator_type struct iterator_type>> { using type = Iterator; }; - HPX_CXX_CORE_EXPORT template - struct iterator_type>> + template struct iterator_type>> { using type = std::ranges::iterator_t; }; diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/handle_local_exceptions.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/handle_local_exceptions.hpp index 4214ced4661..b3593f606bc 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/handle_local_exceptions.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/handle_local_exceptions.hpp @@ -771,8 +771,7 @@ namespace hpx::parallel::util::detail { }; // unseq et.al. need to terminate on exceptions - HPX_CXX_CORE_EXPORT template - struct handle_local_exceptions struct handle_local_exceptions>> : terminate_on_local_exceptions { diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/handle_remote_exceptions.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/handle_remote_exceptions.hpp index aef09ffc5f7..20b92f62c1f 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/handle_remote_exceptions.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/handle_remote_exceptions.hpp @@ -76,8 +76,7 @@ namespace hpx::parallel::util::detail { } }; - template <> - struct handle_remote_exceptions + template <> struct handle_remote_exceptions { [[noreturn]] static void call( std::exception_ptr const&, std::list&) @@ -108,8 +107,7 @@ namespace hpx::parallel::util::detail { } }; - template <> - struct handle_remote_exceptions + template <> struct handle_remote_exceptions { [[noreturn]] static void call( std::exception_ptr const&, std::list&) diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/partitioner_iteration.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/partitioner_iteration.hpp index 7bd10dfef02..289821df018 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/partitioner_iteration.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/partitioner_iteration.hpp @@ -93,8 +93,7 @@ namespace hpx::parallel::util::detail { namespace hpx::traits { - HPX_CXX_CORE_EXPORT template - struct get_function_address< + template struct get_function_address< parallel::util::detail::partitioner_iteration> { [[nodiscard]] static constexpr std::size_t call( @@ -105,8 +104,7 @@ namespace hpx::traits { } }; - HPX_CXX_CORE_EXPORT template - struct get_function_annotation< + template struct get_function_annotation< parallel::util::detail::partitioner_iteration> { [[nodiscard]] static constexpr char const* call( @@ -118,8 +116,7 @@ namespace hpx::traits { }; #if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX) - HPX_CXX_CORE_EXPORT template - struct get_function_annotation_itt< + template struct get_function_annotation_itt< parallel::util::detail::partitioner_iteration> { [[nodiscard]] static util::itt::string_handle call( diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/select_partitioner.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/select_partitioner.hpp index 88d27f5d716..58298dd04fd 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/select_partitioner.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/select_partitioner.hpp @@ -23,8 +23,7 @@ namespace hpx::parallel::util::detail { using apply = Partitioner; }; - HPX_CXX_CORE_EXPORT template class Partitioner, + template class Partitioner, template class TaskPartitioner> struct select_partitioner && diff --git a/libs/core/algorithms/include/hpx/parallel/util/detail/sender_util.hpp b/libs/core/algorithms/include/hpx/parallel/util/detail/sender_util.hpp index 91613cd668e..850914cb225 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/detail/sender_util.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/detail/sender_util.hpp @@ -41,8 +41,7 @@ namespace hpx::detail { { }; - HPX_CXX_CORE_EXPORT template - struct is_bound_algorithm> : std::true_type + template struct is_bound_algorithm> : std::true_type { }; diff --git a/libs/core/algorithms/include/hpx/parallel/util/invoke_projected.hpp b/libs/core/algorithms/include/hpx/parallel/util/invoke_projected.hpp index 1085b35c34b..e2073d319eb 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/invoke_projected.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/invoke_projected.hpp @@ -51,8 +51,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct invoke_projected + template struct invoke_projected { using pred_type = std::decay_t; @@ -107,8 +106,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct invoke_projected_ind + template struct invoke_projected_ind { using pred_type = std::decay_t; diff --git a/libs/core/algorithms/include/hpx/parallel/util/loop.hpp b/libs/core/algorithms/include/hpx/parallel/util/loop.hpp index 6790f5e6f80..bb7e6fb3085 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/loop.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/loop.hpp @@ -1242,8 +1242,7 @@ namespace hpx::parallel::util { } }; - template <> - struct loop_idx_n + template <> struct loop_idx_n { /////////////////////////////////////////////////////////////////// // handle sequences of non-futures diff --git a/libs/core/algorithms/include/hpx/parallel/util/prefetching.hpp b/libs/core/algorithms/include/hpx/parallel/util/prefetching.hpp index 6eebed7f94c..b80e7fdb703 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/prefetching.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/prefetching.hpp @@ -451,8 +451,7 @@ namespace hpx::parallel::util { namespace detail { /////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct loop> + template struct loop> { using iterator_type = prefetching::prefetching_iterator; using type = typename iterator_type::base_iterator; @@ -511,8 +510,7 @@ namespace hpx::parallel::util { }; /////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct loop_ind> + template struct loop_ind> { using iterator_type = prefetching::prefetching_iterator; using type = typename iterator_type::base_iterator; diff --git a/libs/core/algorithms/include/hpx/parallel/util/transfer.hpp b/libs/core/algorithms/include/hpx/parallel/util/transfer.hpp index f3faec0c0d2..e10add790fe 100644 --- a/libs/core/algorithms/include/hpx/parallel/util/transfer.hpp +++ b/libs/core/algorithms/include/hpx/parallel/util/transfer.hpp @@ -138,8 +138,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct copy_helper + template struct copy_helper { template HPX_FORCEINLINE static constexpr in_out_result @@ -201,8 +200,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct copy_n_helper + template struct copy_n_helper { template HPX_FORCEINLINE static in_out_result call( @@ -293,8 +291,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct move_helper + template struct move_helper { template HPX_FORCEINLINE static in_out_result call( @@ -349,8 +346,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct move_n_helper + template struct move_n_helper { template HPX_FORCEINLINE static in_out_result call( @@ -394,8 +390,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct uninit_copy_n_helper struct uninit_copy_n_helper { template @@ -454,8 +449,7 @@ namespace hpx::parallel::util { } }; - HPX_CXX_CORE_EXPORT template - struct uninit_move_n_helper struct uninit_move_n_helper { template diff --git a/libs/core/algorithms/tests/performance/utils.hpp b/libs/core/algorithms/tests/performance/utils.hpp index 92593a1bbc2..6c495824588 100644 --- a/libs/core/algorithms/tests/performance/utils.hpp +++ b/libs/core/algorithms/tests/performance/utils.hpp @@ -22,8 +22,7 @@ template , typename Enable = void> struct test_container; -template -struct test_container, +template struct test_container, std::enable_if_t< std::is_same_v>> { @@ -36,8 +35,7 @@ struct test_container, } }; -template -struct test_container struct test_container>> { @@ -49,8 +47,7 @@ struct test_container -struct test_container struct test_container>> { @@ -62,8 +59,7 @@ struct test_container -struct test_container struct test_container>> { using type = std::forward_list; diff --git a/libs/core/algorithms/tests/unit/algorithms/test_utils.hpp b/libs/core/algorithms/tests/unit/algorithms/test_utils.hpp index 3b5435ee1d0..ad161e60b80 100644 --- a/libs/core/algorithms/tests/unit/algorithms/test_utils.hpp +++ b/libs/core/algorithms/tests/unit/algorithms/test_utils.hpp @@ -28,8 +28,7 @@ namespace test { { }; - template <> - struct maybe_disable_proxy + template <> struct maybe_disable_proxy { using use_brackets_proxy = std::false_type; }; @@ -165,8 +164,7 @@ namespace test { } }; - template - struct test_num_exceptions + template struct test_num_exceptions { static void call(hpx::execution::sequenced_policy const&, hpx::exception_list const& e) @@ -175,8 +173,7 @@ namespace test { } }; - template - struct test_num_exceptions + template struct test_num_exceptions { static void call(ExPolicy, hpx::exception_list const& e) { @@ -184,8 +181,7 @@ namespace test { } }; - template <> - struct test_num_exceptions struct test_num_exceptions { static void call(hpx::execution::sequenced_policy const&, diff --git a/libs/core/algorithms/tests/unit/container_algorithms/test_utils.hpp b/libs/core/algorithms/tests/unit/container_algorithms/test_utils.hpp index 5c96e6a2e88..1e49dc2f08b 100644 --- a/libs/core/algorithms/tests/unit/container_algorithms/test_utils.hpp +++ b/libs/core/algorithms/tests/unit/container_algorithms/test_utils.hpp @@ -72,8 +72,7 @@ namespace test { { }; - template <> - struct maybe_disable_proxy + template <> struct maybe_disable_proxy { using use_brackets_proxy = std::false_type; }; @@ -261,8 +260,7 @@ namespace test { } }; - template <> - struct test_num_exceptions_base + template <> struct test_num_exceptions_base { static void call(hpx::execution::sequenced_policy const&, hpx::exception_list const& e) @@ -276,8 +274,7 @@ namespace test { { }; - template - struct test_num_exceptions + template struct test_num_exceptions { static void call(ExPolicy, hpx::exception_list const& e) { diff --git a/libs/core/allocator_support/include/hpx/allocator_support/traits/is_allocator.hpp b/libs/core/allocator_support/include/hpx/allocator_support/traits/is_allocator.hpp index 53248115707..84bf8b643e6 100644 --- a/libs/core/allocator_support/include/hpx/allocator_support/traits/is_allocator.hpp +++ b/libs/core/allocator_support/include/hpx/allocator_support/traits/is_allocator.hpp @@ -66,8 +66,7 @@ namespace hpx::traits { std::declval(), std::declval()))::value; }; - HPX_CXX_CORE_EXPORT template - struct has_deallocate + template struct has_deallocate { static constexpr bool value = false; }; diff --git a/libs/core/async_base/include/hpx/async_base/launch_policy.hpp b/libs/core/async_base/include/hpx/async_base/launch_policy.hpp index 908abdb30e0..1e1eca9dc52 100644 --- a/libs/core/async_base/include/hpx/async_base/launch_policy.hpp +++ b/libs/core/async_base/include/hpx/async_base/launch_policy.hpp @@ -173,8 +173,7 @@ namespace hpx { } }; - template <> - struct policy_holder : policy_holder_base + template <> struct policy_holder : policy_holder_base { // NOLINTNEXTLINE(bugprone-crtp-constructor-accessibility) constexpr explicit policy_holder(launch_policy const p, diff --git a/libs/core/async_base/include/hpx/async_base/scheduling_properties.hpp b/libs/core/async_base/include/hpx/async_base/scheduling_properties.hpp index 1ffa3551898..0e3df4ddea6 100644 --- a/libs/core/async_base/include/hpx/async_base/scheduling_properties.hpp +++ b/libs/core/async_base/include/hpx/async_base/scheduling_properties.hpp @@ -52,8 +52,7 @@ namespace hpx::execution::experimental { } // namespace detail /////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct is_scheduling_property struct is_scheduling_property, Property>>> : std::true_type @@ -66,8 +65,7 @@ namespace hpx::execution::experimental { { } with_priority{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -84,8 +82,7 @@ namespace hpx::execution::experimental { } } get_priority{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -95,8 +92,7 @@ namespace hpx::execution::experimental { { } with_stacksize{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -113,8 +109,7 @@ namespace hpx::execution::experimental { } } get_stacksize{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -124,8 +119,7 @@ namespace hpx::execution::experimental { { } with_hint{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -142,8 +136,7 @@ namespace hpx::execution::experimental { } } get_hint{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -153,8 +146,7 @@ namespace hpx::execution::experimental { { } with_annotation{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -171,8 +163,7 @@ namespace hpx::execution::experimental { } } get_annotation{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; @@ -195,8 +186,7 @@ namespace hpx::execution::experimental { } } get_first_core{}; - template <> - struct is_scheduling_property : std::true_type + template <> struct is_scheduling_property : std::true_type { }; } // namespace hpx::execution::experimental diff --git a/libs/core/async_combinators/include/hpx/async_combinators/wait_all.hpp b/libs/core/async_combinators/include/hpx/async_combinators/wait_all.hpp index ad8287ab2dc..cffbb95ef11 100644 --- a/libs/core/async_combinators/include/hpx/async_combinators/wait_all.hpp +++ b/libs/core/async_combinators/include/hpx/async_combinators/wait_all.hpp @@ -177,15 +177,13 @@ namespace hpx::detail { { }; - template - struct is_future_or_shared_state< + template struct is_future_or_shared_state< hpx::intrusive_ptr>> : std::true_type { }; - template - struct is_future_or_shared_state> + template struct is_future_or_shared_state> : is_future_or_shared_state { }; @@ -200,14 +198,12 @@ namespace hpx::detail { { }; - template - struct is_future_or_shared_state_range> + template struct is_future_or_shared_state_range> : is_future_or_shared_state { }; - template - struct is_future_or_shared_state_range> + template struct is_future_or_shared_state_range> : is_future_or_shared_state { }; @@ -220,15 +216,13 @@ namespace hpx::detail { template struct future_or_shared_state_result; - template - struct future_or_shared_state_result struct future_or_shared_state_result>> : hpx::traits::future_traits { }; - template - struct future_or_shared_state_result< + template struct future_or_shared_state_result< hpx::intrusive_ptr>> { using type = R; diff --git a/libs/core/async_combinators/include/hpx/async_combinators/when_all.hpp b/libs/core/async_combinators/include/hpx/async_combinators/when_all.hpp index 9c29e088441..19740c70761 100644 --- a/libs/core/async_combinators/include/hpx/async_combinators/when_all.hpp +++ b/libs/core/async_combinators/include/hpx/async_combinators/when_all.hpp @@ -157,8 +157,7 @@ namespace hpx::lcos::detail { } }; - template - struct when_all_result, + template struct when_all_result, std::enable_if_t>> { using type = T; diff --git a/libs/core/async_cuda/include/hpx/async_cuda/cublas_executor.hpp b/libs/core/async_cuda/include/hpx/async_cuda/cublas_executor.hpp index d50b3ef42a4..de4887e5e15 100644 --- a/libs/core/async_cuda/include/hpx/async_cuda/cublas_executor.hpp +++ b/libs/core/async_cuda/include/hpx/async_cuda/cublas_executor.hpp @@ -72,8 +72,7 @@ namespace hpx::cuda::experimental { namespace detail { // specialization for return type of cublasStatus_t - HPX_CXX_CORE_EXPORT template - struct dispatch_helper + template struct dispatch_helper { inline cublasStatus_t operator()( cublasStatus_t (*f)(Args...), Args... args) const @@ -237,15 +236,13 @@ namespace hpx::cuda::experimental { namespace hpx::execution::experimental { /// \cond NOINTERNAL - template <> - struct is_one_way_executor + template <> struct is_one_way_executor : std::true_type { // we support fire and forget without returning a waitable/future }; - template <> - struct is_two_way_executor + template <> struct is_two_way_executor : std::true_type { // we support returning a waitable/future diff --git a/libs/core/async_cuda/include/hpx/async_cuda/cuda_executor.hpp b/libs/core/async_cuda/include/hpx/async_cuda/cuda_executor.hpp index a100d7fb42c..47e4326c5c1 100644 --- a/libs/core/async_cuda/include/hpx/async_cuda/cuda_executor.hpp +++ b/libs/core/async_cuda/include/hpx/async_cuda/cuda_executor.hpp @@ -45,8 +45,7 @@ namespace hpx::cuda::experimental { }; // specialization for return type void - HPX_CXX_CORE_EXPORT template - struct dispatch_helper + template struct dispatch_helper { inline void operator()(void (*f)(Args...), Args... args) const { @@ -55,8 +54,7 @@ namespace hpx::cuda::experimental { }; // specialization for return type of cudaError_t - HPX_CXX_CORE_EXPORT template - struct dispatch_helper + template struct dispatch_helper { inline void operator()( cudaError_t (*f)(Args...), Args... args) const @@ -187,15 +185,13 @@ namespace hpx::cuda::experimental { namespace hpx::execution::experimental { /// \cond NOINTERNAL - template <> - struct is_one_way_executor + template <> struct is_one_way_executor : std::true_type { // we support fire and forget without returning a waitable/future }; - template <> - struct is_two_way_executor + template <> struct is_two_way_executor : std::true_type { // we support returning a waitable/future diff --git a/libs/core/async_cuda/include/hpx/async_cuda/cuda_future.hpp b/libs/core/async_cuda/include/hpx/async_cuda/cuda_future.hpp index 3d65a480b32..3a222730764 100644 --- a/libs/core/async_cuda/include/hpx/async_cuda/cuda_future.hpp +++ b/libs/core/async_cuda/include/hpx/async_cuda/cuda_future.hpp @@ -49,8 +49,7 @@ namespace hpx::cuda::experimental { HPX_CXX_CORE_EXPORT template struct future_data; - HPX_CXX_CORE_EXPORT template - struct future_data + template struct future_data : lcos::detail::future_data_allocator> { @@ -96,8 +95,7 @@ namespace hpx::cuda::experimental { } }; - HPX_CXX_CORE_EXPORT template - struct future_data + template struct future_data : lcos::detail::future_data_allocator> { diff --git a/libs/core/async_cuda/include/hpx/async_cuda/transform_stream.hpp b/libs/core/async_cuda/include/hpx/async_cuda/transform_stream.hpp index dfdfd7d9b1c..0747c9c57d9 100644 --- a/libs/core/async_cuda/include/hpx/async_cuda/transform_stream.hpp +++ b/libs/core/async_cuda/include/hpx/async_cuda/transform_stream.hpp @@ -123,8 +123,7 @@ namespace hpx::cuda::experimental { { }; - HPX_CXX_CORE_EXPORT template - struct is_transform_stream_receiver> + template struct is_transform_stream_receiver> : std::true_type { }; @@ -303,8 +302,7 @@ namespace hpx::cuda::experimental { using type = hpx::execution::experimental::set_value_t(T); }; - template - struct set_value_void_checked + template struct set_value_void_checked { using type = hpx::execution::experimental::set_value_t(); }; diff --git a/libs/core/async_mpi/include/hpx/async_mpi/transform_mpi.hpp b/libs/core/async_mpi/include/hpx/async_mpi/transform_mpi.hpp index 7bbc296912e..388e3142b55 100644 --- a/libs/core/async_mpi/include/hpx/async_mpi/transform_mpi.hpp +++ b/libs/core/async_mpi/include/hpx/async_mpi/transform_mpi.hpp @@ -158,8 +158,7 @@ namespace hpx::mpi::experimental { using type = hpx::execution::experimental::set_value_t(T); }; - template - struct set_value_void_checked + template struct set_value_void_checked { using type = hpx::execution::experimental::set_value_t(); }; diff --git a/libs/core/async_sycl/include/hpx/async_sycl/sycl_executor.hpp b/libs/core/async_sycl/include/hpx/async_sycl/sycl_executor.hpp index 90af419d6eb..f9b7b676af4 100644 --- a/libs/core/async_sycl/include/hpx/async_sycl/sycl_executor.hpp +++ b/libs/core/async_sycl/include/hpx/async_sycl/sycl_executor.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Gregor Daiß +// Copyright (c) 2022 Gregor Dai // Copyright (c) 2024-2025 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 @@ -241,15 +241,13 @@ namespace hpx::sycl::experimental { namespace hpx::execution::experimental { /// \cond NOINTERNAL - template <> - struct is_one_way_executor + template <> struct is_one_way_executor : std::true_type { // support for fire and forget without returning a waitable/future }; - template <> - struct is_two_way_executor + template <> struct is_two_way_executor : std::true_type { // support for a waitable/future diff --git a/libs/core/checkpoint_base/include/hpx/checkpoint_base/checkpoint_data.hpp b/libs/core/checkpoint_base/include/hpx/checkpoint_base/checkpoint_data.hpp index 6eef78ff0c3..a352726527a 100644 --- a/libs/core/checkpoint_base/include/hpx/checkpoint_base/checkpoint_data.hpp +++ b/libs/core/checkpoint_base/include/hpx/checkpoint_base/checkpoint_data.hpp @@ -123,8 +123,7 @@ namespace hpx::util { // This is explicitly instantiated to ensure that the id is stable across // shared libraries. - template <> - struct extra_data_helper + template <> struct extra_data_helper { HPX_CORE_EXPORT static extra_data_id_type id() noexcept; static constexpr void reset(checkpointing_tag*) noexcept {} diff --git a/libs/core/compute_local/include/hpx/compute_local/detail/get_proxy_type.hpp b/libs/core/compute_local/include/hpx/compute_local/detail/get_proxy_type.hpp index 954acde05f3..14a9d209273 100644 --- a/libs/core/compute_local/include/hpx/compute_local/detail/get_proxy_type.hpp +++ b/libs/core/compute_local/include/hpx/compute_local/detail/get_proxy_type.hpp @@ -20,8 +20,7 @@ namespace hpx::compute::detail { using type = T; }; - HPX_CXX_CORE_EXPORT template - struct get_proxy_type_impl struct get_proxy_type_impl::proxy_type>> { using proxy_type = typename std::decay_t::proxy_type; diff --git a/libs/core/compute_local/include/hpx/compute_local/host/block_executor.hpp b/libs/core/compute_local/include/hpx/compute_local/host/block_executor.hpp index 4e71e108e28..2ea31e2dd1a 100644 --- a/libs/core/compute_local/include/hpx/compute_local/host/block_executor.hpp +++ b/libs/core/compute_local/include/hpx/compute_local/host/block_executor.hpp @@ -342,39 +342,33 @@ namespace hpx::compute::host { namespace hpx::execution::experimental { - HPX_CXX_CORE_EXPORT template - struct executor_execution_category> + template struct executor_execution_category> { using type = hpx::execution::parallel_execution_tag; }; - HPX_CXX_CORE_EXPORT template - struct is_never_blocking_one_way_executor< + template struct is_never_blocking_one_way_executor< compute::host::block_executor> : is_never_blocking_one_way_executor { }; - HPX_CXX_CORE_EXPORT template - struct is_one_way_executor> + template struct is_one_way_executor> : is_one_way_executor { }; - HPX_CXX_CORE_EXPORT template - struct is_two_way_executor> + template struct is_two_way_executor> : is_two_way_executor { }; - HPX_CXX_CORE_EXPORT template - struct is_bulk_one_way_executor> + template struct is_bulk_one_way_executor> : is_bulk_one_way_executor { }; - HPX_CXX_CORE_EXPORT template - struct is_bulk_two_way_executor> + template struct is_bulk_two_way_executor> : is_bulk_two_way_executor { }; diff --git a/libs/core/compute_local/include/hpx/compute_local/host/block_fork_join_executor.hpp b/libs/core/compute_local/include/hpx/compute_local/host/block_fork_join_executor.hpp index fae7d4f171e..3365a0bc861 100644 --- a/libs/core/compute_local/include/hpx/compute_local/host/block_fork_join_executor.hpp +++ b/libs/core/compute_local/include/hpx/compute_local/host/block_fork_join_executor.hpp @@ -368,13 +368,11 @@ namespace hpx::execution::experimental { }; /// \cond NOINTERNAL - template <> - struct is_bulk_one_way_executor : std::true_type + template <> struct is_bulk_one_way_executor : std::true_type { }; - template <> - struct is_bulk_two_way_executor : std::true_type + template <> struct is_bulk_two_way_executor : std::true_type { }; /// \endcond diff --git a/libs/core/compute_local/include/hpx/compute_local/host/numa_binding_allocator.hpp b/libs/core/compute_local/include/hpx/compute_local/host/numa_binding_allocator.hpp index 0eaf74001fc..4a05f69d36d 100644 --- a/libs/core/compute_local/include/hpx/compute_local/host/numa_binding_allocator.hpp +++ b/libs/core/compute_local/include/hpx/compute_local/host/numa_binding_allocator.hpp @@ -50,8 +50,7 @@ namespace hpx::execution::experimental { { }; - template <> - struct HPX_EXPORT pool_numa_hint + template <> struct HPX_EXPORT pool_numa_hint { // The call operator () must return an int type // The arguments must be const ref versions of the equivalent task arguments diff --git a/libs/core/compute_local/include/hpx/compute_local/host/traits/access_target.hpp b/libs/core/compute_local/include/hpx/compute_local/host/traits/access_target.hpp index e308c1e9ddd..5a30753e352 100644 --- a/libs/core/compute_local/include/hpx/compute_local/host/traits/access_target.hpp +++ b/libs/core/compute_local/include/hpx/compute_local/host/traits/access_target.hpp @@ -16,8 +16,7 @@ namespace hpx::compute::traits { - template <> - struct access_target + template <> struct access_target { using target_type = host::target; @@ -34,8 +33,7 @@ namespace hpx::compute::traits { } }; - template <> - struct access_target> + template <> struct access_target> { using target_type = std::vector; diff --git a/libs/core/compute_local/include/hpx/compute_local/traits/allocator_traits.hpp b/libs/core/compute_local/include/hpx/compute_local/traits/allocator_traits.hpp index 47bb0b475c6..9b3995a5d15 100644 --- a/libs/core/compute_local/include/hpx/compute_local/traits/allocator_traits.hpp +++ b/libs/core/compute_local/include/hpx/compute_local/traits/allocator_traits.hpp @@ -32,8 +32,7 @@ namespace hpx::compute::traits { using type = compute::traits::access_target; }; - HPX_CXX_CORE_EXPORT template - struct get_target_traits struct get_target_traits> { using type = @@ -51,8 +50,7 @@ namespace hpx::compute::traits { }; #endif - HPX_CXX_CORE_EXPORT template - struct get_reference_type struct get_reference_type> { using type = typename Allocator::reference; @@ -70,8 +68,7 @@ namespace hpx::compute::traits { }; #endif - HPX_CXX_CORE_EXPORT template - struct get_const_reference_type struct get_const_reference_type> { using type = typename Allocator::const_reference; @@ -84,8 +81,7 @@ namespace hpx::compute::traits { using type = compute::host::target; }; - HPX_CXX_CORE_EXPORT template - struct target_helper_result struct target_helper_result> { using type = decltype(std::declval().target()); diff --git a/libs/core/concepts/include/hpx/concepts/has_member_xxx.hpp b/libs/core/concepts/include/hpx/concepts/has_member_xxx.hpp index 79a72e9d680..d4867eeec0e 100644 --- a/libs/core/concepts/include/hpx/concepts/has_member_xxx.hpp +++ b/libs/core/concepts/include/hpx/concepts/has_member_xxx.hpp @@ -43,7 +43,7 @@ { \ }; \ \ - Prefix template \ + template \ struct impl>::Member>> \ : std::false_type \ @@ -57,7 +57,7 @@ { \ }; \ \ - Prefix template \ + template \ struct HPX_PP_CAT(has_, Member)>> \ : HPX_PP_CAT(HPX_PP_CAT(has_, Member), _detail)::impl \ { \ diff --git a/libs/core/concepts/include/hpx/concepts/has_xxx.hpp b/libs/core/concepts/include/hpx/concepts/has_xxx.hpp index a0c28599b40..093c9dd52bd 100644 --- a/libs/core/concepts/include/hpx/concepts/has_xxx.hpp +++ b/libs/core/concepts/include/hpx/concepts/has_xxx.hpp @@ -23,7 +23,7 @@ { \ }; \ \ - Prefix template \ + template \ struct HPX_PP_CAT(has_, Name)> \ : std::true_type \ { \ diff --git a/libs/core/concurrency/include/hpx/concurrency/cache_line_data.hpp b/libs/core/concurrency/include/hpx/concurrency/cache_line_data.hpp index 38fac827a13..1baa42d83d5 100644 --- a/libs/core/concurrency/include/hpx/concurrency/cache_line_data.hpp +++ b/libs/core/concurrency/include/hpx/concurrency/cache_line_data.hpp @@ -84,8 +84,7 @@ namespace hpx::util { sizeof(Data))]; }; - HPX_CXX_CORE_EXPORT template - struct cache_aligned_data + template struct cache_aligned_data { constexpr cache_aligned_data() noexcept( std::is_nothrow_default_constructible_v) @@ -133,8 +132,7 @@ namespace hpx::util { sizeof(Data))]; }; - HPX_CXX_CORE_EXPORT template - struct cache_aligned_data_derived : Data + template struct cache_aligned_data_derived : Data { constexpr cache_aligned_data_derived() noexcept( std::is_nothrow_default_constructible_v) diff --git a/libs/core/concurrency/include/hpx/concurrency/concurrentqueue.hpp b/libs/core/concurrency/include/hpx/concurrency/concurrentqueue.hpp index a3e43fe90b2..c050fb2b7ec 100644 --- a/libs/core/concurrency/include/hpx/concurrency/concurrentqueue.hpp +++ b/libs/core/concurrency/include/hpx/concurrency/concurrentqueue.hpp @@ -128,10 +128,10 @@ namespace hpx::concurrency::details { inline thread_id_t thread_id() { return std::this_thread::get_id(); } template struct thread_id_size { }; - template<> struct thread_id_size<4> { typedef std::uint32_t numeric_t; }; - template<> struct thread_id_size<8> { typedef std::uint64_t numeric_t; }; + template <> struct thread_id_size<4> { typedef std::uint32_t numeric_t; }; + template <> struct thread_id_size<8> { typedef std::uint64_t numeric_t; }; - template<> struct thread_id_converter { + template <> struct thread_id_converter { typedef thread_id_size::numeric_t thread_id_numeric_size_t; #if !defined(__APPLE__) typedef std::size_t thread_id_hash_t; @@ -402,7 +402,7 @@ namespace details return h ^ (h >> 16); } }; - template<> struct _hash_32_or_64<1> { + template <> struct _hash_32_or_64<1> { static inline std::uint64_t hash(std::uint64_t h) { h ^= h >> 33; @@ -483,8 +483,7 @@ namespace details } }; - template<> - struct nomove_if + template <> struct nomove_if { template static inline auto eval(U&& x) @@ -572,14 +571,14 @@ namespace details #endif template struct static_is_lock_free_num { enum { value = 0 }; }; - template<> struct static_is_lock_free_num { enum { value = ATOMIC_CHAR_LOCK_FREE }; }; - template<> struct static_is_lock_free_num { enum { value = ATOMIC_SHORT_LOCK_FREE }; }; - template<> struct static_is_lock_free_num { enum { value = ATOMIC_INT_LOCK_FREE }; }; - template<> struct static_is_lock_free_num { enum { value = ATOMIC_LONG_LOCK_FREE }; }; - template<> struct static_is_lock_free_num { enum { value = ATOMIC_LLONG_LOCK_FREE }; }; + template <> struct static_is_lock_free_num { enum { value = ATOMIC_CHAR_LOCK_FREE }; }; + template <> struct static_is_lock_free_num { enum { value = ATOMIC_SHORT_LOCK_FREE }; }; + template <> struct static_is_lock_free_num { enum { value = ATOMIC_INT_LOCK_FREE }; }; + template <> struct static_is_lock_free_num { enum { value = ATOMIC_LONG_LOCK_FREE }; }; + template <> struct static_is_lock_free_num { enum { value = ATOMIC_LLONG_LOCK_FREE }; }; template struct static_is_lock_free : static_is_lock_free_num::type> { }; - template<> struct static_is_lock_free { enum { value = ATOMIC_BOOL_LOCK_FREE }; }; - template struct static_is_lock_free { enum { value = ATOMIC_POINTER_LOCK_FREE }; }; + template <> struct static_is_lock_free { enum { value = ATOMIC_BOOL_LOCK_FREE }; }; + template struct static_is_lock_free { enum { value = ATOMIC_POINTER_LOCK_FREE }; }; } diff --git a/libs/core/concurrency/include/hpx/concurrency/detail/contiguous_index_queue.hpp b/libs/core/concurrency/include/hpx/concurrency/detail/contiguous_index_queue.hpp index 468700896bc..b7db5d2f9c5 100644 --- a/libs/core/concurrency/include/hpx/concurrency/detail/contiguous_index_queue.hpp +++ b/libs/core/concurrency/include/hpx/concurrency/detail/contiguous_index_queue.hpp @@ -27,14 +27,12 @@ namespace hpx::concurrency::detail { HPX_CXX_CORE_EXPORT template struct opposite_end; - template <> - struct opposite_end + template <> struct opposite_end { static constexpr queue_end value = queue_end::right; }; - template <> - struct opposite_end + template <> struct opposite_end { static constexpr queue_end value = queue_end::left; }; diff --git a/libs/core/concurrency/include/hpx/concurrency/detail/tagged_ptr_pair.hpp b/libs/core/concurrency/include/hpx/concurrency/detail/tagged_ptr_pair.hpp index 79469c1d9b5..3ab438928d4 100644 --- a/libs/core/concurrency/include/hpx/concurrency/detail/tagged_ptr_pair.hpp +++ b/libs/core/concurrency/include/hpx/concurrency/detail/tagged_ptr_pair.hpp @@ -57,14 +57,12 @@ namespace hpx::lockfree { template struct ptr_mask; // intentionally left unimplemented - template <> - struct ptr_mask<4> + template <> struct ptr_mask<4> { static constexpr std::uint32_t value = 0xffffffff; }; - template <> - struct ptr_mask<8> + template <> struct ptr_mask<8> { static constexpr std::uint64_t value = 0xffffffffffff; }; diff --git a/libs/core/coroutines/include/hpx/coroutines/thread_id_type.hpp b/libs/core/coroutines/include/hpx/coroutines/thread_id_type.hpp index 07bbf271a3b..2411cb276b1 100644 --- a/libs/core/coroutines/include/hpx/coroutines/thread_id_type.hpp +++ b/libs/core/coroutines/include/hpx/coroutines/thread_id_type.hpp @@ -388,8 +388,7 @@ namespace hpx::threads { namespace std { - template <> - struct hash<::hpx::threads::thread_id> + template <> struct hash<::hpx::threads::thread_id> { std::size_t operator()( ::hpx::threads::thread_id const& v) const noexcept @@ -399,8 +398,7 @@ namespace std { } }; - template <> - struct hash<::hpx::threads::thread_id_ref> + template <> struct hash<::hpx::threads::thread_id_ref> { std::size_t operator()( ::hpx::threads::thread_id_ref const& v) const noexcept diff --git a/libs/core/datastructures/include/hpx/datastructures/any.hpp b/libs/core/datastructures/include/hpx/datastructures/any.hpp index f910903092a..152d4cbbbbb 100644 --- a/libs/core/datastructures/include/hpx/datastructures/any.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/any.hpp @@ -89,8 +89,7 @@ namespace hpx::util::detail::any { typename Copyable> struct fxn_ptr_table; - template <> - struct fxn_ptr_table + template <> struct fxn_ptr_table { fxn_ptr_table() = default; @@ -110,8 +109,7 @@ namespace hpx::util::detail::any { void (*copy)(void* const*, void**) = nullptr; }; - template <> - struct fxn_ptr_table + template <> struct fxn_ptr_table { fxn_ptr_table() = default; @@ -130,8 +128,7 @@ namespace hpx::util::detail::any { }; //////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct fxn_ptr_table + template struct fxn_ptr_table : fxn_ptr_table { fxn_ptr_table() = default; @@ -158,28 +155,23 @@ namespace hpx::util::detail::any { struct streaming_base; // no streaming support - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { }; - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { }; - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { }; - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { }; // streaming support is enabled - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { template static std::basic_istream& stream_in( @@ -198,8 +190,7 @@ namespace hpx::util::detail::any { } }; - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { template static std::basic_istream& stream_in( @@ -218,8 +209,7 @@ namespace hpx::util::detail::any { } }; - HPX_CXX_CORE_EXPORT template - struct streaming_base + template struct streaming_base { template static std::basic_istream& stream_in( @@ -241,8 +231,7 @@ namespace hpx::util::detail::any { HPX_CXX_CORE_EXPORT template struct fxns; - template <> - struct fxns + template <> struct fxns { template struct type : public streaming_base @@ -300,8 +289,7 @@ namespace hpx::util::detail::any { }; // static functions for big value-types (bigger than a void*) - template <> - struct fxns + template <> struct fxns { template struct type : public streaming_base @@ -358,8 +346,7 @@ namespace hpx::util::detail::any { //////////////////////////////////////////////////////////////////////// // static functions for small value-types (unique_any) - template <> - struct fxns + template <> struct fxns { template struct type : public streaming_base @@ -407,8 +394,7 @@ namespace hpx::util::detail::any { }; // static functions for big value-types (bigger than a void*, unique) - template <> - struct fxns + template <> struct fxns { template struct type : public streaming_base @@ -459,8 +445,7 @@ namespace hpx::util::detail::any { typename Vtable, typename Char, typename Copyable> struct fxn_ptr; - HPX_CXX_CORE_EXPORT template - struct fxn_ptr + template struct fxn_ptr : fxn_ptr_table { using base_type = fxn_ptr_table; @@ -482,8 +467,7 @@ namespace hpx::util::detail::any { } }; - HPX_CXX_CORE_EXPORT template - struct fxn_ptr + template struct fxn_ptr : fxn_ptr_table { using base_type = fxn_ptr_table; @@ -507,8 +491,7 @@ namespace hpx::util::detail::any { } }; - HPX_CXX_CORE_EXPORT template - struct fxn_ptr + template struct fxn_ptr : fxn_ptr_table { using base_type = fxn_ptr_table; @@ -528,8 +511,7 @@ namespace hpx::util::detail::any { } }; - HPX_CXX_CORE_EXPORT template - struct fxn_ptr + template struct fxn_ptr : fxn_ptr_table { using base_type = fxn_ptr_table; @@ -629,8 +611,8 @@ namespace hpx::util::detail::any { } // helper types allowing to access internal data of basic_any - struct stream_support; - struct any_cast_support; + HPX_CXX_CORE_EXPORT struct stream_support; + HPX_CXX_CORE_EXPORT struct any_cast_support; } // namespace hpx::util::detail::any namespace hpx::util { @@ -643,8 +625,7 @@ namespace hpx::util { //////////////////////////////////////////////////////////////////////////// // specialization for copyable any without streaming and without // serialization - template <> - class basic_any + template <> class basic_any { public: // constructors @@ -1030,8 +1011,7 @@ namespace hpx::util { //////////////////////////////////////////////////////////////////////////// // specialization for unique_any without streaming and without // serialization - template <> - class basic_any + template <> class basic_any { public: // constructors diff --git a/libs/core/datastructures/include/hpx/datastructures/detail/flat_map.hpp b/libs/core/datastructures/include/hpx/datastructures/detail/flat_map.hpp index 0ba0c8c75ba..93316b9eaab 100644 --- a/libs/core/datastructures/include/hpx/datastructures/detail/flat_map.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/detail/flat_map.hpp @@ -343,8 +343,7 @@ namespace hpx::detail { struct has_begin_end : std::false_type { }; - template - struct has_begin_end struct has_begin_end())), decltype(std::end(std::declval()))>> : std::true_type { diff --git a/libs/core/datastructures/include/hpx/datastructures/detail/flat_set.hpp b/libs/core/datastructures/include/hpx/datastructures/detail/flat_set.hpp index 730d3e949ab..d39881c022c 100644 --- a/libs/core/datastructures/include/hpx/datastructures/detail/flat_set.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/detail/flat_set.hpp @@ -223,8 +223,7 @@ namespace hpx::detail { struct has_begin_end : std::false_type { }; - template - struct has_begin_end struct has_begin_end())), decltype(std::end(std::declval()))>> : std::true_type { diff --git a/libs/core/datastructures/include/hpx/datastructures/detail/variant.hpp b/libs/core/datastructures/include/hpx/datastructures/detail/variant.hpp index 0007f04edf1..5a1d84c4588 100644 --- a/libs/core/datastructures/include/hpx/datastructures/detail/variant.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/detail/variant.hpp @@ -81,8 +81,7 @@ namespace std { template struct variant_size; template struct variant_size; - template - struct variant_size>; + template struct variant_size>; template struct variant_alternative; // undefined @@ -93,8 +92,7 @@ namespace std { template struct variant_alternative; template struct variant_alternative; - template - struct variant_alternative>; + template struct variant_alternative>; constexpr size_t variant_npos = -1; @@ -419,8 +417,7 @@ namespace hpx::variant_ns::lib { HPX_CXX_CORE_EXPORT template struct make_index_sequence_concat; - HPX_CXX_CORE_EXPORT template - struct make_index_sequence_concat, + template struct make_index_sequence_concat, index_sequence> : identity> {}; @@ -435,11 +432,9 @@ namespace hpx::variant_ns::lib { : make_index_sequence_concat, make_index_sequence> {}; - template <> - struct make_index_sequence_impl<0> : identity> {}; + template <> struct make_index_sequence_impl<0> : identity> {}; - template <> - struct make_index_sequence_impl<1> : identity> {}; + template <> struct make_index_sequence_impl<1> : identity> {}; HPX_CXX_CORE_EXPORT template using index_sequence_for = make_index_sequence; @@ -544,8 +539,7 @@ namespace hpx::variant_ns::lib { noexcept(swap(std::declval(), std::declval())); }; - HPX_CXX_CORE_EXPORT template - struct is_nothrow_swappable : std::false_type {}; + template struct is_nothrow_swappable : std::false_type {}; } @@ -561,50 +555,43 @@ namespace hpx::variant_ns::lib { HPX_CXX_CORE_EXPORT template struct is_reference_wrapper : std::false_type {}; - HPX_CXX_CORE_EXPORT template - struct is_reference_wrapper> + template struct is_reference_wrapper> : std::true_type {}; HPX_CXX_CORE_EXPORT template struct Invoke; - template <> - struct Invoke { + template <> struct Invoke { template inline static constexpr auto invoke(R T::*pmf, Arg &&arg, Args &&... args) HPX_VARIANT_RETURN((lib::forward(arg).*pmf)(lib::forward(args)...)) }; - template <> - struct Invoke { + template <> struct Invoke { template inline static constexpr auto invoke(R T::*pmf, Arg &&arg, Args &&... args) HPX_VARIANT_RETURN((lib::forward(arg).get().*pmf)(lib::forward(args)...)) }; - template <> - struct Invoke { + template <> struct Invoke { template inline static constexpr auto invoke(R T::*pmf, Arg &&arg, Args &&... args) HPX_VARIANT_RETURN(((*lib::forward(arg)).*pmf)(lib::forward(args)...)) }; - template <> - struct Invoke { + template <> struct Invoke { template inline static constexpr auto invoke(R T::*pmo, Arg &&arg) HPX_VARIANT_RETURN(lib::forward(arg).*pmo) }; - template <> - struct Invoke { + template <> struct Invoke { template inline static constexpr auto invoke(R T::*pmo, Arg &&arg) HPX_VARIANT_RETURN(lib::forward(arg).get().*pmo) }; - template <> - struct Invoke { + template <> struct Invoke { template inline static constexpr auto invoke(R T::*pmo, Arg &&arg) HPX_VARIANT_RETURN((*lib::forward(arg)).*pmo) @@ -644,8 +631,7 @@ namespace hpx::variant_ns::lib { HPX_CXX_CORE_EXPORT template struct invoke_result {}; - HPX_CXX_CORE_EXPORT template - struct invoke_result struct invoke_result(), std::declval()...))>, F, Args...> @@ -665,15 +651,13 @@ namespace hpx::variant_ns::lib { HPX_CXX_CORE_EXPORT template struct is_invocable : std::false_type {}; - HPX_CXX_CORE_EXPORT template - struct is_invocable>, F, Args...> + template struct is_invocable>, F, Args...> : std::true_type {}; HPX_CXX_CORE_EXPORT template struct is_invocable_r : std::false_type {}; - HPX_CXX_CORE_EXPORT template - struct is_invocable_r>, + template struct is_invocable_r>, R, F, Args...> @@ -695,8 +679,7 @@ namespace hpx::variant_ns::lib { noexcept(lib::invoke(std::declval(), std::declval()...)); }; - HPX_CXX_CORE_EXPORT template - struct is_nothrow_invocable : std::false_type {}; + template struct is_nothrow_invocable : std::false_type {}; HPX_CXX_CORE_EXPORT template struct is_nothrow_invocable_r { @@ -709,8 +692,7 @@ namespace hpx::variant_ns::lib { static constexpr bool value = noexcept(impl()); }; - HPX_CXX_CORE_EXPORT template - struct is_nothrow_invocable_r : std::false_type {}; + template struct is_nothrow_invocable_r : std::false_type {}; } // namespace detail @@ -778,8 +760,7 @@ namespace hpx::variant_ns::lib { HPX_CXX_CORE_EXPORT template struct remove_all_extents : identity {}; - HPX_CXX_CORE_EXPORT template - struct remove_all_extents> : remove_all_extents {}; + template struct remove_all_extents> : remove_all_extents {}; HPX_CXX_CORE_EXPORT template using remove_all_extents_t = typename remove_all_extents::type; @@ -804,8 +785,7 @@ namespace hpx::variant_ns::lib { template struct set; - template - struct set> : indexed_type... {}; + template struct set> : indexed_type... {}; template inline static std::enable_if impl(indexed_type); @@ -855,8 +835,7 @@ namespace hpx::variant_ns::lib { HPX_CXX_CORE_EXPORT template using push_back_t = typename push_back::type; - HPX_CXX_CORE_EXPORT template - struct push_back, J> { + template struct push_back, J> { using type = index_sequence; }; @@ -922,17 +901,13 @@ namespace hpx::variant_ns { constexpr std::size_t variant_size_v = variant_size::value; #endif - HPX_CXX_CORE_EXPORT template - struct variant_size : variant_size {}; + template struct variant_size : variant_size {}; - HPX_CXX_CORE_EXPORT template - struct variant_size : variant_size {}; + template struct variant_size : variant_size {}; - HPX_CXX_CORE_EXPORT template - struct variant_size : variant_size {}; + template struct variant_size : variant_size {}; - HPX_CXX_CORE_EXPORT template - struct variant_size> : lib::size_constant {}; + template struct variant_size> : lib::size_constant {}; HPX_CXX_CORE_EXPORT template struct variant_alternative; @@ -940,20 +915,16 @@ namespace hpx::variant_ns { HPX_CXX_CORE_EXPORT template using variant_alternative_t = typename variant_alternative::type; - HPX_CXX_CORE_EXPORT template - struct variant_alternative + template struct variant_alternative : std::add_const> {}; - HPX_CXX_CORE_EXPORT template - struct variant_alternative + template struct variant_alternative : std::add_volatile> {}; - HPX_CXX_CORE_EXPORT template - struct variant_alternative + template struct variant_alternative : std::add_cv> {}; - HPX_CXX_CORE_EXPORT template - struct variant_alternative> { + template struct variant_alternative> { static_assert(I < sizeof...(Ts), "index out of bounds in `std::variant_alternative<>`"); using type = lib::type_pack_element_t; @@ -1118,8 +1089,7 @@ namespace hpx::variant_ns { AUTO_REFREF_RETURN(get_alt_impl{}(lib::forward(v).tail_)) }; - template - struct get_alt_impl<0, Dummy> { + template struct get_alt_impl<0, Dummy> { template inline constexpr AUTO_REFREF operator()(V &&v) const AUTO_REFREF_RETURN(lib::forward(v).head_) @@ -1188,8 +1158,7 @@ namespace hpx::variant_ns { template struct dispatcher; - template - struct dispatcher { + template struct dispatcher { template HPX_VARIANT_ALWAYS_INLINE static constexpr R dispatch( F &&, typename ITs::type &&..., Vs &&...) { @@ -1209,8 +1178,7 @@ namespace hpx::variant_ns { } }; - template - struct dispatcher { + template struct dispatcher { template HPX_VARIANT_ALWAYS_INLINE static constexpr R dispatch( F &&f, typename ITs::type &&... visited_vs) { @@ -1402,14 +1370,12 @@ namespace hpx::variant_ns { template struct impl; - template - struct impl> { + template struct impl> { inline constexpr AUTO operator()() const AUTO_RETURN(&dispatch) }; - template - struct impl, Ls...> { + template struct impl, Ls...> { inline constexpr AUTO operator()() const AUTO_RETURN( make_farray(impl, Ls...>{}()...)) @@ -1649,8 +1615,7 @@ namespace hpx::variant_ns { HPX_CXX_CORE_EXPORT template union recursive_union; - HPX_CXX_CORE_EXPORT template - union recursive_union {}; + template union recursive_union {}; #define HPX_VARIANT_VARIANT_RECURSIVE_UNION(destructible_trait, destructor) \ HPX_CXX_CORE_EXPORT template \ @@ -2201,8 +2166,7 @@ namespace hpx::variant_ns { template struct impl; - template - struct impl> : overload_leaf... {}; + template struct impl> : overload_leaf... {}; public: using type = impl>; @@ -2217,14 +2181,12 @@ namespace hpx::variant_ns { HPX_CXX_CORE_EXPORT template struct is_in_place_index : std::false_type {}; - HPX_CXX_CORE_EXPORT template - struct is_in_place_index> : std::true_type {}; + template struct is_in_place_index> : std::true_type {}; HPX_CXX_CORE_EXPORT template struct is_in_place_type : std::false_type {}; - HPX_CXX_CORE_EXPORT template - struct is_in_place_type> : std::true_type {}; + template struct is_in_place_type> : std::true_type {}; } // detail @@ -2784,8 +2746,7 @@ namespace hpx::variant_ns { namespace std { - template - struct hash struct hash, hpx::variant_ns::lib::enable_if_t< hpx::variant_ns::lib::all< @@ -2833,8 +2794,7 @@ namespace std { } }; - template <> - struct hash { + template <> struct hash { using argument_type = hpx::variant_ns::monostate; using result_type = std::size_t; diff --git a/libs/core/datastructures/include/hpx/datastructures/member_pack.hpp b/libs/core/datastructures/include/hpx/datastructures/member_pack.hpp index f8f559e918d..5dc5931d15e 100644 --- a/libs/core/datastructures/include/hpx/datastructures/member_pack.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/member_pack.hpp @@ -64,8 +64,7 @@ namespace hpx::util { } }; - template - struct member_leaf : T + template struct member_leaf : T { member_leaf() = default; @@ -111,8 +110,7 @@ namespace hpx::util { HPX_CXX_CORE_EXPORT template struct HPX_EMPTY_BASES member_pack; - HPX_CXX_CORE_EXPORT template - struct HPX_EMPTY_BASES member_pack, Ts...> + template struct HPX_EMPTY_BASES member_pack, Ts...> : detail::member_leaf... { member_pack() = default; diff --git a/libs/core/datastructures/include/hpx/datastructures/serialization/serializable_any.hpp b/libs/core/datastructures/include/hpx/datastructures/serialization/serializable_any.hpp index 6851d5b1b0c..9302821aeec 100644 --- a/libs/core/datastructures/include/hpx/datastructures/serialization/serializable_any.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/serialization/serializable_any.hpp @@ -45,7 +45,7 @@ namespace hpx::util::detail::any { //////////////////////////////////////////////////////////////////////////// // serializable function pointer table - HPX_CXX_CORE_EXPORT template + template requires(!std::is_void_v && !std::is_void_v) struct fxn_ptr_table { @@ -83,9 +83,8 @@ namespace hpx::util::detail::any { }; //////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - struct fxn_ptr + template struct fxn_ptr : fxn_ptr_table { using base_type = fxn_ptr_table; @@ -134,8 +133,7 @@ namespace hpx::util::detail::any { namespace hpx::util { //////////////////////////////////////////////////////////////////////////// - HPX_CXX_CORE_EXPORT template - class basic_any + template class basic_any { public: // constructors diff --git a/libs/core/datastructures/include/hpx/datastructures/serialization/tuple.hpp b/libs/core/datastructures/include/hpx/datastructures/serialization/tuple.hpp index 8fe2fbf1231..d43ffa44cb6 100644 --- a/libs/core/datastructures/include/hpx/datastructures/serialization/tuple.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/serialization/tuple.hpp @@ -20,15 +20,13 @@ namespace hpx::traits { - HPX_CXX_CORE_EXPORT template - struct is_bitwise_serializable<::hpx::tuple> + template struct is_bitwise_serializable<::hpx::tuple> : ::hpx::util::all_of< hpx::traits::is_bitwise_serializable>...> { }; - HPX_CXX_CORE_EXPORT template - struct is_not_bitwise_serializable<::hpx::tuple> + template struct is_not_bitwise_serializable<::hpx::tuple> : std::integral_constant>> { @@ -46,9 +44,8 @@ namespace hpx::util::detail { HPX_CXX_CORE_EXPORT template struct save_construct_data_with_index_pack; - HPX_CXX_CORE_EXPORT template - struct serialize_with_index_pack, + template struct serialize_with_index_pack, Ts...> { template @@ -65,9 +62,8 @@ namespace hpx::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct load_construct_data_with_index_pack struct load_construct_data_with_index_pack, Ts...> { template @@ -113,9 +109,8 @@ namespace hpx::util::detail { } }; - HPX_CXX_CORE_EXPORT template - struct save_construct_data_with_index_pack struct save_construct_data_with_index_pack, Ts...> { template diff --git a/libs/core/datastructures/include/hpx/datastructures/traits/is_tuple_like.hpp b/libs/core/datastructures/include/hpx/datastructures/traits/is_tuple_like.hpp index 52d83f49739..33a493df381 100644 --- a/libs/core/datastructures/include/hpx/datastructures/traits/is_tuple_like.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/traits/is_tuple_like.hpp @@ -19,8 +19,7 @@ namespace hpx::traits { { }; - HPX_CXX_CORE_EXPORT template - struct is_tuple_like_impl struct is_tuple_like_impl::value)>> : std::true_type { }; diff --git a/libs/core/datastructures/include/hpx/datastructures/traits/supports_streaming_with_any.hpp b/libs/core/datastructures/include/hpx/datastructures/traits/supports_streaming_with_any.hpp index df41f6b5747..2ed0d221cf7 100644 --- a/libs/core/datastructures/include/hpx/datastructures/traits/supports_streaming_with_any.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/traits/supports_streaming_with_any.hpp @@ -23,8 +23,7 @@ namespace hpx::traits { /////////////////////////////////////////////////////////////////////////// // Customization point for streaming with util::any, we don't want // serialization::serialize_buffer to be streamable - HPX_CXX_CORE_EXPORT template - struct supports_streaming_with_any< + template struct supports_streaming_with_any< serialization::serialize_buffer> : std::false_type { }; diff --git a/libs/core/datastructures/include/hpx/datastructures/tuple.hpp b/libs/core/datastructures/include/hpx/datastructures/tuple.hpp index 63fd4827edd..0761f1b7274 100644 --- a/libs/core/datastructures/include/hpx/datastructures/tuple.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/tuple.hpp @@ -197,13 +197,11 @@ namespace hpx { // Adapt hpx::tuple to be usable with structured binding contexts namespace std { - HPX_CXX_CORE_EXPORT template - struct tuple_size> : hpx::tuple_size> + template struct tuple_size> : hpx::tuple_size> { }; - HPX_CXX_CORE_EXPORT template - struct tuple_element> + template struct tuple_element> : hpx::tuple_element> { }; @@ -237,8 +235,7 @@ namespace hpx { { }; - template - struct are_tuples_compatible_impl, tuple, + template struct are_tuples_compatible_impl, tuple, UTuple, std::enable_if_t>:: value == util::pack::size>> @@ -250,8 +247,7 @@ namespace hpx { template struct are_tuples_compatible; - template - struct are_tuples_compatible, UTuple> + template struct are_tuples_compatible, UTuple> : are_tuples_compatible_impl, hpx::tuple, UTuple> { @@ -268,8 +264,7 @@ namespace hpx { } // namespace detail // 20.4.2, class template tuple - template <> - class tuple<> + template <> class tuple<> { public: // 20.4.2.1, tuple construction @@ -578,42 +573,35 @@ namespace hpx { { }; - HPX_CXX_CORE_EXPORT template - struct tuple_size : tuple_size + template struct tuple_size : tuple_size { }; - HPX_CXX_CORE_EXPORT template - struct tuple_size : tuple_size + template struct tuple_size : tuple_size { }; - HPX_CXX_CORE_EXPORT template - struct tuple_size : tuple_size + template struct tuple_size : tuple_size { }; - HPX_CXX_CORE_EXPORT template - struct tuple_size> + template struct tuple_size> : std::integral_constant { }; - HPX_CXX_CORE_EXPORT template - struct tuple_size> + template struct tuple_size> : std::integral_constant { }; - HPX_CXX_CORE_EXPORT template - struct tuple_size> + template struct tuple_size> : std::integral_constant { }; #if defined(HPX_DATASTRUCTURES_HAVE_ADAPT_STD_TUPLE) - HPX_CXX_CORE_EXPORT template - struct tuple_size> : std::tuple_size> + template struct tuple_size> : std::tuple_size> { }; #endif @@ -628,29 +616,25 @@ namespace hpx { { }; - HPX_CXX_CORE_EXPORT template - struct tuple_element struct tuple_element::type>> : std::add_const::type> { }; - HPX_CXX_CORE_EXPORT template - struct tuple_element struct tuple_element::type>> : std::add_volatile::type> { }; - HPX_CXX_CORE_EXPORT template - struct tuple_element struct tuple_element::type>> : std::add_cv::type> { }; - HPX_CXX_CORE_EXPORT template - struct tuple_element> + template struct tuple_element> { using type = typename util::at_index::type; @@ -667,8 +651,7 @@ namespace hpx { } }; - HPX_CXX_CORE_EXPORT template - struct tuple_element<0, std::pair> + template struct tuple_element<0, std::pair> { using type = T0; @@ -685,8 +668,7 @@ namespace hpx { } }; - HPX_CXX_CORE_EXPORT template - struct tuple_element<1, std::pair> + template struct tuple_element<1, std::pair> { using type = T1; @@ -703,9 +685,8 @@ namespace hpx { } }; - HPX_CXX_CORE_EXPORT template - struct tuple_element> + template struct tuple_element> { using type = Type; @@ -730,8 +711,7 @@ namespace hpx { }; #if defined(HPX_DATASTRUCTURES_HAVE_ADAPT_STD_TUPLE) - HPX_CXX_CORE_EXPORT template - struct tuple_element> + template struct tuple_element> { using type = std::tuple_element_t>; @@ -897,14 +877,12 @@ namespace hpx { template struct tuple_cat_size_impl; - template - struct tuple_cat_size_impl> + template struct tuple_cat_size_impl> : std::integral_constant { }; - template - struct tuple_cat_size_impl> + template struct tuple_cat_size_impl> : tuple_cat_size_impl<(Size + tuple_size::value), util::pack> { @@ -919,8 +897,7 @@ namespace hpx { template struct tuple_cat_element; - template - struct tuple_cat_element, + template struct tuple_cat_element, std::enable_if_t<(I < tuple_size::value)>> : tuple_element { @@ -933,8 +910,7 @@ namespace hpx { } }; - template - struct tuple_cat_element, + template struct tuple_cat_element, std::enable_if_t<(I >= tuple_size::value)>> : tuple_cat_element::value, util::pack> { @@ -954,8 +930,7 @@ namespace hpx { template struct tuple_cat_result_impl; - template - struct tuple_cat_result_impl, + template struct tuple_cat_result_impl, util::pack> { using type = tuple< @@ -1028,8 +1003,7 @@ namespace hpx { } }; - template - struct tuple_equal_to + template struct tuple_equal_to { template static constexpr HPX_HOST_DEVICE HPX_FORCEINLINE bool call( @@ -1081,8 +1055,7 @@ namespace hpx { } }; - template - struct tuple_less_than + template struct tuple_less_than { template static constexpr HPX_HOST_DEVICE HPX_FORCEINLINE bool call( diff --git a/libs/core/debugging/include/hpx/debugging/print.hpp b/libs/core/debugging/include/hpx/debugging/print.hpp index 6fd5bc11e9b..5243091ef9b 100644 --- a/libs/core/debugging/include/hpx/debugging/print.hpp +++ b/libs/core/debugging/include/hpx/debugging/print.hpp @@ -140,8 +140,7 @@ namespace hpx::debug { template struct hex; - template - struct hex>> + template struct hex>> { explicit constexpr hex(T const& v) noexcept : data_(v) @@ -160,8 +159,7 @@ namespace hpx::debug { HPX_CORE_EXPORT void print_ptr(std::ostream& os, void const* v, int n); - template - struct hex>> + template struct hex>> { explicit constexpr hex(T const& v) noexcept : data_(v) @@ -458,8 +456,7 @@ namespace hpx::debug { struct enable_print; // when false, debug statements should produce no code - template <> - struct enable_print + template <> struct enable_print { explicit constexpr enable_print(char const*) noexcept {} @@ -552,8 +549,7 @@ namespace hpx::debug { } // when true, debug statements produce valid output - template <> - struct enable_print + template <> struct enable_print { private: char const* prefix_; diff --git a/libs/core/errors/include/hpx/errors/error.hpp b/libs/core/errors/include/hpx/errors/error.hpp index 5184e9a35d1..ae49e0f02b1 100644 --- a/libs/core/errors/include/hpx/errors/error.hpp +++ b/libs/core/errors/include/hpx/errors/error.hpp @@ -337,14 +337,12 @@ namespace hpx { namespace std { // make sure our errors get recognized by the Boost.System library - template <> - struct is_error_code_enum + template <> struct is_error_code_enum { static constexpr bool value = true; }; - template <> - struct is_error_condition_enum + template <> struct is_error_condition_enum { static constexpr bool value = true; }; diff --git a/libs/core/execution/include/hpx/execution/algorithms/as_sender.hpp b/libs/core/execution/include/hpx/execution/algorithms/as_sender.hpp index 6af425fa6b5..10170b11147 100644 --- a/libs/core/execution/include/hpx/execution/algorithms/as_sender.hpp +++ b/libs/core/execution/include/hpx/execution/algorithms/as_sender.hpp @@ -139,8 +139,7 @@ namespace hpx::execution::experimental { _result_type); }; - template - struct set_value_void_checked + template struct set_value_void_checked { using type = hpx::execution::experimental::set_value_t(); }; @@ -161,8 +160,7 @@ namespace hpx::execution::experimental { using value_types = Variant>; }; - template - struct completion_signatures_base + template struct completion_signatures_base { template