From d63e8e8923716a32ba1285b607ded3ae8c631d20 Mon Sep 17 00:00:00 2001 From: David Bayer Date: Wed, 19 Mar 2025 11:41:46 +0100 Subject: [PATCH 1/3] remove `_CCCL_INLINE_VAR` --- c2h/include/c2h/bfloat16.cuh | 2 +- c2h/include/c2h/half.cuh | 2 +- cub/cub/device/dispatch/dispatch_merge.cuh | 4 +- cub/cub/device/dispatch/kernels/transform.cuh | 2 +- cub/cub/util_type.cuh | 4 +- cub/test/catch2_test_launch_helper.h | 2 +- .../cuda/experimental/__execution/policy.cuh | 4 +- .../__hierarchy/hierarchy_dimensions.cuh | 7 ++- .../__hierarchy/hierarchy_levels.cuh | 10 ++--- .../__utility/basic_any/any_cast.cuh | 6 +-- .../__utility/basic_any/interfaces.cuh | 22 +++++----- .../__utility/basic_any/virtcall.cuh | 4 +- .../__utility/basic_any/virtual_functions.cuh | 16 +++---- .../__utility/select_execution_space.cuh | 2 +- docs/cccl/development/macro.rst | 2 - docs/repo.toml | 1 - .../cuda/__functional/address_stability.h | 2 +- .../cuda/__memory_resource/properties.h | 12 ++--- .../cuda/__memory_resource/resource_ref.h | 2 +- .../cuda/__type_traits/is_floating_point.h | 2 +- libcudacxx/include/cuda/std/__atomic/order.h | 12 ++--- libcudacxx/include/cuda/std/__cccl/dialect.h | 6 +-- .../cuda/std/__concepts/concept_macros.h | 4 +- .../cuda/std/__concepts/destructible.h | 18 ++++---- .../include/cuda/std/__concepts/swappable.h | 8 ++-- .../include/cuda/std/__expected/expected.h | 14 +++--- .../cuda/std/__expected/expected_base.h | 8 ++-- .../include/cuda/std/__expected/unexpected.h | 6 +-- .../__floating_point/conversion_rank_order.h | 6 +-- .../cuda/std/__floating_point/format.h | 2 +- .../include/cuda/std/__floating_point/mask.h | 8 ++-- .../include/cuda/std/__functional/bind.h | 24 +++++----- .../include/cuda/std/__functional/invoke.h | 8 ++-- libcudacxx/include/cuda/std/__fwd/mdspan.h | 4 +- libcudacxx/include/cuda/std/__fwd/span.h | 2 +- .../include/cuda/std/__iterator/concepts.h | 10 ++--- .../std/__iterator/incrementable_traits.h | 8 ++-- .../include/cuda/std/__iterator/iter_swap.h | 4 +- .../cuda/std/__iterator/iterator_traits.h | 14 +++--- .../cuda/std/__iterator/move_iterator.h | 6 +-- .../cuda/std/__iterator/readable_traits.h | 8 ++-- .../cuda/std/__iterator/reverse_iterator.h | 13 +++--- .../include/cuda/std/__mdspan/concepts.h | 4 +- .../cuda/std/__mdspan/submdspan_extents.h | 2 +- .../cuda/std/__mdspan/submdspan_helper.h | 6 +-- .../cuda/std/__memory/allocator_arg_t.h | 2 +- .../cuda/std/__memory/allocator_traits.h | 4 +- .../cuda/std/__memory/uses_allocator.h | 11 +++-- .../include/cuda/std/__ranges/concepts.h | 8 ++-- .../include/cuda/std/__ranges/empty_view.h | 4 +- .../cuda/std/__ranges/enable_borrowed_range.h | 2 +- .../include/cuda/std/__ranges/enable_view.h | 6 +-- .../include/cuda/std/__ranges/owning_view.h | 2 +- .../include/cuda/std/__ranges/ref_view.h | 2 +- libcudacxx/include/cuda/std/__ranges/size.h | 2 +- .../include/cuda/std/__ranges/subrange.h | 2 +- .../include/cuda/std/__tuple_dir/tuple_size.h | 2 +- .../cuda/std/__type_traits/alignment_of.h | 2 +- .../cuda/std/__type_traits/always_false.h | 2 +- .../cuda/std/__type_traits/common_reference.h | 4 +- .../cuda/std/__type_traits/common_type.h | 4 +- .../cuda/std/__type_traits/conjunction.h | 2 +- .../cuda/std/__type_traits/disjunction.h | 2 +- .../include/cuda/std/__type_traits/extent.h | 4 +- .../include/cuda/std/__type_traits/fold.h | 8 ++-- .../has_unique_object_representation.h | 2 +- .../__type_traits/has_virtual_destructor.h | 2 +- .../cuda/std/__type_traits/is_abstract.h | 2 +- .../cuda/std/__type_traits/is_aggregate.h | 2 +- .../cuda/std/__type_traits/is_arithmetic.h | 2 +- .../include/cuda/std/__type_traits/is_array.h | 4 +- .../cuda/std/__type_traits/is_assignable.h | 4 +- .../cuda/std/__type_traits/is_base_of.h | 4 +- .../cuda/std/__type_traits/is_bounded_array.h | 2 +- .../cuda/std/__type_traits/is_callable.h | 2 +- .../include/cuda/std/__type_traits/is_class.h | 4 +- .../cuda/std/__type_traits/is_compound.h | 4 +- .../include/cuda/std/__type_traits/is_const.h | 4 +- .../cuda/std/__type_traits/is_constructible.h | 4 +- .../cuda/std/__type_traits/is_convertible.h | 12 ++--- .../std/__type_traits/is_copy_assignable.h | 2 +- .../std/__type_traits/is_copy_constructible.h | 2 +- .../__type_traits/is_default_constructible.h | 2 +- .../cuda/std/__type_traits/is_destructible.h | 4 +- .../include/cuda/std/__type_traits/is_empty.h | 4 +- .../include/cuda/std/__type_traits/is_enum.h | 4 +- .../__type_traits/is_extended_arithmetic.h | 2 +- .../is_extended_floating_point.h | 20 ++++----- .../include/cuda/std/__type_traits/is_final.h | 4 +- .../std/__type_traits/is_floating_point.h | 2 +- .../cuda/std/__type_traits/is_function.h | 4 +- .../cuda/std/__type_traits/is_fundamental.h | 4 +- .../cuda/std/__type_traits/is_integer.h | 3 +- .../cuda/std/__type_traits/is_integral.h | 4 +- .../cuda/std/__type_traits/is_literal_type.h | 4 +- .../is_member_function_pointer.h | 4 +- .../__type_traits/is_member_object_pointer.h | 4 +- .../std/__type_traits/is_member_pointer.h | 4 +- .../std/__type_traits/is_move_assignable.h | 2 +- .../std/__type_traits/is_move_constructible.h | 2 +- .../std/__type_traits/is_nothrow_assignable.h | 6 +-- .../__type_traits/is_nothrow_constructible.h | 4 +- .../__type_traits/is_nothrow_convertible.h | 2 +- .../is_nothrow_copy_assignable.h | 4 +- .../is_nothrow_copy_constructible.h | 2 +- .../is_nothrow_default_constructible.h | 4 +- .../__type_traits/is_nothrow_destructible.h | 2 +- .../is_nothrow_move_assignable.h | 4 +- .../is_nothrow_move_constructible.h | 2 +- .../cuda/std/__type_traits/is_null_pointer.h | 2 +- .../cuda/std/__type_traits/is_object.h | 4 +- .../include/cuda/std/__type_traits/is_pod.h | 4 +- .../cuda/std/__type_traits/is_pointer.h | 4 +- .../cuda/std/__type_traits/is_polymorphic.h | 4 +- .../std/__type_traits/is_primary_template.h | 8 ++-- .../cuda/std/__type_traits/is_reference.h | 12 ++--- .../include/cuda/std/__type_traits/is_same.h | 6 +-- .../cuda/std/__type_traits/is_scalar.h | 4 +- .../cuda/std/__type_traits/is_scoped_enum.h | 2 +- .../cuda/std/__type_traits/is_signed.h | 4 +- .../std/__type_traits/is_signed_integer.h | 16 +++---- .../std/__type_traits/is_standard_layout.h | 4 +- .../cuda/std/__type_traits/is_swappable.h | 8 ++-- .../cuda/std/__type_traits/is_trivial.h | 4 +- .../__type_traits/is_trivially_assignable.h | 4 +- .../is_trivially_constructible.h | 4 +- .../is_trivially_copy_assignable.h | 4 +- .../is_trivially_copy_constructible.h | 4 +- .../std/__type_traits/is_trivially_copyable.h | 4 +- .../is_trivially_default_constructible.h | 4 +- .../__type_traits/is_trivially_destructible.h | 2 +- .../is_trivially_move_assignable.h | 4 +- .../is_trivially_move_constructible.h | 4 +- .../std/__type_traits/is_unbounded_array.h | 2 +- .../include/cuda/std/__type_traits/is_union.h | 4 +- .../cuda/std/__type_traits/is_unsigned.h | 4 +- .../std/__type_traits/is_unsigned_integer.h | 16 +++---- .../include/cuda/std/__type_traits/is_void.h | 4 +- .../cuda/std/__type_traits/is_volatile.h | 4 +- .../include/cuda/std/__type_traits/negation.h | 2 +- .../include/cuda/std/__type_traits/rank.h | 4 +- .../reference_constructs_from_temporary.h | 5 +-- .../reference_converts_from_temporary.h | 6 +-- .../include/cuda/std/__type_traits/type_set.h | 6 +-- .../include/cuda/std/__utility/in_place.h | 4 +- .../cuda/std/detail/libcxx/include/chrono | 44 +++++++++---------- .../cuda/std/detail/libcxx/include/optional | 22 +++++----- .../cuda/std/detail/libcxx/include/ratio | 12 ++--- .../cuda/std/detail/libcxx/include/span | 16 +++---- .../cuda/std/detail/libcxx/include/variant | 4 +- .../cxx20_iterator_traits.compile.pass.cpp | 5 +-- .../iter_difference_t.compile.pass.cpp | 4 +- .../readable.traits/iter_value_t.pass.cpp | 4 +- .../sized_sentinel_for.compile.pass.cpp | 2 +- .../std/ranges/range.access/begin.pass.cpp | 4 +- .../std/ranges/range.access/data.pass.cpp | 4 +- .../std/ranges/range.access/end.pass.cpp | 4 +- .../std/ranges/range.access/size.pass.cpp | 10 ++--- .../borrowed_range.compile.pass.cpp | 2 +- .../range.utility/range.subrange/types.h | 8 ++-- libcudacxx/test/support/test_iterators.h | 4 +- libcudacxx/test/support/test_range.h | 2 +- thrust/thrust/detail/raw_reference_cast.h | 6 +-- .../type_traits/iterator/is_output_iterator.h | 4 +- .../detail/iterator_facade_category.h | 6 +-- thrust/thrust/iterator/detail/retag.h | 2 +- 166 files changed, 445 insertions(+), 458 deletions(-) diff --git a/c2h/include/c2h/bfloat16.cuh b/c2h/include/c2h/bfloat16.cuh index 42207ae8e11..3c61dd1b187 100644 --- a/c2h/include/c2h/bfloat16.cuh +++ b/c2h/include/c2h/bfloat16.cuh @@ -236,7 +236,7 @@ inline std::ostream& operator<<(std::ostream& out, const __nv_bfloat16& x) namespace cuda { template <> -_CCCL_INLINE_VAR constexpr bool is_floating_point_v = true; +inline constexpr bool is_floating_point_v = true; } template <> diff --git a/c2h/include/c2h/half.cuh b/c2h/include/c2h/half.cuh index f49ec3550f1..07ef03cafdb 100644 --- a/c2h/include/c2h/half.cuh +++ b/c2h/include/c2h/half.cuh @@ -331,7 +331,7 @@ inline std::ostream& operator<<(std::ostream& out, const __half& x) namespace cuda { template <> -_CCCL_INLINE_VAR constexpr bool is_floating_point_v = true; +inline constexpr bool is_floating_point_v = true; } template <> diff --git a/cub/cub/device/dispatch/dispatch_merge.cuh b/cub/cub/device/dispatch/dispatch_merge.cuh index af65a150d99..c50aec4623a 100644 --- a/cub/cub/device/dispatch/dispatch_merge.cuh +++ b/cub/cub/device/dispatch/dispatch_merge.cuh @@ -27,8 +27,8 @@ CUB_NAMESPACE_BEGIN namespace detail::merge { -_CCCL_INLINE_VAR constexpr int fallback_BLOCK_THREADS = 64; -_CCCL_INLINE_VAR constexpr int fallback_ITEMS_PER_THREAD = 1; +inline constexpr int fallback_BLOCK_THREADS = 64; +inline constexpr int fallback_ITEMS_PER_THREAD = 1; template class choose_merge_agent diff --git a/cub/cub/device/dispatch/kernels/transform.cuh b/cub/cub/device/dispatch/kernels/transform.cuh index 7a2b6645473..87a559e2e03 100644 --- a/cub/cub/device/dispatch/kernels/transform.cuh +++ b/cub/cub/device/dispatch/kernels/transform.cuh @@ -402,7 +402,7 @@ _CCCL_HOST_DEVICE auto make_aligned_base_ptr_kernel_arg(It ptr, int alignment) - } template -_CCCL_INLINE_VAR constexpr bool needs_aligned_ptr_v = +inline constexpr bool needs_aligned_ptr_v = false #ifdef _CUB_HAS_TRANSFORM_UBLKCP || Alg == Algorithm::ublkcp diff --git a/cub/cub/util_type.cuh b/cub/cub/util_type.cuh index 9c44f5fb09b..0edb206e880 100644 --- a/cub/cub/util_type.cuh +++ b/cub/cub/util_type.cuh @@ -474,7 +474,7 @@ struct CubVector }; /// The maximum number of elements in CUDA vector types -_CCCL_INLINE_VAR constexpr int MAX_VEC_ELEMENTS = 4; +inline constexpr int MAX_VEC_ELEMENTS = 4; /** * Generic vector-1 type @@ -1104,7 +1104,7 @@ struct is_primitive : is_primitive_impl::is_primitive {}; template -_CCCL_INLINE_VAR constexpr bool is_primitive_v = is_primitive::value; +inline constexpr bool is_primitive_v = is_primitive::value; } // namespace detail #endif // _CCCL_DOXYGEN_INVOKED diff --git a/cub/test/catch2_test_launch_helper.h b/cub/test/catch2_test_launch_helper.h index 5e55f9f54d6..754b495ff70 100644 --- a/cub/test/catch2_test_launch_helper.h +++ b/cub/test/catch2_test_launch_helper.h @@ -91,7 +91,7 @@ #define DECLARE_LAUNCH_WRAPPER(API, WRAPPED_API_NAME) \ DECLARE_INVOCABLE(API, WRAPPED_API_NAME, , ); \ - _CCCL_INLINE_VAR constexpr struct WRAPPED_API_NAME##_t \ + inline constexpr struct WRAPPED_API_NAME##_t \ { \ template \ void operator()(As... args) const \ diff --git a/cudax/include/cuda/experimental/__execution/policy.cuh b/cudax/include/cuda/experimental/__execution/policy.cuh index acaf2937760..de0a8104d85 100644 --- a/cudax/include/cuda/experimental/__execution/policy.cuh +++ b/cudax/include/cuda/experimental/__execution/policy.cuh @@ -53,12 +53,12 @@ _CCCL_GLOBAL_CONSTANT execution_policy unseq_host = execution_policy::unse _CCCL_GLOBAL_CONSTANT execution_policy unseq_device = execution_policy::unsequenced_device; template -_CCCL_INLINE_VAR constexpr bool __is_parallel_execution_policy = +inline constexpr bool __is_parallel_execution_policy = _Policy == execution_policy::parallel_host || _Policy == execution_policy::parallel_device || _Policy == execution_policy::parallel_unsequenced_host || _Policy == execution_policy::parallel_unsequenced_device; template -_CCCL_INLINE_VAR constexpr bool __is_unsequenced_execution_policy = +inline constexpr bool __is_unsequenced_execution_policy = _Policy == execution_policy::unsequenced_host || _Policy == execution_policy::unsequenced_device || _Policy == execution_policy::parallel_unsequenced_host || _Policy == execution_policy::parallel_unsequenced_device; diff --git a/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh b/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh index 6ad343f5b03..3f17b063d42 100644 --- a/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh +++ b/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh @@ -120,11 +120,10 @@ struct get_level_helper } // namespace detail template -_CCCL_INLINE_VAR constexpr bool has_level = - detail::has_level_helper>::value; +inline constexpr bool has_level = detail::has_level_helper>::value; template -_CCCL_INLINE_VAR constexpr bool has_level_or_unit = +inline constexpr bool has_level_or_unit = detail::has_level_helper>::value || detail::has_unit>::value; @@ -138,7 +137,7 @@ struct can_stack_checker }; template -_CCCL_INLINE_VAR constexpr bool __can_stack = +inline constexpr bool __can_stack = can_stack_checker<__level_type_of, __level_type_of...>::template can_stack<__level_type_of..., LUnit>::value; diff --git a/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh b/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh index 77ba7cb7a57..f601c8410d6 100644 --- a/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh +++ b/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh @@ -85,22 +85,22 @@ template using __default_unit_below = typename LevelType::allowed_below::default_unit; template -_CCCL_INLINE_VAR constexpr bool is_level_allowed = false; +inline constexpr bool is_level_allowed = false; template -_CCCL_INLINE_VAR constexpr bool is_level_allowed> = +inline constexpr bool is_level_allowed> = ::cuda::std::disjunction_v<::cuda::std::is_same...>; template -_CCCL_INLINE_VAR constexpr bool can_rhs_stack_on_lhs = +inline constexpr bool can_rhs_stack_on_lhs = is_level_allowed || is_level_allowed; template -_CCCL_INLINE_VAR constexpr bool legal_unit_for_level = +inline constexpr bool legal_unit_for_level = can_rhs_stack_on_lhs || legal_unit_for_level>; template -_CCCL_INLINE_VAR constexpr bool legal_unit_for_level = false; +inline constexpr bool legal_unit_for_level = false; } // namespace detail // Base type for all hierarchy levels diff --git a/cudax/include/cuda/experimental/__utility/basic_any/any_cast.cuh b/cudax/include/cuda/experimental/__utility/basic_any/any_cast.cuh index 50a3b43c5f5..1acbcb33382 100644 --- a/cudax/include/cuda/experimental/__utility/basic_any/any_cast.cuh +++ b/cudax/include/cuda/experimental/__utility/basic_any/any_cast.cuh @@ -40,13 +40,13 @@ namespace cuda::experimental //! __valid_any_cast //! template -_CCCL_INLINE_VAR constexpr bool __valid_any_cast = true; +inline constexpr bool __valid_any_cast = true; template -_CCCL_INLINE_VAR constexpr bool __valid_any_cast<_Interface*, _Tp> = false; +inline constexpr bool __valid_any_cast<_Interface*, _Tp> = false; template -_CCCL_INLINE_VAR constexpr bool __valid_any_cast<_Interface*, _Tp*> = +inline constexpr bool __valid_any_cast<_Interface*, _Tp*> = !_CUDA_VSTD::is_const_v<_Interface> || _CUDA_VSTD::is_const_v<_Tp>; //! diff --git a/cudax/include/cuda/experimental/__utility/basic_any/interfaces.cuh b/cudax/include/cuda/experimental/__utility/basic_any/interfaces.cuh index fcd05a6600b..9b8e006ae1c 100644 --- a/cudax/include/cuda/experimental/__utility/basic_any/interfaces.cuh +++ b/cudax/include/cuda/experimental/__utility/basic_any/interfaces.cuh @@ -52,19 +52,19 @@ template extern _Interface __remove_ireference_v<__ireference<_Interface const>>; template -_CCCL_INLINE_VAR constexpr bool __is_value_v = _CUDA_VSTD::is_class_v<_Interface>; +inline constexpr bool __is_value_v = _CUDA_VSTD::is_class_v<_Interface>; template -_CCCL_INLINE_VAR constexpr bool __is_value_v<__ireference<_Interface>> = false; +inline constexpr bool __is_value_v<__ireference<_Interface>> = false; template -_CCCL_INLINE_VAR constexpr bool __is_lvalue_reference_v = false; +inline constexpr bool __is_lvalue_reference_v = false; template -_CCCL_INLINE_VAR constexpr bool __is_lvalue_reference_v<__ireference<_Interface const>> = true; +inline constexpr bool __is_lvalue_reference_v<__ireference<_Interface const>> = true; template -_CCCL_INLINE_VAR constexpr bool __is_lvalue_reference_v<_Interface&> = true; +inline constexpr bool __is_lvalue_reference_v<_Interface&> = true; //! //! __bases_of: get the list of base interface for an interface, including itself @@ -82,16 +82,16 @@ using __bases_of _CCCL_NODEBUG_ALIAS = // //! interface subsumption //! template -_CCCL_INLINE_VAR constexpr bool __subsumes = false; +inline constexpr bool __subsumes = false; template -_CCCL_INLINE_VAR constexpr bool __subsumes<_Interface, _Interface> = true; +inline constexpr bool __subsumes<_Interface, _Interface> = true; template -_CCCL_INLINE_VAR constexpr bool __subsumes<__iset<_Set...>, __iset<_Set...>> = true; +inline constexpr bool __subsumes<__iset<_Set...>, __iset<_Set...>> = true; template -_CCCL_INLINE_VAR constexpr bool __subsumes<__iset<_Subset...>, __iset<_Superset...>> = +inline constexpr bool __subsumes<__iset<_Subset...>, __iset<_Superset...>> = _CUDA_VSTD::__type_set_contains_v<_CUDA_VSTD::__make_type_set<_Superset...>, _Subset...>; //! @@ -121,10 +121,10 @@ struct __has_base_fn<__iset<_Bases...>> }; template -_CCCL_INLINE_VAR constexpr bool __extension_of = false; +inline constexpr bool __extension_of = false; template -_CCCL_INLINE_VAR constexpr bool +inline constexpr bool __extension_of<_Derived, _Base, _CUDA_VSTD::enable_if_t<_CUDA_VSTD::is_class_v<_Derived> && _CUDA_VSTD::is_class_v<_Base>>> = diff --git a/cudax/include/cuda/experimental/__utility/basic_any/virtcall.cuh b/cudax/include/cuda/experimental/__utility/basic_any/virtcall.cuh index e090e4b023c..9bfb32ec5ba 100644 --- a/cudax/include/cuda/experimental/__utility/basic_any/virtcall.cuh +++ b/cudax/include/cuda/experimental/__utility/basic_any/virtcall.cuh @@ -99,10 +99,10 @@ using __virtual_fn_for _CCCL_NODEBUG_ALIAS = decltype(__virtual_fn_for_v<_Mbr, _ // If the interface is __ireference, then calls to non-const // member functions are not allowed. template -_CCCL_INLINE_VAR constexpr bool __valid_virtcall = sizeof...(_Interface) == 1; +inline constexpr bool __valid_virtcall = sizeof...(_Interface) == 1; template -_CCCL_INLINE_VAR constexpr bool __valid_virtcall<_Mbr, __ireference<_Interface const>> = __virtual_fn<_Mbr>::__const_fn; +inline constexpr bool __valid_virtcall<_Mbr, __ireference<_Interface const>> = __virtual_fn<_Mbr>::__const_fn; template _CUDAX_HOST_API auto __virtcall(_Self* __self, _Args&&... __args) // diff --git a/cudax/include/cuda/experimental/__utility/basic_any/virtual_functions.cuh b/cudax/include/cuda/experimental/__utility/basic_any/virtual_functions.cuh index f31d396b608..1ba1cfe3b93 100644 --- a/cudax/include/cuda/experimental/__utility/basic_any/virtual_functions.cuh +++ b/cudax/include/cuda/experimental/__utility/basic_any/virtual_functions.cuh @@ -98,44 +98,44 @@ template extern _CUDA_VSTD::__undefined<_Fn> __virtual_override_fn; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void*, _Args...)> // +inline constexpr __identity_t<_Ret (*)(void*, _Args...)> // __virtual_override_fn<_Ret (*)(_Cp&, _Args...), _Tp, _Override> = // &__override_fn_<_Tp, _Override, _Ret, false, false, _Args...>; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void const*, _Args...)> +inline constexpr __identity_t<_Ret (*)(void const*, _Args...)> __virtual_override_fn<_Ret (*)(_Cp const&, _Args...), _Tp, _Override> = &__override_fn_<_Tp, _Override, _Ret, true, false, _Args...>; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void*, _Args...) noexcept> +inline constexpr __identity_t<_Ret (*)(void*, _Args...) noexcept> __virtual_override_fn<_Ret (*)(_Cp&, _Args...) noexcept, _Tp, _Override> = &__override_fn_<_Tp, _Override, _Ret, false, true, _Args...>; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void const*, _Args...) noexcept> +inline constexpr __identity_t<_Ret (*)(void const*, _Args...) noexcept> __virtual_override_fn<_Ret (*)(_Cp const&, _Args...) noexcept, _Tp, _Override> = &__override_fn_<_Tp, _Override, _Ret, true, true, _Args...>; // TODO: Add support for member functions with reference qualifiers. template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void*, _Args...)> // +inline constexpr __identity_t<_Ret (*)(void*, _Args...)> // __virtual_override_fn<_Ret (_Cp::*)(_Args...), _Tp, _Override> = // &__override_fn_<_Tp, _Override, _Ret, false, false, _Args...>; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void const*, _Args...)> // +inline constexpr __identity_t<_Ret (*)(void const*, _Args...)> // __virtual_override_fn<_Ret (_Cp::*)(_Args...) const, _Tp, _Override> = &__override_fn_<_Tp, _Override, _Ret, true, false, _Args...>; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void*, _Args...) noexcept> +inline constexpr __identity_t<_Ret (*)(void*, _Args...) noexcept> __virtual_override_fn<_Ret (_Cp::*)(_Args...) noexcept, _Tp, _Override> = &__override_fn_<_Tp, _Override, _Ret, false, true, _Args...>; template -_CCCL_INLINE_VAR constexpr __identity_t<_Ret (*)(void const*, _Args...) noexcept> +inline constexpr __identity_t<_Ret (*)(void const*, _Args...) noexcept> __virtual_override_fn<_Ret (_Cp::*)(_Args...) const noexcept, _Tp, _Override> = &__override_fn_<_Tp, _Override, _Ret, true, true, _Args...>; diff --git a/cudax/include/cuda/experimental/__utility/select_execution_space.cuh b/cudax/include/cuda/experimental/__utility/select_execution_space.cuh index ff68e2835e2..b170360f29b 100644 --- a/cudax/include/cuda/experimental/__utility/select_execution_space.cuh +++ b/cudax/include/cuda/experimental/__utility/select_execution_space.cuh @@ -34,7 +34,7 @@ enum class _ExecutionSpace }; template -_CCCL_INLINE_VAR constexpr _ExecutionSpace __select_execution_space = +inline constexpr _ExecutionSpace __select_execution_space = _CUDA_VMR::__is_host_device_accessible<_Properties...> ? _ExecutionSpace::__host_device : _CUDA_VMR::__is_device_accessible<_Properties...> ? _ExecutionSpace::__device diff --git a/docs/cccl/development/macro.rst b/docs/cccl/development/macro.rst index 01ca7e202ac..c7d2f376898 100644 --- a/docs/cccl/development/macro.rst +++ b/docs/cccl/development/macro.rst @@ -217,8 +217,6 @@ The following macros are required only if the target C++ version does not suppor +-----------------------------+----------------------------------------------------------+ | ``_CCCL_CONSTEXPR_CXX23`` | Enable ``constexpr`` for C++23 or newer | +-----------------------------+----------------------------------------------------------+ -| ``_CCCL_INLINE_VAR`` | Portable ``inline constexpr`` variable (before C++17) | -+-----------------------------+----------------------------------------------------------+ **Concept-like Macros**: diff --git a/docs/repo.toml b/docs/repo.toml index ff144dfc78d..e8987f2447f 100644 --- a/docs/repo.toml +++ b/docs/repo.toml @@ -424,7 +424,6 @@ doxygen_predefined = [ "_CCCL_HIDE_FROM_ABI=", "_CCCL_HOST=", "_CCCL_HOST_DEVICE=", - "_CCCL_INLINE_VAR=inline", "_CCCL_NODISCARD=[[nodiscard]]", "_CCCL_NODISCARD_FRIEND=", "_CCCL_NTTP_AUTO=auto", diff --git a/libcudacxx/include/cuda/__functional/address_stability.h b/libcudacxx/include/cuda/__functional/address_stability.h index cdf50155e4f..8aba8419e1e 100644 --- a/libcudacxx/include/cuda/__functional/address_stability.h +++ b/libcudacxx/include/cuda/__functional/address_stability.h @@ -41,7 +41,7 @@ struct proclaims_copyable_arguments : _CUDA_VSTD::false_type #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool proclaims_copyable_arguments_v = proclaims_copyable_arguments::value; +inline constexpr bool proclaims_copyable_arguments_v = proclaims_copyable_arguments::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES // Wrapper for a callable to mark it as permitting copied arguments diff --git a/libcudacxx/include/cuda/__memory_resource/properties.h b/libcudacxx/include/cuda/__memory_resource/properties.h index fac41d26105..ec18df38910 100644 --- a/libcudacxx/include/cuda/__memory_resource/properties.h +++ b/libcudacxx/include/cuda/__memory_resource/properties.h @@ -29,10 +29,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CUDA_MR //! @brief The default alignment by a cudaMalloc{...} call -_CCCL_INLINE_VAR constexpr size_t default_cuda_malloc_alignment = 256; +inline constexpr size_t default_cuda_malloc_alignment = 256; //! @brief The default alignment by a cudaMallocHost{...} call -_CCCL_INLINE_VAR constexpr size_t default_cuda_malloc_host_alignment = alignof(_CUDA_VSTD::max_align_t); +inline constexpr size_t default_cuda_malloc_host_alignment = alignof(_CUDA_VSTD::max_align_t); //! @brief The device_accessible property signals that the allocated memory is device accessible struct device_accessible @@ -44,22 +44,22 @@ struct host_accessible //! @brief determines whether a set of properties signals host accessible memory. template -_CCCL_INLINE_VAR constexpr bool __is_host_accessible = +inline constexpr bool __is_host_accessible = _CUDA_VSTD::__type_set_contains_v<_CUDA_VSTD::__make_type_set<_Properties...>, host_accessible>; //! @brief determines whether a set of properties signals device accessible memory. template -_CCCL_INLINE_VAR constexpr bool __is_device_accessible = +inline constexpr bool __is_device_accessible = _CUDA_VSTD::__type_set_contains_v<_CUDA_VSTD::__make_type_set<_Properties...>, device_accessible>; //! @brief determines whether a set of properties signals host device accessible memory. template -_CCCL_INLINE_VAR constexpr bool __is_host_device_accessible = +inline constexpr bool __is_host_device_accessible = _CUDA_VSTD::__type_set_contains_v<_CUDA_VSTD::__make_type_set<_Properties...>, host_accessible, device_accessible>; //! @brief verifies that a set of properties contains at least one execution space property template -_CCCL_INLINE_VAR constexpr bool __contains_execution_space_property = +inline constexpr bool __contains_execution_space_property = __is_host_accessible<_Properties...> || __is_device_accessible<_Properties...>; _LIBCUDACXX_END_NAMESPACE_CUDA_MR diff --git a/libcudacxx/include/cuda/__memory_resource/resource_ref.h b/libcudacxx/include/cuda/__memory_resource/resource_ref.h index 97f128dd1ad..32beb331ef8 100644 --- a/libcudacxx/include/cuda/__memory_resource/resource_ref.h +++ b/libcudacxx/include/cuda/__memory_resource/resource_ref.h @@ -459,7 +459,7 @@ template <_AllocType _Alloc_type> using _Vtable_store = _CUDA_VSTD::_If<_Alloc_type == _AllocType::_Default, _Alloc_vtable, _Async_alloc_vtable>; template <_AllocType _Alloc_type, _WrapperType _Wrapper_type, class _Resource> -_CCCL_INLINE_VAR constexpr _Vtable_store<_Alloc_type> __alloc_vtable = +inline constexpr _Vtable_store<_Alloc_type> __alloc_vtable = _Resource_vtable_builder::template _Create<_Resource, _Alloc_type, _Wrapper_type>(); struct _Resource_ref_helper diff --git a/libcudacxx/include/cuda/__type_traits/is_floating_point.h b/libcudacxx/include/cuda/__type_traits/is_floating_point.h index 489d583c750..438ac0a8923 100644 --- a/libcudacxx/include/cuda/__type_traits/is_floating_point.h +++ b/libcudacxx/include/cuda/__type_traits/is_floating_point.h @@ -29,7 +29,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CUDA //! Tells whether a type is a floating point type. Users are allowed to specialize this template for their own types. template -_CCCL_INLINE_VAR constexpr bool is_floating_point_v = +inline constexpr bool is_floating_point_v = _CUDA_VSTD::is_floating_point_v<_CUDA_VSTD::remove_cv_t<_Tp>> || _CUDA_VSTD::__is_extended_floating_point_v<_CUDA_VSTD::remove_cv_t<_Tp>>; diff --git a/libcudacxx/include/cuda/std/__atomic/order.h b/libcudacxx/include/cuda/std/__atomic/order.h index bafbd86fe5f..c436b66d511 100644 --- a/libcudacxx/include/cuda/std/__atomic/order.h +++ b/libcudacxx/include/cuda/std/__atomic/order.h @@ -143,12 +143,12 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CUDA using memory_order = _CUDA_VSTD::memory_order; -_CCCL_INLINE_VAR constexpr memory_order memory_order_relaxed = _CUDA_VSTD::memory_order_relaxed; -_CCCL_INLINE_VAR constexpr memory_order memory_order_consume = _CUDA_VSTD::memory_order_consume; -_CCCL_INLINE_VAR constexpr memory_order memory_order_acquire = _CUDA_VSTD::memory_order_acquire; -_CCCL_INLINE_VAR constexpr memory_order memory_order_release = _CUDA_VSTD::memory_order_release; -_CCCL_INLINE_VAR constexpr memory_order memory_order_acq_rel = _CUDA_VSTD::memory_order_acq_rel; -_CCCL_INLINE_VAR constexpr memory_order memory_order_seq_cst = _CUDA_VSTD::memory_order_seq_cst; +inline constexpr memory_order memory_order_relaxed = _CUDA_VSTD::memory_order_relaxed; +inline constexpr memory_order memory_order_consume = _CUDA_VSTD::memory_order_consume; +inline constexpr memory_order memory_order_acquire = _CUDA_VSTD::memory_order_acquire; +inline constexpr memory_order memory_order_release = _CUDA_VSTD::memory_order_release; +inline constexpr memory_order memory_order_acq_rel = _CUDA_VSTD::memory_order_acq_rel; +inline constexpr memory_order memory_order_seq_cst = _CUDA_VSTD::memory_order_seq_cst; _LIBCUDACXX_END_NAMESPACE_CUDA diff --git a/libcudacxx/include/cuda/std/__cccl/dialect.h b/libcudacxx/include/cuda/std/__cccl/dialect.h index f11ac6050ca..1ea42a7f246 100644 --- a/libcudacxx/include/cuda/std/__cccl/dialect.h +++ b/libcudacxx/include/cuda/std/__cccl/dialect.h @@ -123,9 +123,9 @@ /////////////////////////////////////////////////////////////////////////////// #if defined(_CCCL_NO_INLINE_VARIABLES) -# define _CCCL_INLINE_VAR +# define inline #else // ^^^ _CCCL_NO_INLINE_VARIABLES ^^^ / vvv !_CCCL_NO_INLINE_VARIABLES vvv -# define _CCCL_INLINE_VAR inline +# define inline inline #endif // !_CCCL_NO_INLINE_VARIABLES #if defined(_CCCL_NO_NOEXCEPT_FUNCTION_TYPE) @@ -151,7 +151,7 @@ #if defined(__CUDA_ARCH__) # define _CCCL_GLOBAL_CONSTANT _CCCL_DEVICE constexpr #else // ^^^ __CUDA_ARCH__ ^^^ / vvv !__CUDA_ARCH__ vvv -# define _CCCL_GLOBAL_CONSTANT _CCCL_INLINE_VAR constexpr +# define _CCCL_GLOBAL_CONSTANT inline constexpr #endif // __CUDA_ARCH__ #endif // __CCCL_DIALECT_H diff --git a/libcudacxx/include/cuda/std/__concepts/concept_macros.h b/libcudacxx/include/cuda/std/__concepts/concept_macros.h index 3acd8ae6841..da02b1ce966 100644 --- a/libcudacxx/include/cuda/std/__concepts/concept_macros.h +++ b/libcudacxx/include/cuda/std/__concepts/concept_macros.h @@ -82,7 +82,7 @@ _LIBCUDACXX_HIDE_FROM_ABI __cccl_enable_if_t<_Bp> __cccl_requires() {} # else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv template = 0> -_CCCL_INLINE_VAR constexpr int __cccl_requires = 0; +inline constexpr int __cccl_requires = 0; # endif // !_CCCL_COMPILER(MSVC) template @@ -167,7 +167,7 @@ namespace __cccl_unqualified_cuda_std = _CUDA_VSTD; // NOLINT(misc-unused-alias- # else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv -# define _CCCL_CONCEPT _CCCL_INLINE_VAR constexpr bool +# define _CCCL_CONCEPT inline constexpr bool # define _CCCL_CONCEPT_FRAGMENT(_NAME, ...) \ _LIBCUDACXX_HIDE_FROM_ABI auto _NAME##_CCCL_CONCEPT_FRAGMENT_impl_ _CCCL_CONCEPT_FRAGMENT_REQS_##__VA_ARGS__> {} \ diff --git a/libcudacxx/include/cuda/std/__concepts/destructible.h b/libcudacxx/include/cuda/std/__concepts/destructible.h index 62d241b9e33..229200ddd28 100644 --- a/libcudacxx/include/cuda/std/__concepts/destructible.h +++ b/libcudacxx/include/cuda/std/__concepts/destructible.h @@ -40,29 +40,29 @@ _CCCL_CONCEPT destructible = __is_nothrow_destructible(_Tp); # else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv template -_CCCL_INLINE_VAR constexpr bool __destructible_impl = false; +inline constexpr bool __destructible_impl = false; template -_CCCL_INLINE_VAR constexpr bool __destructible_impl<_Tp, - enable_if_t<_CCCL_TRAIT(is_object, _Tp)>, +inline constexpr bool __destructible_impl<_Tp, + enable_if_t<_CCCL_TRAIT(is_object, _Tp)>, # if _CCCL_COMPILER(GCC) - enable_if_t<_CCCL_TRAIT(is_destructible, _Tp)>> + enable_if_t<_CCCL_TRAIT(is_destructible, _Tp)>> # else // ^^^ _CCCL_COMPILER(GCC) ^^^ / vvv !_CCCL_COMPILER(GCC) vvv - void_t().~_Tp())>> + void_t().~_Tp())>> # endif // !_CCCL_COMPILER(GCC) = noexcept(_CUDA_VSTD::declval<_Tp>().~_Tp()); template -_CCCL_INLINE_VAR constexpr bool __destructible = __destructible_impl<_Tp>; +inline constexpr bool __destructible = __destructible_impl<_Tp>; template -_CCCL_INLINE_VAR constexpr bool __destructible<_Tp&> = true; +inline constexpr bool __destructible<_Tp&> = true; template -_CCCL_INLINE_VAR constexpr bool __destructible<_Tp&&> = true; +inline constexpr bool __destructible<_Tp&&> = true; template -_CCCL_INLINE_VAR constexpr bool __destructible<_Tp[_Nm]> = __destructible<_Tp>; +inline constexpr bool __destructible<_Tp[_Nm]> = __destructible<_Tp>; template _CCCL_CONCEPT destructible = __destructible<_Tp>; diff --git a/libcudacxx/include/cuda/std/__concepts/swappable.h b/libcudacxx/include/cuda/std/__concepts/swappable.h index 2ad1e4270a3..f83ff9e7799 100644 --- a/libcudacxx/include/cuda/std/__concepts/swappable.h +++ b/libcudacxx/include/cuda/std/__concepts/swappable.h @@ -94,11 +94,11 @@ _CCCL_NV_DIAG_DEFAULT(2642) # else // ^^^ !_CCCL_NO_CONCEPTS && !_CCCL_COMPILER(NVHPC) ^^^ / vvv _CCCL_NO_CONCEPTS || _CCCL_COMPILER(NVHPC) vvv template -_CCCL_INLINE_VAR constexpr bool __swappable_arrays = false; +inline constexpr bool __swappable_arrays = false; # endif // _CCCL_NO_CONCEPTS || _CCCL_COMPILER(NVHPC) template -_CCCL_INLINE_VAR constexpr bool __noexcept_swappable_arrays = false; +inline constexpr bool __noexcept_swappable_arrays = false; struct __fn { @@ -145,12 +145,12 @@ _CCCL_CONCEPT_FRAGMENT( (__swap(__t[0], __u[0])))); template -_CCCL_INLINE_VAR constexpr bool __swappable_arrays<_Tp, _Up, _Size, void_t>> = +inline constexpr bool __swappable_arrays<_Tp, _Up, _Size, void_t>> = _CCCL_FRAGMENT(__swappable_arrays_, _Tp, _Up, _CUDA_VSTD::integral_constant); # endif // _CCCL_NO_CONCEPTS || _CCCL_COMPILER(NVHPC) template -_CCCL_INLINE_VAR constexpr bool __noexcept_swappable_arrays<_Tp, _Up, void_t>> = +inline constexpr bool __noexcept_swappable_arrays<_Tp, _Up, void_t>> = noexcept(__swap::__fn{}(_CUDA_VSTD::declval<_Tp&>(), _CUDA_VSTD::declval<_Up&>())); _LIBCUDACXX_END_NAMESPACE_CPO diff --git a/libcudacxx/include/cuda/std/__expected/expected.h b/libcudacxx/include/cuda/std/__expected/expected.h index 4370b42d452..0b8e99c1e88 100644 --- a/libcudacxx/include/cuda/std/__expected/expected.h +++ b/libcudacxx/include/cuda/std/__expected/expected.h @@ -70,31 +70,31 @@ class expected; namespace __expected { template -_CCCL_INLINE_VAR constexpr bool __valid_expected = +inline constexpr bool __valid_expected = !_CCCL_TRAIT(is_reference, _Tp) && !_CCCL_TRAIT(is_function, _Tp) && !_CCCL_TRAIT(is_same, remove_cv_t<_Tp>, in_place_t) && !_CCCL_TRAIT(is_same, remove_cv_t<_Tp>, unexpect_t) && !__unexpected::__is_unexpected> && __unexpected::__valid_unexpected<_Err>; template -_CCCL_INLINE_VAR constexpr bool __is_expected = false; +inline constexpr bool __is_expected = false; template -_CCCL_INLINE_VAR constexpr bool __is_expected> = true; +inline constexpr bool __is_expected> = true; template -_CCCL_INLINE_VAR constexpr bool __is_expected_nonvoid = __is_expected<_Tp>; +inline constexpr bool __is_expected_nonvoid = __is_expected<_Tp>; template -_CCCL_INLINE_VAR constexpr bool __is_expected_nonvoid> = false; +inline constexpr bool __is_expected_nonvoid> = false; template -_CCCL_INLINE_VAR constexpr bool __can_swap = +inline constexpr bool __can_swap = _CCCL_TRAIT(is_swappable, _Tp) && _CCCL_TRAIT(is_swappable, _Err) && _CCCL_TRAIT(is_move_constructible, _Tp) && _CCCL_TRAIT(is_move_constructible, _Err) && (_CCCL_TRAIT(is_nothrow_move_constructible, _Tp) || _CCCL_TRAIT(is_nothrow_move_constructible, _Err)); template -_CCCL_INLINE_VAR constexpr bool __can_swap = +inline constexpr bool __can_swap = _CCCL_TRAIT(is_swappable, _Err) && _CCCL_TRAIT(is_move_constructible, _Err); } // namespace __expected diff --git a/libcudacxx/include/cuda/std/__expected/expected_base.h b/libcudacxx/include/cuda/std/__expected/expected_base.h index bf9c6d6d544..77fcfffb067 100644 --- a/libcudacxx/include/cuda/std/__expected/expected_base.h +++ b/libcudacxx/include/cuda/std/__expected/expected_base.h @@ -530,7 +530,7 @@ struct __expected_storage : __expected_destruct<_Tp, _Err> }; template -_CCCL_INLINE_VAR constexpr __smf_availability __expected_can_copy_construct = +inline constexpr __smf_availability __expected_can_copy_construct = (_CCCL_TRAIT(is_trivially_copy_constructible, _Tp) || _CCCL_TRAIT(is_same, _Tp, void)) && _CCCL_TRAIT(is_trivially_copy_constructible, _Err) ? __smf_availability::__trivial @@ -581,7 +581,7 @@ struct __expected_copy<_Tp, _Err, __smf_availability::__deleted> : __expected_st }; template -_CCCL_INLINE_VAR constexpr __smf_availability __expected_can_move_construct = +inline constexpr __smf_availability __expected_can_move_construct = (_CCCL_TRAIT(is_trivially_move_constructible, _Tp) || _CCCL_TRAIT(is_same, _Tp, void)) && _CCCL_TRAIT(is_trivially_move_constructible, _Err) ? __smf_availability::__trivial @@ -634,7 +634,7 @@ struct __expected_move<_Tp, _Err, __smf_availability::__deleted> : __expected_co // Need to also check against is_nothrow_move_constructible in the trivial case as that is stupidly in the constraints template -_CCCL_INLINE_VAR constexpr __smf_availability __expected_can_copy_assign = +inline constexpr __smf_availability __expected_can_copy_assign = (_CCCL_TRAIT(is_trivially_destructible, _Tp) || _CCCL_TRAIT(is_same, _Tp, void)) && _CCCL_TRAIT(is_trivially_destructible, _Err) && (_CCCL_TRAIT(is_trivially_copy_constructible, _Tp) || _CCCL_TRAIT(is_same, _Tp, void)) @@ -710,7 +710,7 @@ struct __expected_copy_assign<_Tp, _Err, __smf_availability::__deleted> : __expe }; template -_CCCL_INLINE_VAR constexpr __smf_availability __expected_can_move_assign = +inline constexpr __smf_availability __expected_can_move_assign = (_CCCL_TRAIT(is_trivially_destructible, _Tp) || _CCCL_TRAIT(is_same, _Tp, void)) && _CCCL_TRAIT(is_trivially_destructible, _Err) && (_CCCL_TRAIT(is_trivially_move_constructible, _Tp) || _CCCL_TRAIT(is_same, _Tp, void)) diff --git a/libcudacxx/include/cuda/std/__expected/unexpected.h b/libcudacxx/include/cuda/std/__expected/unexpected.h index 7383c59bf78..0256c41ae37 100644 --- a/libcudacxx/include/cuda/std/__expected/unexpected.h +++ b/libcudacxx/include/cuda/std/__expected/unexpected.h @@ -44,13 +44,13 @@ class unexpected; namespace __unexpected { template -_CCCL_INLINE_VAR constexpr bool __is_unexpected = false; +inline constexpr bool __is_unexpected = false; template -_CCCL_INLINE_VAR constexpr bool __is_unexpected> = true; +inline constexpr bool __is_unexpected> = true; template -_CCCL_INLINE_VAR constexpr bool __valid_unexpected = +inline constexpr bool __valid_unexpected = _CCCL_TRAIT(is_object, _Tp) && !_CCCL_TRAIT(is_array, _Tp) && !__is_unexpected<_Tp> && !_CCCL_TRAIT(is_const, _Tp) && !_CCCL_TRAIT(is_volatile, _Tp); } // namespace __unexpected diff --git a/libcudacxx/include/cuda/std/__floating_point/conversion_rank_order.h b/libcudacxx/include/cuda/std/__floating_point/conversion_rank_order.h index 19479092d80..d88dc1c8db7 100644 --- a/libcudacxx/include/cuda/std/__floating_point/conversion_rank_order.h +++ b/libcudacxx/include/cuda/std/__floating_point/conversion_rank_order.h @@ -91,10 +91,10 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_conv_rank_order __fp_co } template -_CCCL_INLINE_VAR constexpr __fp_conv_rank_order __fp_conv_rank_order_v = __fp_conv_rank_order_v_impl<_Lhs, _Rhs>(); +inline constexpr __fp_conv_rank_order __fp_conv_rank_order_v = __fp_conv_rank_order_v_impl<_Lhs, _Rhs>(); template -_CCCL_INLINE_VAR constexpr __fp_conv_rank_order __fp_conv_rank_order_int_ext_v = +inline constexpr __fp_conv_rank_order __fp_conv_rank_order_int_ext_v = __fp_conv_rank_order_v, conditional_t<_CCCL_TRAIT(is_integral, _Rhs), double, _Rhs>>; @@ -106,7 +106,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __fp_is_implicit_conver } template -_CCCL_INLINE_VAR constexpr bool __fp_is_implicit_conversion_v = __fp_is_implicit_conversion_v_impl<_Lhs, _Rhs>(); +inline constexpr bool __fp_is_implicit_conversion_v = __fp_is_implicit_conversion_v_impl<_Lhs, _Rhs>(); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__floating_point/format.h b/libcudacxx/include/cuda/std/__floating_point/format.h index e644081c347..d49a0092153 100644 --- a/libcudacxx/include/cuda/std/__floating_point/format.h +++ b/libcudacxx/include/cuda/std/__floating_point/format.h @@ -138,7 +138,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_format __fp_format_of_v } template -_CCCL_INLINE_VAR constexpr __fp_format __fp_format_of_v = _CUDA_VSTD::__fp_format_of_v_impl<_Tp>(); +inline constexpr __fp_format __fp_format_of_v = _CUDA_VSTD::__fp_format_of_v_impl<_Tp>(); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__floating_point/mask.h b/libcudacxx/include/cuda/std/__floating_point/mask.h index aba517ade81..950b020b8f9 100644 --- a/libcudacxx/include/cuda/std/__floating_point/mask.h +++ b/libcudacxx/include/cuda/std/__floating_point/mask.h @@ -76,7 +76,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_storage_t<_Tp> __fp_sig } template -_CCCL_INLINE_VAR constexpr __fp_storage_t<_Tp> __fp_sign_mask_v = __fp_sign_mask_impl<_Tp>(); +inline constexpr __fp_storage_t<_Tp> __fp_sign_mask_v = __fp_sign_mask_impl<_Tp>(); template _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_storage_t<_Tp> __fp_exp_mask_impl() noexcept @@ -138,7 +138,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_storage_t<_Tp> __fp_exp } template -_CCCL_INLINE_VAR constexpr __fp_storage_t<_Tp> __fp_exp_mask_v = __fp_exp_mask_impl<_Tp>(); +inline constexpr __fp_storage_t<_Tp> __fp_exp_mask_v = __fp_exp_mask_impl<_Tp>(); template _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_storage_t<_Tp> __fp_mant_mask_impl() noexcept @@ -200,10 +200,10 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr __fp_storage_t<_Tp> __fp_man } template -_CCCL_INLINE_VAR constexpr __fp_storage_t<_Tp> __fp_mant_mask_v = __fp_mant_mask_impl<_Tp>(); +inline constexpr __fp_storage_t<_Tp> __fp_mant_mask_v = __fp_mant_mask_impl<_Tp>(); template -_CCCL_INLINE_VAR constexpr __fp_storage_t<_Tp> __fp_exp_mant_mask_v = +inline constexpr __fp_storage_t<_Tp> __fp_exp_mant_mask_v = static_cast<__fp_storage_t<_Tp>>(__fp_exp_mask_v<_Tp> | __fp_mant_mask_v<_Tp>); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__functional/bind.h b/libcudacxx/include/cuda/std/__functional/bind.h index 2dce2bbce02..4e2c6013a52 100644 --- a/libcudacxx/include/cuda/std/__functional/bind.h +++ b/libcudacxx/include/cuda/std/__functional/bind.h @@ -54,7 +54,7 @@ struct is_bind_expression {}; template -_CCCL_INLINE_VAR constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; +inline constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; template struct is_placeholder @@ -62,7 +62,7 @@ struct is_placeholder {}; template -_CCCL_INLINE_VAR constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; +inline constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; namespace placeholders { @@ -83,16 +83,16 @@ _LIBCUDACXX_HIDE_FROM_ABI extern const __ph<8> _8; _LIBCUDACXX_HIDE_FROM_ABI extern const __ph<9> _9; _LIBCUDACXX_HIDE_FROM_ABI extern const __ph<10> _10; # else -/* _CCCL_INLINE_VAR */ constexpr __ph<1> _1{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<2> _2{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<3> _3{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<4> _4{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<5> _5{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<6> _6{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<7> _7{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<8> _8{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<9> _9{}; -/* _CCCL_INLINE_VAR */ constexpr __ph<10> _10{}; +/* inline */ constexpr __ph<1> _1{}; +/* inline */ constexpr __ph<2> _2{}; +/* inline */ constexpr __ph<3> _3{}; +/* inline */ constexpr __ph<4> _4{}; +/* inline */ constexpr __ph<5> _5{}; +/* inline */ constexpr __ph<6> _6{}; +/* inline */ constexpr __ph<7> _7{}; +/* inline */ constexpr __ph<8> _8{}; +/* inline */ constexpr __ph<9> _9{}; +/* inline */ constexpr __ph<10> _10{}; # endif // defined(_LIBCUDACXX_BUILDING_LIBRARY) } // namespace placeholders diff --git a/libcudacxx/include/cuda/std/__functional/invoke.h b/libcudacxx/include/cuda/std/__functional/invoke.h index 45e6d104e41..56e71bc3de7 100644 --- a/libcudacxx/include/cuda/std/__functional/invoke.h +++ b/libcudacxx/include/cuda/std/__functional/invoke.h @@ -502,10 +502,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_invocable_r : integral_constant -_CCCL_INLINE_VAR constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; +inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; template -_CCCL_INLINE_VAR constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; +inline constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES // is_nothrow_invocable @@ -521,10 +521,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_invocable_r {}; template -_CCCL_INLINE_VAR constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; +inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; template -_CCCL_INLINE_VAR constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; +inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; template struct _CCCL_TYPE_VISIBILITY_DEFAULT invoke_result : __invoke_of<_Fn, _Args...> diff --git a/libcudacxx/include/cuda/std/__fwd/mdspan.h b/libcudacxx/include/cuda/std/__fwd/mdspan.h index 9a095cd8928..3e928163d6d 100644 --- a/libcudacxx/include/cuda/std/__fwd/mdspan.h +++ b/libcudacxx/include/cuda/std/__fwd/mdspan.h @@ -57,10 +57,10 @@ struct layout_stride namespace __mdspan_detail { template -_CCCL_INLINE_VAR constexpr bool __is_valid_layout_mapping = false; +inline constexpr bool __is_valid_layout_mapping = false; template -_CCCL_INLINE_VAR constexpr bool +inline constexpr bool __is_valid_layout_mapping<_Layout, _Extents, void_t>> = true; } // namespace __mdspan_detail diff --git a/libcudacxx/include/cuda/std/__fwd/span.h b/libcudacxx/include/cuda/std/__fwd/span.h index e7f68450298..1bb56e98b8c 100644 --- a/libcudacxx/include/cuda/std/__fwd/span.h +++ b/libcudacxx/include/cuda/std/__fwd/span.h @@ -25,7 +25,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD -_CCCL_INLINE_VAR constexpr size_t dynamic_extent = static_cast(-1); +inline constexpr size_t dynamic_extent = static_cast(-1); template class span; diff --git a/libcudacxx/include/cuda/std/__iterator/concepts.h b/libcudacxx/include/cuda/std/__iterator/concepts.h index d0eda2f4eda..48210c3fd63 100644 --- a/libcudacxx/include/cuda/std/__iterator/concepts.h +++ b/libcudacxx/include/cuda/std/__iterator/concepts.h @@ -340,7 +340,7 @@ template _CCCL_CONCEPT sentinel_for = _CCCL_FRAGMENT(__sentinel_for_, _Sp, _Ip); template -_CCCL_INLINE_VAR constexpr bool disable_sized_sentinel_for = false; +inline constexpr bool disable_sized_sentinel_for = false; template _CCCL_CONCEPT_FRAGMENT( @@ -592,16 +592,16 @@ template _CCCL_CONCEPT indirectly_copyable_storable = _CCCL_FRAGMENT(__indirectly_copyable_storable_, _In, _Out); template -_CCCL_INLINE_VAR constexpr bool __has_iter_category = false; +inline constexpr bool __has_iter_category = false; template -_CCCL_INLINE_VAR constexpr bool __has_iter_category<_Ip, void_t> = true; +inline constexpr bool __has_iter_category<_Ip, void_t> = true; template -_CCCL_INLINE_VAR constexpr bool __has_iter_concept = false; +inline constexpr bool __has_iter_concept = false; template -_CCCL_INLINE_VAR constexpr bool __has_iter_concept<_Ip, void_t> = true; +inline constexpr bool __has_iter_concept<_Ip, void_t> = true; #endif // _CCCL_NO_CONCEPTS diff --git a/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h b/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h index 1cd8a478348..357af4bd7a9 100644 --- a/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h @@ -102,17 +102,17 @@ struct incrementable_traits : incrementable_traits<_Ip> {}; template -_CCCL_INLINE_VAR constexpr bool __has_member_difference_type = false; +inline constexpr bool __has_member_difference_type = false; template -_CCCL_INLINE_VAR constexpr bool __has_member_difference_type<_Tp, void_t> = true; +inline constexpr bool __has_member_difference_type<_Tp, void_t> = true; template -_CCCL_INLINE_VAR constexpr bool __has_integral_minus = false; +inline constexpr bool __has_integral_minus = false; // In C++17 we get issues trying to bind void* to a const& so special case it here template -_CCCL_INLINE_VAR constexpr bool +inline constexpr bool __has_integral_minus<_Tp, enable_if_t>, void_t() - _CUDA_VSTD::declval())>> = diff --git a/libcudacxx/include/cuda/std/__iterator/iter_swap.h b/libcudacxx/include/cuda/std/__iterator/iter_swap.h index 53d7e2bf8ee..1194c673ff1 100644 --- a/libcudacxx/include/cuda/std/__iterator/iter_swap.h +++ b/libcudacxx/include/cuda/std/__iterator/iter_swap.h @@ -148,10 +148,10 @@ _CCCL_CONCEPT indirectly_swappable = _CCCL_FRAGMENT(__indirectly_swappable_, _I1 #endif // _CCCL_NO_CONCEPTS template -_CCCL_INLINE_VAR constexpr bool __noexcept_swappable = false; +inline constexpr bool __noexcept_swappable = false; template -_CCCL_INLINE_VAR constexpr bool __noexcept_swappable<_I1, _I2, enable_if_t>> = +inline constexpr bool __noexcept_swappable<_I1, _I2, enable_if_t>> = noexcept(_CUDA_VRANGES::iter_swap(_CUDA_VSTD::declval<_I1&>(), _CUDA_VSTD::declval<_I2&>())); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__iterator/iterator_traits.h b/libcudacxx/include/cuda/std/__iterator/iterator_traits.h index 81251bef9ee..dbb90a01b75 100644 --- a/libcudacxx/include/cuda/std/__iterator/iterator_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/iterator_traits.h @@ -592,25 +592,25 @@ _CCCL_CONCEPT __cpp17_random_access_iterator = // We need to consider if a user has specialized std::iterator_traits template -_CCCL_INLINE_VAR constexpr bool __specialized_from_std = !__is_primary_std_template>::value; +inline constexpr bool __specialized_from_std = !__is_primary_std_template>::value; template -_CCCL_INLINE_VAR constexpr bool __has_member_reference = false; +inline constexpr bool __has_member_reference = false; template -_CCCL_INLINE_VAR constexpr bool __has_member_reference<_Tp, void_t> = true; +inline constexpr bool __has_member_reference<_Tp, void_t> = true; template -_CCCL_INLINE_VAR constexpr bool __has_member_pointer = false; +inline constexpr bool __has_member_pointer = false; template -_CCCL_INLINE_VAR constexpr bool __has_member_pointer<_Tp, void_t> = true; +inline constexpr bool __has_member_pointer<_Tp, void_t> = true; template -_CCCL_INLINE_VAR constexpr bool __has_member_iterator_category = false; +inline constexpr bool __has_member_iterator_category = false; template -_CCCL_INLINE_VAR constexpr bool __has_member_iterator_category<_Tp, void_t> = true; +inline constexpr bool __has_member_iterator_category<_Tp, void_t> = true; template _CCCL_CONCEPT __specifies_members = diff --git a/libcudacxx/include/cuda/std/__iterator/move_iterator.h b/libcudacxx/include/cuda/std/__iterator/move_iterator.h index 190bceb41ca..ee228b808fa 100644 --- a/libcudacxx/include/cuda/std/__iterator/move_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/move_iterator.h @@ -65,8 +65,7 @@ concept __move_iter_comparable = requires { }; template -_CCCL_INLINE_VAR constexpr bool __noexcept_move_iter_iter_move = - noexcept(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Iter>())); +inline constexpr bool __noexcept_move_iter_iter_move = noexcept(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Iter>())); #else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv template struct __move_iter_category_base @@ -90,8 +89,7 @@ template _CCCL_CONCEPT __move_iter_comparable = _CCCL_FRAGMENT(__move_iter_comparable_, _Iter, _Sent); template -_CCCL_INLINE_VAR constexpr bool __noexcept_move_iter_iter_move = - noexcept(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Iter>())); +inline constexpr bool __noexcept_move_iter_iter_move = noexcept(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Iter>())); #endif // _CCCL_NO_CONCEPTS template diff --git a/libcudacxx/include/cuda/std/__iterator/readable_traits.h b/libcudacxx/include/cuda/std/__iterator/readable_traits.h index 4d5a7418941..73ed3921170 100644 --- a/libcudacxx/include/cuda/std/__iterator/readable_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/readable_traits.h @@ -116,16 +116,16 @@ struct __cond_value_type<_Tp, enable_if_t<_CCCL_TRAIT(is_object, _Tp)>> }; template -_CCCL_INLINE_VAR constexpr bool __has_member_value_type = false; +inline constexpr bool __has_member_value_type = false; template -_CCCL_INLINE_VAR constexpr bool __has_member_value_type<_Tp, void_t> = true; +inline constexpr bool __has_member_value_type<_Tp, void_t> = true; template -_CCCL_INLINE_VAR constexpr bool __has_member_element_type = false; +inline constexpr bool __has_member_element_type = false; template -_CCCL_INLINE_VAR constexpr bool __has_member_element_type<_Tp, void_t> = true; +inline constexpr bool __has_member_element_type<_Tp, void_t> = true; template struct indirectly_readable_traits diff --git a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h index d8ea095fc49..abd1ac04d43 100644 --- a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h @@ -55,20 +55,19 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_move = false; +inline constexpr bool __noexcept_rev_iter_iter_move = false; template -_CCCL_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_move<_Iter, void_t())>> = +inline constexpr bool __noexcept_rev_iter_iter_move<_Iter, void_t())>> = is_nothrow_copy_constructible_v<_Iter> && noexcept(_CUDA_VRANGES::iter_move(--_CUDA_VSTD::declval<_Iter&>())); template -_CCCL_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_swap = false; +inline constexpr bool __noexcept_rev_iter_iter_swap = false; template -_CCCL_INLINE_VAR constexpr bool - __noexcept_rev_iter_iter_swap<_Iter, _Iter2, enable_if_t>> = - is_nothrow_copy_constructible_v<_Iter> && is_nothrow_copy_constructible_v<_Iter2> - && noexcept(_CUDA_VRANGES::iter_swap(--declval<_Iter&>(), --declval<_Iter2&>())); +inline constexpr bool __noexcept_rev_iter_iter_swap<_Iter, _Iter2, enable_if_t>> = + is_nothrow_copy_constructible_v<_Iter> && is_nothrow_copy_constructible_v<_Iter2> + && noexcept(_CUDA_VRANGES::iter_swap(--declval<_Iter&>(), --declval<_Iter2&>())); _CCCL_SUPPRESS_DEPRECATED_PUSH template diff --git a/libcudacxx/include/cuda/std/__mdspan/concepts.h b/libcudacxx/include/cuda/std/__mdspan/concepts.h index 0ebcaf8a464..f05a88b5016 100644 --- a/libcudacxx/include/cuda/std/__mdspan/concepts.h +++ b/libcudacxx/include/cuda/std/__mdspan/concepts.h @@ -60,11 +60,11 @@ struct __is_extents : false_type {}; template -_CCCL_INLINE_VAR constexpr bool __is_extents_v = __is_extents<_Tp>::value; +inline constexpr bool __is_extents_v = __is_extents<_Tp>::value; // [mdspan.layout.general]/2 template -_CCCL_INLINE_VAR constexpr bool __is_mapping_of = +inline constexpr bool __is_mapping_of = _CCCL_TRAIT(is_same, typename _Layout::template mapping, _Mapping); // [mdspan.layout.reqmts]/1 diff --git a/libcudacxx/include/cuda/std/__mdspan/submdspan_extents.h b/libcudacxx/include/cuda/std/__mdspan/submdspan_extents.h index 8002d3b327e..4d7280c86e1 100644 --- a/libcudacxx/include/cuda/std/__mdspan/submdspan_extents.h +++ b/libcudacxx/include/cuda/std/__mdspan/submdspan_extents.h @@ -168,7 +168,7 @@ struct __get_subextent }; template -_CCCL_INLINE_VAR constexpr bool __is_valid_subextents = +inline constexpr bool __is_valid_subextents = convertible_to<_SliceType, _IndexType> || __index_pair_like<_SliceType, _IndexType> || _CCCL_TRAIT(is_convertible, _SliceType, full_extent_t) || __is_strided_slice>; diff --git a/libcudacxx/include/cuda/std/__mdspan/submdspan_helper.h b/libcudacxx/include/cuda/std/__mdspan/submdspan_helper.h index 5bcd803968e..7e22a10d51a 100644 --- a/libcudacxx/include/cuda/std/__mdspan/submdspan_helper.h +++ b/libcudacxx/include/cuda/std/__mdspan/submdspan_helper.h @@ -72,16 +72,16 @@ _CCCL_HOST_DEVICE strided_slice(_OffsetType, _ExtentType, _StrideType) -> strided_slice<_OffsetType, _ExtentType, _StrideType>; template -_CCCL_INLINE_VAR constexpr bool __is_strided_slice = false; +inline constexpr bool __is_strided_slice = false; template -_CCCL_INLINE_VAR constexpr bool __is_strided_slice> = true; +inline constexpr bool __is_strided_slice> = true; struct full_extent_t { _CCCL_HIDE_FROM_ABI explicit full_extent_t() = default; }; -_CCCL_INLINE_VAR constexpr full_extent_t full_extent{}; +inline constexpr full_extent_t full_extent{}; // [mdspan.submdspan.helpers] _CCCL_TEMPLATE(class _Tp) diff --git a/libcudacxx/include/cuda/std/__memory/allocator_arg_t.h b/libcudacxx/include/cuda/std/__memory/allocator_arg_t.h index d1ca1ab83a7..b785e980a0a 100644 --- a/libcudacxx/include/cuda/std/__memory/allocator_arg_t.h +++ b/libcudacxx/include/cuda/std/__memory/allocator_arg_t.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT allocator_arg_t _CCCL_HIDE_FROM_ABI explicit allocator_arg_t() = default; }; -_CCCL_INLINE_VAR constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +inline constexpr allocator_arg_t allocator_arg = allocator_arg_t(); // allocator construction diff --git a/libcudacxx/include/cuda/std/__memory/allocator_traits.h b/libcudacxx/include/cuda/std/__memory/allocator_traits.h index a22e5b09695..3793098a3cd 100644 --- a/libcudacxx/include/cuda/std/__memory/allocator_traits.h +++ b/libcudacxx/include/cuda/std/__memory/allocator_traits.h @@ -55,9 +55,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #else // ^^^ _CCCL_NO_VARIABLE_TEMPLATES ^^^ / vvv !_CCCL_NO_VARIABLE_TEMPLATES vvv # define _LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY) \ template \ - _CCCL_INLINE_VAR constexpr bool NAME##_v = false; \ + inline constexpr bool NAME##_v = false; \ template \ - _CCCL_INLINE_VAR constexpr bool NAME##_v<_Tp, void_t> = true; + inline constexpr bool NAME##_v<_Tp, void_t> = true; #endif // !_CCCL_NO_VARIABLE_TEMPLATES // __pointer diff --git a/libcudacxx/include/cuda/std/__memory/uses_allocator.h b/libcudacxx/include/cuda/std/__memory/uses_allocator.h index f97bf611020..89a44aca1a3 100644 --- a/libcudacxx/include/cuda/std/__memory/uses_allocator.h +++ b/libcudacxx/include/cuda/std/__memory/uses_allocator.h @@ -44,15 +44,14 @@ struct __uses_allocator<_Tp, _Alloc, true> : is_convertible<_Alloc, typename _Tp {}; #else // ^^^ _CCCL_NO_VARIABLE_TEMPLATES ^^^ / vvv !_CCCL_NO_VARIABLE_TEMPLATES vvv template -_CCCL_INLINE_VAR constexpr bool __has_allocator_type_v = false; +inline constexpr bool __has_allocator_type_v = false; template -_CCCL_INLINE_VAR constexpr bool __has_allocator_type_v<_Tp, void_t> = true; +inline constexpr bool __has_allocator_type_v<_Tp, void_t> = true; template -_CCCL_INLINE_VAR constexpr bool __uses_allocator_v = false; +inline constexpr bool __uses_allocator_v = false; template -_CCCL_INLINE_VAR constexpr bool __uses_allocator_v<_Tp, _Alloc, true> = - is_convertible_v<_Alloc, typename _Tp::allocator_type>; +inline constexpr bool __uses_allocator_v<_Tp, _Alloc, true> = is_convertible_v<_Alloc, typename _Tp::allocator_type>; #endif // !_CCCL_NO_VARIABLE_TEMPLATES template @@ -61,7 +60,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT uses_allocator {}; template -_CCCL_INLINE_VAR constexpr bool uses_allocator_v = _CCCL_TRAIT(__uses_allocator, _Tp, _Alloc); +inline constexpr bool uses_allocator_v = _CCCL_TRAIT(__uses_allocator, _Tp, _Alloc); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__ranges/concepts.h b/libcudacxx/include/cuda/std/__ranges/concepts.h index 2ccb047ca36..5cb3e557919 100644 --- a/libcudacxx/include/cuda/std/__ranges/concepts.h +++ b/libcudacxx/include/cuda/std/__ranges/concepts.h @@ -124,10 +124,10 @@ template concept common_range = range<_Tp> && same_as, sentinel_t<_Tp>>; template -_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list = false; +inline constexpr bool __is_std_initializer_list = false; template -_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list> = true; +inline constexpr bool __is_std_initializer_list> = true; template concept viewable_range = @@ -270,10 +270,10 @@ template _CCCL_CONCEPT common_range = _CCCL_FRAGMENT(__common_range_, _Tp); template -_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list = false; +inline constexpr bool __is_std_initializer_list = false; template -_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list> = true; +inline constexpr bool __is_std_initializer_list> = true; template _CCCL_CONCEPT_FRAGMENT( diff --git a/libcudacxx/include/cuda/std/__ranges/empty_view.h b/libcudacxx/include/cuda/std/__ranges/empty_view.h index 027e4af5094..1089d23f385 100644 --- a/libcudacxx/include/cuda/std/__ranges/empty_view.h +++ b/libcudacxx/include/cuda/std/__ranges/empty_view.h @@ -57,7 +57,7 @@ class empty_view : public view_interface> _LIBCUDACXX_END_NAMESPACE_RANGES_ABI template -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; +inline constexpr bool enable_borrowed_range> = true; _LIBCUDACXX_END_NAMESPACE_RANGES @@ -65,7 +65,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_VIEWS #if _CCCL_COMPILER(MSVC) template -_CCCL_INLINE_VAR constexpr empty_view<_Tp> empty{}; +inline constexpr empty_view<_Tp> empty{}; #else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv template _CCCL_GLOBAL_CONSTANT empty_view<_Tp> empty{}; diff --git a/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h b/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h index 9e3fde06dc6..0053634cdf3 100644 --- a/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h +++ b/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h @@ -30,7 +30,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES // [range.range], ranges template -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = false; +inline constexpr bool enable_borrowed_range = false; _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/enable_view.h b/libcudacxx/include/cuda/std/__ranges/enable_view.h index 860d3f5e53e..638ff8bf4f3 100644 --- a/libcudacxx/include/cuda/std/__ranges/enable_view.h +++ b/libcudacxx/include/cuda/std/__ranges/enable_view.h @@ -57,17 +57,17 @@ _LIBCUDACXX_HIDE_FROM_ABI void __is_derived_from_view_interface(const _Op*, cons #if !defined(_CCCL_NO_CONCEPTS) template -_CCCL_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base> || requires { +inline constexpr bool enable_view = derived_from<_Tp, view_base> || requires { _CUDA_VRANGES::__is_derived_from_view_interface((_Tp*) nullptr, (_Tp*) nullptr); }; #else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv template -_CCCL_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base>; +inline constexpr bool enable_view = derived_from<_Tp, view_base>; template -_CCCL_INLINE_VAR constexpr bool +inline constexpr bool enable_view<_Tp, void_t> = true; #endif // _CCCL_NO_CONCEPTS diff --git a/libcudacxx/include/cuda/std/__ranges/owning_view.h b/libcudacxx/include/cuda/std/__ranges/owning_view.h index c98925e8e27..daaa70bd76c 100644 --- a/libcudacxx/include/cuda/std/__ranges/owning_view.h +++ b/libcudacxx/include/cuda/std/__ranges/owning_view.h @@ -154,7 +154,7 @@ _LIBCUDACXX_CTAD_SUPPORTED_FOR_TYPE(owning_view); _LIBCUDACXX_END_NAMESPACE_RANGES_ABI template -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rp>; +inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rp>; _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/ref_view.h b/libcudacxx/include/cuda/std/__ranges/ref_view.h index 220429efba4..6cd10cee9bd 100644 --- a/libcudacxx/include/cuda/std/__ranges/ref_view.h +++ b/libcudacxx/include/cuda/std/__ranges/ref_view.h @@ -114,7 +114,7 @@ _CCCL_HOST_DEVICE ref_view(_Range&) -> ref_view<_Range>; _LIBCUDACXX_END_NAMESPACE_RANGES_ABI template -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; +inline constexpr bool enable_borrowed_range> = true; _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/size.h b/libcudacxx/include/cuda/std/__ranges/size.h index 4380801901e..de04319759f 100644 --- a/libcudacxx/include/cuda/std/__ranges/size.h +++ b/libcudacxx/include/cuda/std/__ranges/size.h @@ -37,7 +37,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES template -_CCCL_INLINE_VAR constexpr bool disable_sized_range = false; +inline constexpr bool disable_sized_range = false; // [range.prim.size] diff --git a/libcudacxx/include/cuda/std/__ranges/subrange.h b/libcudacxx/include/cuda/std/__ranges/subrange.h index d533118a989..8ea6bc30382 100644 --- a/libcudacxx/include/cuda/std/__ranges/subrange.h +++ b/libcudacxx/include/cuda/std/__ranges/subrange.h @@ -462,7 +462,7 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __s } template -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; +inline constexpr bool enable_borrowed_range> = true; template using borrowed_subrange_t = enable_if_t, _If, subrange>, dangling>>; diff --git a/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h b/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h index 66cc8c3f4e1..39259ab2c8a 100644 --- a/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h +++ b/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h @@ -68,7 +68,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT tuple_size<__tuple_types<_Tp...>> {}; template -_CCCL_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value; +inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/alignment_of.h b/libcudacxx/include/cuda/std/__type_traits/alignment_of.h index 6d988d94c8b..d3d47ac1a0f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/alignment_of.h +++ b/libcudacxx/include/cuda/std/__type_traits/alignment_of.h @@ -31,7 +31,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT alignment_of : public integral_constant -_CCCL_INLINE_VAR constexpr size_t alignment_of_v = alignof(_Tp); +inline constexpr size_t alignment_of_v = alignof(_Tp); #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/always_false.h b/libcudacxx/include/cuda/std/__type_traits/always_false.h index ebd387ecb05..4e7fdd9af02 100644 --- a/libcudacxx/include/cuda/std/__type_traits/always_false.h +++ b/libcudacxx/include/cuda/std/__type_traits/always_false.h @@ -24,7 +24,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_INLINE_VAR constexpr bool __always_false_v = false; +inline constexpr bool __always_false_v = false; _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/common_reference.h b/libcudacxx/include/cuda/std/__type_traits/common_reference.h index 7db241807eb..7d2d8b45742 100644 --- a/libcudacxx/include/cuda/std/__type_traits/common_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/common_reference.h @@ -164,10 +164,10 @@ using common_reference_t _CCCL_NODEBUG_ALIAS = typename common_reference<_Types. #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool __has_common_reference = false; +inline constexpr bool __has_common_reference = false; template -_CCCL_INLINE_VAR constexpr bool __has_common_reference<_Tp, _Up, void_t>> = true; +inline constexpr bool __has_common_reference<_Tp, _Up, void_t>> = true; #endif // !_CCCL_NO_VARIABLE_TEMPLATES // bullet 1 - sizeof...(T) == 0 diff --git a/libcudacxx/include/cuda/std/__type_traits/common_type.h b/libcudacxx/include/cuda/std/__type_traits/common_type.h index 22a518b5178..3a65367aef7 100644 --- a/libcudacxx/include/cuda/std/__type_traits/common_type.h +++ b/libcudacxx/include/cuda/std/__type_traits/common_type.h @@ -161,10 +161,10 @@ using common_type_t _CCCL_NODEBUG_ALIAS = typename common_type<_Tp...>::type; #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool __has_common_type = false; +inline constexpr bool __has_common_type = false; template -_CCCL_INLINE_VAR constexpr bool __has_common_type<_Tp, _Up, void_t>> = true; +inline constexpr bool __has_common_type<_Tp, _Up, void_t>> = true; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/conjunction.h b/libcudacxx/include/cuda/std/__type_traits/conjunction.h index 4b06e205b83..f9a2ce02d4c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/conjunction.h +++ b/libcudacxx/include/cuda/std/__type_traits/conjunction.h @@ -57,7 +57,7 @@ struct conjunction<_Arg, _Args...> : _If -_CCCL_INLINE_VAR constexpr bool conjunction_v = conjunction<_Args...>::value; +inline constexpr bool conjunction_v = conjunction<_Args...>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/disjunction.h b/libcudacxx/include/cuda/std/__type_traits/disjunction.h index 61bfca3f428..66d1c7d642e 100644 --- a/libcudacxx/include/cuda/std/__type_traits/disjunction.h +++ b/libcudacxx/include/cuda/std/__type_traits/disjunction.h @@ -67,7 +67,7 @@ struct disjunction : _Or<_Args...> #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool disjunction_v = _Or<_Args...>::value; +inline constexpr bool disjunction_v = _Or<_Args...>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/extent.h b/libcudacxx/include/cuda/std/__type_traits/extent.h index 54e02713344..847d9cfeb89 100644 --- a/libcudacxx/include/cuda/std/__type_traits/extent.h +++ b/libcudacxx/include/cuda/std/__type_traits/extent.h @@ -34,7 +34,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent : integral_constant -_CCCL_INLINE_VAR constexpr size_t extent_v = _CCCL_BUILTIN_ARRAY_EXTENT(_Tp, _Ip); +inline constexpr size_t extent_v = _CCCL_BUILTIN_ARRAY_EXTENT(_Tp, _Ip); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_ARRAY_EXTENT ^^^ / vvv !_CCCL_BUILTIN_ARRAY_EXTENT vvv @@ -58,7 +58,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent<_Tp[_Np], _Ip> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr size_t extent_v = extent<_Tp, _Ip>::value; +inline constexpr size_t extent_v = extent<_Tp, _Ip>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_ARRAY_EXTENT diff --git a/libcudacxx/include/cuda/std/__type_traits/fold.h b/libcudacxx/include/cuda/std/__type_traits/fold.h index abb079dc076..e8c2e4cc83f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/fold.h +++ b/libcudacxx/include/cuda/std/__type_traits/fold.h @@ -31,10 +31,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD // Use fold expressions when possible to implement __fold_and[_v] and // __fold_or[_v]. template -_CCCL_INLINE_VAR constexpr bool __fold_and_v = (_Preds && ...); +inline constexpr bool __fold_and_v = (_Preds && ...); template -_CCCL_INLINE_VAR constexpr bool __fold_or_v = (_Preds || ...); +inline constexpr bool __fold_or_v = (_Preds || ...); template using __fold_and = bool_constant; // cast to bool to avoid error from gcc < 8 @@ -56,10 +56,10 @@ using __fold_or = _Not<_IsSame<__fold_helper, __fold_helper<_P # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool __fold_and_v = __fold_and<_Preds...>::value; +inline constexpr bool __fold_and_v = __fold_and<_Preds...>::value; template -_CCCL_INLINE_VAR constexpr bool __fold_or_v = __fold_or<_Preds...>::value; +inline constexpr bool __fold_or_v = __fold_or<_Preds...>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // _CCCL_NO_FOLD_EXPRESSIONS diff --git a/libcudacxx/include/cuda/std/__type_traits/has_unique_object_representation.h b/libcudacxx/include/cuda/std/__type_traits/has_unique_object_representation.h index 4740e45df15..50e7eec9833 100644 --- a/libcudacxx/include/cuda/std/__type_traits/has_unique_object_representation.h +++ b/libcudacxx/include/cuda/std/__type_traits/has_unique_object_representation.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT has_unique_object_representations # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value; +inline constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // _CCCL_BUILTIN_HAS_UNIQUE_OBJECT_REPRESENTATIONS diff --git a/libcudacxx/include/cuda/std/__type_traits/has_virtual_destructor.h b/libcudacxx/include/cuda/std/__type_traits/has_virtual_destructor.h index 6e5440e5131..d28c93cda93 100644 --- a/libcudacxx/include/cuda/std/__type_traits/has_virtual_destructor.h +++ b/libcudacxx/include/cuda/std/__type_traits/has_virtual_destructor.h @@ -41,7 +41,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT has_virtual_destructor : public false_type #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; +inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_abstract.h b/libcudacxx/include/cuda/std/__type_traits/is_abstract.h index 80296daab27..edd72b460ea 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_abstract.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_abstract.h @@ -30,7 +30,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_abstract : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_abstract_v = __is_abstract(_Tp); +inline constexpr bool is_abstract_v = __is_abstract(_Tp); #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_aggregate.h b/libcudacxx/include/cuda/std/__type_traits/is_aggregate.h index 765978377d3..9f4d5338e5a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_aggregate.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_aggregate.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_aggregate : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_aggregate_v = _CCCL_BUILTIN_IS_AGGREGATE(_Tp); +inline constexpr bool is_aggregate_v = _CCCL_BUILTIN_IS_AGGREGATE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_AGGREGATE) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_arithmetic.h b/libcudacxx/include/cuda/std/__type_traits/is_arithmetic.h index 0ba1a5138cf..d999ecd507a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_arithmetic.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_arithmetic.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_arithmetic #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; +inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_array.h b/libcudacxx/include/cuda/std/__type_traits/is_array.h index 703899a55f9..75298a49b20 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_array.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_array : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_array_v = _CCCL_BUILTIN_IS_ARRAY(_Tp); +inline constexpr bool is_array_v = _CCCL_BUILTIN_IS_ARRAY(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -52,7 +52,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_array<_Tp[_Np]> : public true_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_array_v = is_array<_Tp>::value; +inline constexpr bool is_array_v = is_array<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_ARRAY) && !defined(_LIBCUDACXX_USE_IS_ARRAY_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_assignable.h index cd7f6bb9b67..1a921f8f3eb 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_assignable.h @@ -41,7 +41,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_assignable_v = _CCCL_BUILTIN_IS_ASSIGNABLE(_T1, _T2); +inline constexpr bool is_assignable_v = _CCCL_BUILTIN_IS_ASSIGNABLE(_T1, _T2); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -68,7 +68,7 @@ struct is_assignable : public __is_assignable_imp<_Tp, _Arg> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value; +inline constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_ASSIGNABLE) && !defined(_LIBCUDACXX_USE_IS_ASSIGNABLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_base_of.h b/libcudacxx/include/cuda/std/__type_traits/is_base_of.h index 33fe61668b6..8366086a7ab 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_base_of.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_base_of.h @@ -36,7 +36,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_base_of : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_base_of_v = _CCCL_BUILTIN_IS_BASE_OF(_Bp, _Dp); +inline constexpr bool is_base_of_v = _CCCL_BUILTIN_IS_BASE_OF(_Bp, _Dp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // defined(_CCCL_BUILTIN_IS_BASE_OF) && !defined(_LIBCUDACXX_USE_IS_BASE_OF_FALLBACK) @@ -73,7 +73,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_base_of # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_base_of_v = is_base_of<_Bp, _Dp>::value; +inline constexpr bool is_base_of_v = is_base_of<_Bp, _Dp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_BASE_OF) && !defined(_LIBCUDACXX_USE_IS_BASE_OF_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h b/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h index 983e17e3553..6a5189bf08f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h @@ -41,7 +41,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_bounded_array<_Tp[_Np]> : true_type #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value; +inline constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_callable.h b/libcudacxx/include/cuda/std/__type_traits/is_callable.h index 7e577cfc8a0..83a99a2b7f3 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_callable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_callable.h @@ -34,7 +34,7 @@ struct __is_callable : _IsValidExpansion<__call_result_t, _Func, _Args...> #ifndef _CCCL_NO_VARIABLE_TEMPLATES template -_CCCL_INLINE_VAR constexpr bool __is_callable_v = _IsValidExpansion<__call_result_t, _Func, _Args...>::value; +inline constexpr bool __is_callable_v = _IsValidExpansion<__call_result_t, _Func, _Args...>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_class.h b/libcudacxx/include/cuda/std/__type_traits/is_class.h index dc1a5d47e46..2a59e96d31b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_class.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_class.h @@ -38,7 +38,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_class : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_class_v = _CCCL_BUILTIN_IS_CLASS(_Tp); +inline constexpr bool is_class_v = _CCCL_BUILTIN_IS_CLASS(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -58,7 +58,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_class # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_class_v = is_class<_Tp>::value; +inline constexpr bool is_class_v = is_class<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_CLASS) && !defined(_LIBCUDACXX_USE_IS_CLASS_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_compound.h b/libcudacxx/include/cuda/std/__type_traits/is_compound.h index 005b9ce1f57..0ef1e17663d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_compound.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_compound.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_compound : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_compound_v = _CCCL_BUILTIN_IS_COMPOUND(_Tp); +inline constexpr bool is_compound_v = _CCCL_BUILTIN_IS_COMPOUND(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_COMPOUND ^^^ / vvv !_CCCL_BUILTIN_IS_COMPOUND vvv @@ -44,7 +44,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_compound : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_compound_v = is_compound<_Tp>::value; +inline constexpr bool is_compound_v = is_compound<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_COMPOUND diff --git a/libcudacxx/include/cuda/std/__type_traits/is_const.h b/libcudacxx/include/cuda/std/__type_traits/is_const.h index 3f6e7755579..d3f2948c9f9 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_const.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_const.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_const : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_const_v = _CCCL_BUILTIN_IS_CONST(_Tp); +inline constexpr bool is_const_v = _CCCL_BUILTIN_IS_CONST(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_CONST ^^^ / vvv !_CCCL_BUILTIN_IS_CONST vvv @@ -46,7 +46,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_const<_Tp const> : public true_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_const_v = is_const<_Tp>::value; +inline constexpr bool is_const_v = is_const<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_CONST diff --git a/libcudacxx/include/cuda/std/__type_traits/is_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_constructible.h index 8e588272b2c..6847a81f418 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_constructible.h @@ -154,7 +154,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_constructible_v = _CCCL_BUILTIN_IS_CONSTRUCTIBLE(_Tp, _Args...); +inline constexpr bool is_constructible_v = _CCCL_BUILTIN_IS_CONSTRUCTIBLE(_Tp, _Args...); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -164,7 +164,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_constructible : public __cccl_is_constru # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value; +inline constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_CONSTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_CONSTRUCTIBLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_convertible.h b/libcudacxx/include/cuda/std/__type_traits/is_convertible.h index 4fbcb82deb6..d72b3064d4b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_convertible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_convertible.h @@ -40,7 +40,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_convertible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_convertible_v = _CCCL_BUILTIN_IS_CONVERTIBLE_TO(_T1, _T2); +inline constexpr bool is_convertible_v = _CCCL_BUILTIN_IS_CONVERTIBLE_TO(_T1, _T2); # endif // !_CCCL_NO_VARIABLE_TEMPLATES # if _CCCL_COMPILER(MSVC) // Workaround for DevCom-1627396 @@ -61,16 +61,16 @@ struct is_convertible : true_type {}; template -_CCCL_INLINE_VAR constexpr bool is_convertible_v<_Ty&, volatile _Ty&> = true; +inline constexpr bool is_convertible_v<_Ty&, volatile _Ty&> = true; template -_CCCL_INLINE_VAR constexpr bool is_convertible_v = true; +inline constexpr bool is_convertible_v = true; template -_CCCL_INLINE_VAR constexpr bool is_convertible_v<_Ty&, const volatile _Ty&> = true; +inline constexpr bool is_convertible_v<_Ty&, const volatile _Ty&> = true; template -_CCCL_INLINE_VAR constexpr bool is_convertible_v = true; +inline constexpr bool is_convertible_v = true; # endif // _CCCL_COMPILER(MSVC) #else // ^^^ _CCCL_BUILTIN_IS_CONVERTIBLE_TO ^^^ / vvv !_CCCL_BUILTIN_IS_CONVERTIBLE_TO vvv @@ -204,7 +204,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_convertible : public __is_convertible_fa # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_convertible_v = is_convertible<_From, _To>::value; +inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_CONVERTIBLE_TO diff --git a/libcudacxx/include/cuda/std/__type_traits/is_copy_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_copy_assignable.h index 946fb95d107..6c624b1cbcb 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_copy_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_copy_assignable.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_copy_assignable #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; +inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_copy_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_copy_constructible.h index 029b4092696..4046f8564db 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_copy_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_copy_constructible.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_copy_constructible #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; +inline constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_default_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_default_constructible.h index 713ffa8f6a2..c5c899a3401 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_default_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_default_constructible.h @@ -30,7 +30,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_default_constructible : public is_constr #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_default_constructible_v = is_constructible_v<_Tp>; +inline constexpr bool is_default_constructible_v = is_constructible_v<_Tp>; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_destructible.h b/libcudacxx/include/cuda/std/__type_traits/is_destructible.h index f507f6b1f5a..8f4c150534d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_destructible.h @@ -37,7 +37,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_destructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_destructible_v = _CCCL_BUILTIN_IS_DESTRUCTIBLE(_Tp); +inline constexpr bool is_destructible_v = _CCCL_BUILTIN_IS_DESTRUCTIBLE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_DESTRUCTIBLE ^^^ / vvv !_CCCL_BUILTIN_IS_DESTRUCTIBLE vvv @@ -105,7 +105,7 @@ struct is_destructible : public false_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_destructible_v = is_destructible<_Tp>::value; +inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_DESTRUCTIBLE diff --git a/libcudacxx/include/cuda/std/__type_traits/is_empty.h b/libcudacxx/include/cuda/std/__type_traits/is_empty.h index dc2a3691321..514ad905fca 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_empty.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_empty.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_empty : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_empty_v = _CCCL_BUILTIN_IS_EMPTY(_Tp); +inline constexpr bool is_empty_v = _CCCL_BUILTIN_IS_EMPTY(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -63,7 +63,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_empty : public __cccl_empty<_Tp> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_empty_v = is_empty<_Tp>::value; +inline constexpr bool is_empty_v = is_empty<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_EMPTY) && !defined(_LIBCUDACXX_USE_IS_EMPTY_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_enum.h b/libcudacxx/include/cuda/std/__type_traits/is_enum.h index e33cc4d2e34..f8b6276b892 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_enum.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_enum.h @@ -42,7 +42,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_enum : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_enum_v = _CCCL_BUILTIN_IS_ENUM(_Tp); +inline constexpr bool is_enum_v = _CCCL_BUILTIN_IS_ENUM(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -58,7 +58,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_enum # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_enum_v = is_enum<_Tp>::value; +inline constexpr bool is_enum_v = is_enum<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_ENUM) && !defined(_LIBCUDACXX_USE_IS_ENUM_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_extended_arithmetic.h b/libcudacxx/include/cuda/std/__type_traits/is_extended_arithmetic.h index 8cadf479d78..e90df64ce79 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_extended_arithmetic.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_extended_arithmetic.h @@ -27,7 +27,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_INLINE_VAR constexpr bool __is_extended_arithmetic_v = +inline constexpr bool __is_extended_arithmetic_v = _CCCL_TRAIT(is_arithmetic, _Tp) || _CCCL_TRAIT(__is_extended_floating_point, _Tp); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_extended_floating_point.h b/libcudacxx/include/cuda/std/__type_traits/is_extended_floating_point.h index 538f3260f19..5b05c160b5d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_extended_floating_point.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_extended_floating_point.h @@ -31,7 +31,7 @@ struct __is_extended_floating_point : false_type #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v +inline constexpr bool __is_extended_floating_point_v # if defined(_CCCL_NO_INLINE_VARIABLES) = __is_extended_floating_point<_Tp>::value; # else // ^^^ _CCCL_NO_INLINE_VARIABLES ^^^ / vvv !_CCCL_NO_INLINE_VARIABLES vvv @@ -46,7 +46,7 @@ struct __is_extended_floating_point<__half> : true_type # ifndef _CCCL_NO_INLINE_VARIABLES template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__half> = true; +inline constexpr bool __is_extended_floating_point_v<__half> = true; # endif // !_CCCL_NO_INLINE_VARIABLES #endif // _CCCL_HAS_NVFP16 @@ -57,7 +57,7 @@ struct __is_extended_floating_point<__nv_bfloat16> : true_type # ifndef _CCCL_NO_INLINE_VARIABLES template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_bfloat16> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_bfloat16> = true; # endif // !_CCCL_NO_INLINE_VARIABLES #endif // _CCCL_HAS_NVBF16 @@ -80,15 +80,15 @@ struct __is_extended_floating_point<__nv_fp8_e8m0> : true_type #ifndef _CCCL_NO_INLINE_VARIABLES # if _CCCL_HAS_NVFP8_E4M3() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp8_e4m3> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_fp8_e4m3> = true; # endif // _CCCL_HAS_NVFP8_E4M3() # if _CCCL_HAS_NVFP8_E5M2() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp8_e5m2> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_fp8_e5m2> = true; # endif // _CCCL_HAS_NVFP8_E5M2() # if _CCCL_HAS_NVFP8_E8M0() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp8_e8m0> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_fp8_e8m0> = true; # endif // _CCCL_HAS_NVFP8_E8M0() #endif // !_CCCL_NO_INLINE_VARIABLES @@ -105,11 +105,11 @@ struct __is_extended_floating_point<__nv_fp6_e3m2> : true_type #ifndef _CCCL_NO_INLINE_VARIABLES # if _CCCL_HAS_NVFP6_E2M3() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp6_e2m3> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_fp6_e2m3> = true; # endif // _CCCL_HAS_NVFP6_E2M3() # if _CCCL_HAS_NVFP6_E3M2() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp6_e3m2> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_fp6_e3m2> = true; # endif // _CCCL_HAS_NVFP6_E3M2() #endif // !_CCCL_NO_INLINE_VARIABLES @@ -121,7 +121,7 @@ struct __is_extended_floating_point<__nv_fp4_e2m1> : true_type #ifndef _CCCL_NO_INLINE_VARIABLES # if _CCCL_HAS_NVFP4_E2M1() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp4_e2m1> = true; +inline constexpr bool __is_extended_floating_point_v<__nv_fp4_e2m1> = true; # endif // _CCCL_HAS_NVFP4_E2M1() #endif // !_CCCL_NO_INLINE_VARIABLES @@ -133,7 +133,7 @@ struct __is_extended_floating_point<__float128> : true_type #ifndef _CCCL_NO_INLINE_VARIABLES # if _CCCL_HAS_FLOAT128() template <> -_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__float128> = true; +inline constexpr bool __is_extended_floating_point_v<__float128> = true; # endif // _CCCL_HAS_FLOAT128() #endif // !_CCCL_NO_INLINE_VARIABLES diff --git a/libcudacxx/include/cuda/std/__type_traits/is_final.h b/libcudacxx/include/cuda/std/__type_traits/is_final.h index 0319cd01662..d2e74dc292c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_final.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_final.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_final : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_final_v = _CCCL_BUILTIN_IS_FINAL(_Tp); +inline constexpr bool is_final_v = _CCCL_BUILTIN_IS_FINAL(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_FINAL ^^^ / vvv !_CCCL_BUILTIN_IS_FINAL vvv @@ -43,7 +43,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_final : public false_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_final_v = false; +inline constexpr bool is_final_v = false; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_FINAL diff --git a/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h b/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h index 913bacdb2a6..0a7395a6b01 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h @@ -44,7 +44,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_floating_point : public __cccl_is_floati #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; +inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_function.h b/libcudacxx/include/cuda/std/__type_traits/is_function.h index 58c4669368c..8a8da975dda 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_function.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_function.h @@ -37,7 +37,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_function : integral_constant -_CCCL_INLINE_VAR constexpr bool is_function_v = _CCCL_BUILTIN_IS_FUNCTION(_Tp); +inline constexpr bool is_function_v = _CCCL_BUILTIN_IS_FUNCTION(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -49,7 +49,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_function # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_function_v = is_function<_Tp>::value; +inline constexpr bool is_function_v = is_function<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_FUNCTION) && !defined(_LIBCUDACXX_USE_IS_FUNCTION_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_fundamental.h b/libcudacxx/include/cuda/std/__type_traits/is_fundamental.h index 70e818e50f2..5ce33da98d2 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_fundamental.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_fundamental.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_fundamental : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_fundamental_v = _CCCL_BUILTIN_IS_FUNDAMENTAL(_Tp); +inline constexpr bool is_fundamental_v = _CCCL_BUILTIN_IS_FUNDAMENTAL(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_FUNDAMENTAL ^^^ / vvv !_CCCL_BUILTIN_IS_FUNDAMENTAL vvv @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_fundamental # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; +inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_FUNDAMENTAL diff --git a/libcudacxx/include/cuda/std/__type_traits/is_integer.h b/libcudacxx/include/cuda/std/__type_traits/is_integer.h index dc1ecf51a79..ff266f3c8c7 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_integer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_integer.h @@ -30,8 +30,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD // In contrast to is_integral, __cccl_is_integer excludes bool and character types. // See https://eel.is/c++draft/basic.fundamental#1 template -_CCCL_INLINE_VAR constexpr bool __cccl_is_integer_v = - __cccl_is_signed_integer_v<_Tp> || __cccl_is_unsigned_integer_v<_Tp>; +inline constexpr bool __cccl_is_integer_v = __cccl_is_signed_integer_v<_Tp> || __cccl_is_unsigned_integer_v<_Tp>; _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_integral.h b/libcudacxx/include/cuda/std/__type_traits/is_integral.h index bab7a663483..498dc891aaf 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_integral.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_integral.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_integral : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_integral_v = _CCCL_BUILTIN_IS_INTEGRAL(_Tp); +inline constexpr bool is_integral_v = _CCCL_BUILTIN_IS_INTEGRAL(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_INTEGRAL ^^^ / vvv !_CCCL_BUILTIN_IS_INTEGRAL vvv @@ -109,7 +109,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_integral # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_integral_v = is_integral<_Tp>::value; +inline constexpr bool is_integral_v = is_integral<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_INTEGRAL diff --git a/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h b/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h index 6f5b8dcd86f..ed1ace3958b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h @@ -35,7 +35,7 @@ _LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant -_LIBCUDACXX_DEPRECATED_IN_CXX17 _CCCL_INLINE_VAR constexpr bool is_literal_type_v = __is_literal_type(_Tp); +_LIBCUDACXX_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = __is_literal_type(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -49,7 +49,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT _LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_LIBCUDACXX_DEPRECATED_IN_CXX17 _CCCL_INLINE_VAR constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; +_LIBCUDACXX_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_LITERAL) && !defined(_LIBCUDACXX_USE_IS_LITERAL_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h index fff6f96ee81..8d87676471b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h @@ -57,7 +57,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER(_Tp); +inline constexpr bool is_member_function_pointer_v = _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER vvv @@ -69,7 +69,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; +inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER diff --git a/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h index 86ce9dd9d26..0fa740a8dbe 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_object_pointer # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_member_object_pointer_v = _CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER(_Tp); +inline constexpr bool is_member_object_pointer_v = _CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER vvv @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_object_pointer # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; +inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER diff --git a/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h index 74ceaf6e7d3..eecd3bfc74a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_member_pointer_v = _CCCL_BUILTIN_IS_MEMBER_POINTER(_Tp); +inline constexpr bool is_member_pointer_v = _CCCL_BUILTIN_IS_MEMBER_POINTER(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_POINTER vvv @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_MEMBER_POINTER diff --git a/libcudacxx/include/cuda/std/__type_traits/is_move_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_move_assignable.h index bffe4e2d085..73bfe45acac 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_move_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_move_assignable.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_move_assignable #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; +inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_move_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_move_constructible.h index 682d6c0b994..611f592a57a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_move_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_move_constructible.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_move_constructible : public is_construct #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value; +inline constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h index c89e8a89338..53df13eaf9e 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h @@ -36,7 +36,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(_Tp, _Arg); +inline constexpr bool is_nothrow_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(_Tp, _Arg); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #elif !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT_SFINAE) @@ -60,7 +60,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; +inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _LIBCUDACXX_HAS_NO_NOEXCEPT_SFINAE ^^^ / vvv !_LIBCUDACXX_HAS_NO_NOEXCEPT_SFINAE vvv @@ -115,7 +115,7 @@ struct is_nothrow_assignable<_Tp&, _Tp&&> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; +inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT_SFINAE) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h index 6dc83a15a36..5748e6db282 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h @@ -36,7 +36,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp, _Args...); +inline constexpr bool is_nothrow_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp, _Args...); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -74,7 +74,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible<_Tp[_Ns]> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; +inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_NOTHROW_CONSTRUCTIBLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_convertible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_convertible.h index ceb428800e0..f92859d289f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_convertible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_convertible.h @@ -49,7 +49,7 @@ struct is_nothrow_convertible #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value; +inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_assignable.h index 7f30b2f3336..d1208aa4143 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_assignable.h @@ -37,7 +37,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE( +inline constexpr bool is_nothrow_copy_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE( add_lvalue_reference_t<_Tp>, add_lvalue_reference_t::type>); # endif // !_CCCL_NO_VARIABLE_TEMPLATES @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; +inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_constructible.h index c2e373f4695..41c4ef82798 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_copy_constructible.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_constructible #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; +inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_default_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_default_constructible.h index 6cb7d21bc16..8bfaf71c302 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_default_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_default_constructible.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_default_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp); +inline constexpr bool is_nothrow_default_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -44,7 +44,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_default_constructible : public i # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = is_nothrow_constructible<_Tp>::value; +inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_constructible<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_NOTHROW_CONSTRUCTIBLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h index c555190e360..59cffc028fa 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h @@ -69,7 +69,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_destructible<_Tp&&> : public tru #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; +inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_assignable.h index c3f18b08363..fb194ee7e9c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_assignable.h @@ -37,7 +37,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = +inline constexpr bool is_nothrow_move_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(add_lvalue_reference_t<_Tp>, add_rvalue_reference_t<_Tp>); # endif // !_CCCL_NO_VARIABLE_TEMPLATES @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; +inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_constructible.h index 33bba7f140a..a59664b7e5e 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_move_constructible.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_constructible #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; +inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_null_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_null_pointer.h index 85359bd7ad7..6c961af7242 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_null_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_null_pointer.h @@ -43,7 +43,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_null_pointer : public __is_nullptr_t_imp #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; +inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_object.h b/libcudacxx/include/cuda/std/__type_traits/is_object.h index 1ffcd14faef..64958a1f2ab 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_object.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_object.h @@ -36,7 +36,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_object : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_object_v = _CCCL_BUILTIN_IS_OBJECT(_Tp); +inline constexpr bool is_object_v = _CCCL_BUILTIN_IS_OBJECT(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_object # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_object_v = is_object<_Tp>::value; +inline constexpr bool is_object_v = is_object<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_OBJECT) && !defined(_LIBCUDACXX_USE_IS_OBJECT_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_pod.h b/libcudacxx/include/cuda/std/__type_traits/is_pod.h index 0e14155d375..c84e07e4d0e 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_pod.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_pod.h @@ -37,7 +37,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pod : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_pod_v = _CCCL_BUILTIN_IS_POD(_Tp); +inline constexpr bool is_pod_v = _CCCL_BUILTIN_IS_POD(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -52,7 +52,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pod # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_pod_v = is_pod<_Tp>::value; +inline constexpr bool is_pod_v = is_pod<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_POD) && !defined(_LIBCUDACXX_USE_IS_POD_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_pointer.h index 67969fbbb56..44537540200 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_pointer.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pointer : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_pointer_v = _CCCL_BUILTIN_IS_POINTER(_Tp); +inline constexpr bool is_pointer_v = _CCCL_BUILTIN_IS_POINTER(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -51,7 +51,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pointer : public __cccl_is_pointer -_CCCL_INLINE_VAR constexpr bool is_pointer_v = is_pointer<_Tp>::value; +inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_POINTER) && !defined(_LIBCUDACXX_USE_IS_POINTER_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_polymorphic.h b/libcudacxx/include/cuda/std/__type_traits/is_polymorphic.h index 0a7de0e8a01..8aad2b6c7b4 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_polymorphic.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_polymorphic.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_polymorphic : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_polymorphic_v = _CCCL_BUILTIN_IS_POLYMORPHIC(_Tp); +inline constexpr bool is_polymorphic_v = _CCCL_BUILTIN_IS_POLYMORPHIC(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -53,7 +53,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_polymorphic # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; +inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_POLYMORPHIC) && !defined(_LIBCUDACXX_USE_IS_POLYMORPHIC_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_primary_template.h b/libcudacxx/include/cuda/std/__type_traits/is_primary_template.h index 42e42b6a953..b52228f1a61 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_primary_template.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_primary_template.h @@ -71,10 +71,10 @@ using __select_traits = conditional_t<__is_primary_cccl_template<_Iter>::value, # if defined(__GLIBCXX__) // libstdc++ uses `is_base_of` template -_CCCL_INLINE_VAR constexpr bool __is_primary_std_template_impl = +inline constexpr bool __is_primary_std_template_impl = _CCCL_TRAIT(is_base_of, ::std::__iterator_traits<_Iter>, ::std::iterator_traits<_Iter>); template -_CCCL_INLINE_VAR constexpr bool __is_primary_std_template_impl<_Iter, true> = true; +inline constexpr bool __is_primary_std_template_impl<_Iter, true> = true; // This is needed because with a defaulted template argument subsumption fails for C++20 for concepts // that involve incrementable_traits @@ -90,10 +90,10 @@ using __is_primary_std_template = _IsValidExpansion<__test_for_primary_template, # elif defined(_MSVC_STL_VERSION) || defined(_IS_WRS) // On MSVC we must check for the base class because `_From_primary` is only defined in C++20 template -_CCCL_INLINE_VAR constexpr bool __is_primary_std_template_impl = +inline constexpr bool __is_primary_std_template_impl = _CCCL_TRAIT(is_base_of, ::std::_Iterator_traits_base<_Iter>, ::std::iterator_traits<_Iter>); template -_CCCL_INLINE_VAR constexpr bool __is_primary_std_template_impl<_Iter, true> = true; +inline constexpr bool __is_primary_std_template_impl<_Iter, true> = true; // This is needed because with a defaulted template argument subsumption fails for C++20 for concepts // that involve incrementable_traits diff --git a/libcudacxx/include/cuda/std/__type_traits/is_reference.h b/libcudacxx/include/cuda/std/__type_traits/is_reference.h index ab7d401eb3b..f084b354bd0 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_reference.h @@ -44,11 +44,11 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_lvalue_reference_v = _CCCL_BUILTIN_IS_LVALUE_REFERENCE(_Tp); +inline constexpr bool is_lvalue_reference_v = _CCCL_BUILTIN_IS_LVALUE_REFERENCE(_Tp); template -_CCCL_INLINE_VAR constexpr bool is_rvalue_reference_v = _CCCL_BUILTIN_IS_RVALUE_REFERENCE(_Tp); +inline constexpr bool is_rvalue_reference_v = _CCCL_BUILTIN_IS_RVALUE_REFERENCE(_Tp); template -_CCCL_INLINE_VAR constexpr bool is_reference_v = _CCCL_BUILTIN_IS_REFERENCE(_Tp); +inline constexpr bool is_reference_v = _CCCL_BUILTIN_IS_REFERENCE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -79,13 +79,13 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference<_Tp&&> : public true_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; +inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; template -_CCCL_INLINE_VAR constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; +inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; template -_CCCL_INLINE_VAR constexpr bool is_reference_v = is_reference<_Tp>::value; +inline constexpr bool is_reference_v = is_reference<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_LVALUE_REFERENCE diff --git a/libcudacxx/include/cuda/std/__type_traits/is_same.h b/libcudacxx/include/cuda/std/__type_traits/is_same.h index 25cd34ba377..7738f27526f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_same.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_same.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_same : bool_constant<_CCCL_BUILTIN_IS_SA # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_same_v = _CCCL_BUILTIN_IS_SAME(_Tp, _Up); +inline constexpr bool is_same_v = _CCCL_BUILTIN_IS_SAME(_Tp, _Up); # endif // !_CCCL_NO_VARIABLE_TEMPLATES // _IsSame has the same effect as is_same but instantiates fewer types: @@ -59,9 +59,9 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_same<_Tp, _Tp> : public true_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_same_v = false; +inline constexpr bool is_same_v = false; template -_CCCL_INLINE_VAR constexpr bool is_same_v<_Tp, _Tp> = true; +inline constexpr bool is_same_v<_Tp, _Tp> = true; # endif // !_CCCL_NO_VARIABLE_TEMPLATES // _IsSame has the same effect as is_same but instantiates fewer types: diff --git a/libcudacxx/include/cuda/std/__type_traits/is_scalar.h b/libcudacxx/include/cuda/std/__type_traits/is_scalar.h index 423b9daa515..93080495c9d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_scalar.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_scalar.h @@ -38,7 +38,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_scalar_v = _CCCL_BUILTIN_IS_SCALAR(_Tp); +inline constexpr bool is_scalar_v = _CCCL_BUILTIN_IS_SCALAR(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -65,7 +65,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar : public true_type # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_scalar_v = is_scalar<_Tp>::value; +inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_SCALAR) && !defined(_LIBCUDACXX_USE_IS_SCALAR_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_scoped_enum.h b/libcudacxx/include/cuda/std/__type_traits/is_scoped_enum.h index 6c477fe2e6b..e0cd7a0c8a3 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_scoped_enum.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_scoped_enum.h @@ -42,7 +42,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scoped_enum : public __is_scoped_enum_he #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; +inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_signed.h b/libcudacxx/include/cuda/std/__type_traits/is_signed.h index 220790002ba..7d4d04fe007 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_signed.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_signed.h @@ -36,7 +36,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_signed_v = _CCCL_BUILTIN_IS_SIGNED(_Tp); +inline constexpr bool is_signed_v = _CCCL_BUILTIN_IS_SIGNED(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -63,7 +63,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public __cccl_is_signed<_Tp> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_signed_v = is_signed<_Tp>::value; +inline constexpr bool is_signed_v = is_signed<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_SIGNED) && !defined(_LIBCUDACXX_USE_IS_SIGNED_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h b/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h index 604c9c2d1e0..1fb50642e21 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h @@ -25,30 +25,30 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v = false; +inline constexpr bool __cccl_is_signed_integer_impl_v = false; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v = true; +inline constexpr bool __cccl_is_signed_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v = true; +inline constexpr bool __cccl_is_signed_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v = true; +inline constexpr bool __cccl_is_signed_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v = true; +inline constexpr bool __cccl_is_signed_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v = true; +inline constexpr bool __cccl_is_signed_integer_impl_v = true; #if _CCCL_HAS_INT128() template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_impl_v<__int128_t> = true; +inline constexpr bool __cccl_is_signed_integer_impl_v<__int128_t> = true; #endif // _CCCL_HAS_INT128() template -_CCCL_INLINE_VAR constexpr bool __cccl_is_signed_integer_v = __cccl_is_signed_integer_impl_v>; +inline constexpr bool __cccl_is_signed_integer_v = __cccl_is_signed_integer_impl_v>; _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_standard_layout.h b/libcudacxx/include/cuda/std/__type_traits/is_standard_layout.h index 4a4affe99b1..656ba8ff66b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_standard_layout.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_standard_layout.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_standard_layout # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_standard_layout_v = _CCCL_BUILTIN_IS_STANDARD_LAYOUT(_Tp); +inline constexpr bool is_standard_layout_v = _CCCL_BUILTIN_IS_STANDARD_LAYOUT(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_standard_layout # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; +inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_STANDARD_LAYOUT) && !defined(_LIBCUDACXX_USE_IS_STANDARD_LAYOUT_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h index 0b946e9d5af..09da3910ec4 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h @@ -185,16 +185,16 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_swappable {}; template -_CCCL_INLINE_VAR constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; +inline constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; template -_CCCL_INLINE_VAR constexpr bool is_swappable_v = is_swappable<_Tp>::value; +inline constexpr bool is_swappable_v = is_swappable<_Tp>::value; template -_CCCL_INLINE_VAR constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; +inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; template -_CCCL_INLINE_VAR constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; +inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivial.h b/libcudacxx/include/cuda/std/__type_traits/is_trivial.h index 36b58219a64..80b2beae5e4 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivial.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivial.h @@ -34,7 +34,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivial : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_trivial_v = _CCCL_BUILTIN_IS_TRIVIAL(_Tp); +inline constexpr bool is_trivial_v = _CCCL_BUILTIN_IS_TRIVIAL(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -46,7 +46,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivial # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivial_v = is_trivial<_Tp>::value; +inline constexpr bool is_trivial_v = is_trivial<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIAL) && !defined(_LIBCUDACXX_USE_IS_TRIVIAL_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_assignable.h index bdf3f986031..4d486e7439f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_assignable.h @@ -33,7 +33,7 @@ struct is_trivially_assignable : integral_constant -_CCCL_INLINE_VAR constexpr bool is_trivially_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(_Tp, _Arg); +inline constexpr bool is_trivially_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(_Tp, _Arg); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -60,7 +60,7 @@ struct is_trivially_assignable<_Tp&, _Tp&&> : integral_constant -_CCCL_INLINE_VAR constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value; +inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE) && !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_ASSIGNABLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_constructible.h index be3e3cea8de..aef9959e54c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_constructible.h @@ -34,7 +34,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, _Args...); +inline constexpr bool is_trivially_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, _Args...); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -71,7 +71,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_constructible<_Tp, _Tp&> # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; +inline constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_assignable.h index f71e293c493..6d9cc600904 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_assignable.h @@ -37,7 +37,7 @@ struct is_trivially_copy_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE( +inline constexpr bool is_trivially_copy_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE( add_lvalue_reference_t<_Tp>, add_lvalue_reference_t::type>); # endif // !_CCCL_NO_VARIABLE_TEMPLATES @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copy_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; +inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE) && !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_ASSIGNABLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_constructible.h index 9ee1f9339db..a465269cee2 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copy_constructible.h @@ -37,7 +37,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copy_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = +inline constexpr bool is_trivially_copy_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, add_lvalue_reference_t::type>); # endif // !_CCCL_NO_VARIABLE_TEMPLATES @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copy_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; +inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copyable.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copyable.h index 8a15f01ffed..aabc894a8be 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copyable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copyable.h @@ -35,7 +35,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copyable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_copyable_v = _CCCL_BUILTIN_IS_TRIVIALLY_COPYABLE(_Tp); +inline constexpr bool is_trivially_copyable_v = _CCCL_BUILTIN_IS_TRIVIALLY_COPYABLE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copyable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; +inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_COPYABLE) && !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_COPYABLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_default_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_default_constructible.h index 7a618e3cd45..7bafc7d4d94 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_default_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_default_constructible.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_default_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_default_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp); +inline constexpr bool is_trivially_default_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -44,7 +44,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_default_constructible : public # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; +inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h index 57a4af4829c..32af46ad553 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h @@ -63,7 +63,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_destructible<_Tp[]> : public f #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; +inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_assignable.h index 0cae127a1f7..1fdc8fee7c1 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_assignable.h @@ -37,7 +37,7 @@ struct is_trivially_move_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_move_assignable_v = +inline constexpr bool is_trivially_move_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(add_lvalue_reference_t<_Tp>, add_rvalue_reference_t<_Tp>); # endif // !_CCCL_NO_VARIABLE_TEMPLATES @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_move_assignable # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; +inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE) && !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_ASSIGNABLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_constructible.h index 21bb301cc4f..8cb011f82bd 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_move_constructible.h @@ -34,7 +34,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_move_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_move_constructible_v = +inline constexpr bool is_trivially_move_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, add_rvalue_reference_t<_Tp>); # endif // !_CCCL_NO_VARIABLE_TEMPLATES @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_move_constructible # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; +inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && diff --git a/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h b/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h index 2e09d4c8726..3aefcffa225 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h @@ -40,7 +40,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unbounded_array<_Tp[]> : true_type #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; +inline constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_union.h b/libcudacxx/include/cuda/std/__type_traits/is_union.h index 9978f99e6be..0ae663686c2 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_union.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_union.h @@ -33,7 +33,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_union : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_union_v = _CCCL_BUILTIN_IS_UNION(_Tp); +inline constexpr bool is_union_v = _CCCL_BUILTIN_IS_UNION(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -47,7 +47,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_union : public __cccl_union -_CCCL_INLINE_VAR constexpr bool is_union_v = is_union<_Tp>::value; +inline constexpr bool is_union_v = is_union<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_UNION) && !defined(_LIBCUDACXX_USE_IS_UNION_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h b/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h index 4a5ad7d92e2..96424db405d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h @@ -39,7 +39,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unsigned : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_unsigned_v = _CCCL_BUILTIN_IS_UNSIGNED(_Tp); +inline constexpr bool is_unsigned_v = _CCCL_BUILTIN_IS_UNSIGNED(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -66,7 +66,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unsigned : public __cccl_is_unsigned<_Tp # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; +inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_UNSIGNED) && !defined(_LIBCUDACXX_USE_IS_UNSIGNED_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h b/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h index ee62d717c85..25bc6aa27d1 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h @@ -25,30 +25,30 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v = false; +inline constexpr bool __cccl_is_unsigned_integer_impl_v = false; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v = true; +inline constexpr bool __cccl_is_unsigned_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v = true; +inline constexpr bool __cccl_is_unsigned_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v = true; +inline constexpr bool __cccl_is_unsigned_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v = true; +inline constexpr bool __cccl_is_unsigned_integer_impl_v = true; template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v = true; +inline constexpr bool __cccl_is_unsigned_integer_impl_v = true; #if _CCCL_HAS_INT128() template <> -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_impl_v<__uint128_t> = true; +inline constexpr bool __cccl_is_unsigned_integer_impl_v<__uint128_t> = true; #endif // _CCCL_HAS_INT128() template -_CCCL_INLINE_VAR constexpr bool __cccl_is_unsigned_integer_v = __cccl_is_unsigned_integer_impl_v>; +inline constexpr bool __cccl_is_unsigned_integer_v = __cccl_is_unsigned_integer_impl_v>; _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_void.h b/libcudacxx/include/cuda/std/__type_traits/is_void.h index 18eeb8559cd..97397ff7560 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_void.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_void.h @@ -34,7 +34,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_void : integral_constant -_CCCL_INLINE_VAR constexpr bool is_void_v = __is_void(_Tp); +inline constexpr bool is_void_v = __is_void(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -45,7 +45,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_void : public is_same, # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_void_v = is_void<_Tp>::value; +inline constexpr bool is_void_v = is_void<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_IS_VOID) && !defined(_LIBCUDACXX_USE_IS_VOID_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_volatile.h b/libcudacxx/include/cuda/std/__type_traits/is_volatile.h index 34b3262f9ba..2400c9f2a08 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_volatile.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_volatile.h @@ -32,7 +32,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_volatile : : public integral_constant -_CCCL_INLINE_VAR constexpr bool is_volatile_v = _CCCL_BUILTIN_IS_VOLATILE(_Tp); +inline constexpr bool is_volatile_v = _CCCL_BUILTIN_IS_VOLATILE(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else // ^^^ _CCCL_BUILTIN_IS_VOLATILE ^^^ / vvv !_CCCL_BUILTIN_IS_VOLATILE vvv @@ -46,7 +46,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_volatile<_Tp volatile> : public true_typ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool is_volatile_v = is_volatile<_Tp>::value; +inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // !_CCCL_BUILTIN_IS_VOLATILE diff --git a/libcudacxx/include/cuda/std/__type_traits/negation.h b/libcudacxx/include/cuda/std/__type_traits/negation.h index 59e3db631ad..a7fb0ac9639 100644 --- a/libcudacxx/include/cuda/std/__type_traits/negation.h +++ b/libcudacxx/include/cuda/std/__type_traits/negation.h @@ -34,7 +34,7 @@ struct negation : _Not<_Tp> #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool negation_v = !_Tp::value; +inline constexpr bool negation_v = !_Tp::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/rank.h b/libcudacxx/include/cuda/std/__type_traits/rank.h index cc31a54c35a..be2e11612da 100644 --- a/libcudacxx/include/cuda/std/__type_traits/rank.h +++ b/libcudacxx/include/cuda/std/__type_traits/rank.h @@ -33,7 +33,7 @@ struct rank : integral_constant # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr size_t rank_v = _CCCL_BUILTIN_ARRAY_RANK(_Tp); +inline constexpr size_t rank_v = _CCCL_BUILTIN_ARRAY_RANK(_Tp); # endif // !_CCCL_NO_VARIABLE_TEMPLATES #else @@ -50,7 +50,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT rank<_Tp[_Np]> : public integral_constant -_CCCL_INLINE_VAR constexpr size_t rank_v = rank<_Tp>::value; +inline constexpr size_t rank_v = rank<_Tp>::value; # endif // !_CCCL_NO_VARIABLE_TEMPLATES #endif // defined(_CCCL_BUILTIN_ARRAY_RANK) && !defined(_LIBCUDACXX_USE_ARRAY_RANK_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/reference_constructs_from_temporary.h b/libcudacxx/include/cuda/std/__type_traits/reference_constructs_from_temporary.h index b4c3b0302d9..6651d44fe3b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/reference_constructs_from_temporary.h +++ b/libcudacxx/include/cuda/std/__type_traits/reference_constructs_from_temporary.h @@ -32,7 +32,7 @@ struct reference_constructs_from_temporary {}; template -_CCCL_INLINE_VAR constexpr bool reference_constructs_from_temporary_v = +inline constexpr bool reference_constructs_from_temporary_v = _CCCL_BUILTIN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY(_Tp, _Up); #else @@ -44,8 +44,7 @@ struct reference_constructs_from_temporary : integral_constant }; template -_CCCL_INLINE_VAR constexpr bool reference_constructs_from_temporary_v = - reference_constructs_from_temporary<_Tp, _Up>::value; +inline constexpr bool reference_constructs_from_temporary_v = reference_constructs_from_temporary<_Tp, _Up>::value; #endif // !_CCCL_BUILTIN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY diff --git a/libcudacxx/include/cuda/std/__type_traits/reference_converts_from_temporary.h b/libcudacxx/include/cuda/std/__type_traits/reference_converts_from_temporary.h index 4c611eddfcd..3ed9b1d5990 100644 --- a/libcudacxx/include/cuda/std/__type_traits/reference_converts_from_temporary.h +++ b/libcudacxx/include/cuda/std/__type_traits/reference_converts_from_temporary.h @@ -32,8 +32,7 @@ struct reference_converts_from_temporary {}; template -_CCCL_INLINE_VAR constexpr bool reference_converts_from_temporary_v = - _CCCL_BUILTIN_REFERENCE_CONVERTS_FROM_TEMPORARY(_Tp, _Up); +inline constexpr bool reference_converts_from_temporary_v = _CCCL_BUILTIN_REFERENCE_CONVERTS_FROM_TEMPORARY(_Tp, _Up); #else @@ -44,8 +43,7 @@ struct reference_converts_from_temporary : integral_constant }; template -_CCCL_INLINE_VAR constexpr bool reference_converts_from_temporary_v = - reference_converts_from_temporary<_Tp, _Up>::value; +inline constexpr bool reference_converts_from_temporary_v = reference_converts_from_temporary<_Tp, _Up>::value; #endif // !_CCCL_BUILTIN_REFERENCE_CONVERTS_FROM_TEMPORARY diff --git a/libcudacxx/include/cuda/std/__type_traits/type_set.h b/libcudacxx/include/cuda/std/__type_traits/type_set.h index c83ebd06af7..6209d11beb8 100644 --- a/libcudacxx/include/cuda/std/__type_traits/type_set.h +++ b/libcudacxx/include/cuda/std/__type_traits/type_set.h @@ -39,7 +39,7 @@ struct __type_set_contains : __fold_and<_CCCL_TRAIT(is_base_of, type_identity<_T #ifndef _CCCL_NO_VARIABLE_TEMPLATES template -_CCCL_INLINE_VAR constexpr bool __type_set_contains_v = __fold_and_v, _Set>...>; +inline constexpr bool __type_set_contains_v = __fold_and_v, _Set>...>; #endif // _CCCL_NO_VARIABLE_TEMPLATES namespace __set @@ -107,7 +107,7 @@ using __type_set_eq = #ifndef _CCCL_NO_VARIABLE_TEMPLATES template -_CCCL_INLINE_VAR constexpr bool __type_set_eq_v = __type_set_eq<_ExpectedSet, _Ts...>::value; +inline constexpr bool __type_set_eq_v = __type_set_eq<_ExpectedSet, _Ts...>::value; #endif // _CCCL_NO_VARIABLE_TEMPLATES template @@ -125,7 +125,7 @@ struct __is_included_in : __fold_or<_CCCL_TRAIT(is_same, _Ty, _Ts)...> #ifndef _CCCL_NO_VARIABLE_TEMPLATES template -_CCCL_INLINE_VAR constexpr bool __is_included_in_v = __fold_or_v...>; +inline constexpr bool __is_included_in_v = __fold_or_v...>; #endif // _CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__utility/in_place.h b/libcudacxx/include/cuda/std/__utility/in_place.h index 5a3e652dffe..56c2f71f2db 100644 --- a/libcudacxx/include/cuda/std/__utility/in_place.h +++ b/libcudacxx/include/cuda/std/__utility/in_place.h @@ -38,7 +38,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT in_place_type_t _CCCL_HIDE_FROM_ABI explicit in_place_type_t() = default; }; template -_CCCL_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; +inline constexpr in_place_type_t<_Tp> in_place_type{}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT in_place_index_t @@ -46,7 +46,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT in_place_index_t _CCCL_HIDE_FROM_ABI explicit in_place_index_t() = default; }; template -_CCCL_INLINE_VAR constexpr in_place_index_t<_Idx> in_place_index{}; +inline constexpr in_place_index_t<_Idx> in_place_index{}; template struct __is_inplace_type_imp : false_type diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono index f4dc852c44e..158e4ac7942 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono @@ -974,7 +974,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT treat_as_floating_point : is_floating_point #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; +inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; #endif // !_CCCL_NO_VARIABLE_TEMPLATES template @@ -2195,27 +2195,27 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr weekday_last weekday::operator[](last_spec) return weekday_last{*this}; } -_CCCL_INLINE_VAR constexpr last_spec last{}; -_CCCL_INLINE_VAR constexpr weekday Sunday{0}; -_CCCL_INLINE_VAR constexpr weekday Monday{1}; -_CCCL_INLINE_VAR constexpr weekday Tuesday{2}; -_CCCL_INLINE_VAR constexpr weekday Wednesday{3}; -_CCCL_INLINE_VAR constexpr weekday Thursday{4}; -_CCCL_INLINE_VAR constexpr weekday Friday{5}; -_CCCL_INLINE_VAR constexpr weekday Saturday{6}; - -_CCCL_INLINE_VAR constexpr month January{1}; -_CCCL_INLINE_VAR constexpr month February{2}; -_CCCL_INLINE_VAR constexpr month March{3}; -_CCCL_INLINE_VAR constexpr month April{4}; -_CCCL_INLINE_VAR constexpr month May{5}; -_CCCL_INLINE_VAR constexpr month June{6}; -_CCCL_INLINE_VAR constexpr month July{7}; -_CCCL_INLINE_VAR constexpr month August{8}; -_CCCL_INLINE_VAR constexpr month September{9}; -_CCCL_INLINE_VAR constexpr month October{10}; -_CCCL_INLINE_VAR constexpr month November{11}; -_CCCL_INLINE_VAR constexpr month December{12}; +inline constexpr last_spec last{}; +inline constexpr weekday Sunday{0}; +inline constexpr weekday Monday{1}; +inline constexpr weekday Tuesday{2}; +inline constexpr weekday Wednesday{3}; +inline constexpr weekday Thursday{4}; +inline constexpr weekday Friday{5}; +inline constexpr weekday Saturday{6}; + +inline constexpr month January{1}; +inline constexpr month February{2}; +inline constexpr month March{3}; +inline constexpr month April{4}; +inline constexpr month May{5}; +inline constexpr month June{6}; +inline constexpr month July{7}; +inline constexpr month August{8}; +inline constexpr month September{9}; +inline constexpr month October{10}; +inline constexpr month November{11}; +inline constexpr month December{12}; class month_day { diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/optional b/libcudacxx/include/cuda/std/detail/libcxx/include/optional index 5180bf277d0..35f1f7d601d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/optional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/optional @@ -444,7 +444,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp> }; template -_CCCL_INLINE_VAR constexpr __smf_availability __optional_can_copy_construct = +inline constexpr __smf_availability __optional_can_copy_construct = _CCCL_TRAIT(is_trivially_copy_constructible, _Tp) ? __smf_availability::__trivial : _CCCL_TRAIT(is_copy_constructible, _Tp) ? __smf_availability::__available @@ -486,7 +486,7 @@ struct __optional_copy_base<_Tp, __smf_availability::__deleted> : __optional_sto }; template -_CCCL_INLINE_VAR constexpr __smf_availability __optional_can_move_construct = +inline constexpr __smf_availability __optional_can_move_construct = _CCCL_TRAIT(is_trivially_move_constructible, _Tp) ? __smf_availability::__trivial : _CCCL_TRAIT(is_move_constructible, _Tp) ? __smf_availability::__available @@ -527,7 +527,7 @@ struct __optional_move_base<_Tp, __smf_availability::__deleted> : __optional_cop }; template -_CCCL_INLINE_VAR constexpr __smf_availability __optional_can_copy_assign = +inline constexpr __smf_availability __optional_can_copy_assign = _CCCL_TRAIT(is_trivially_destructible, _Tp) && _CCCL_TRAIT(is_trivially_copy_constructible, _Tp) && _CCCL_TRAIT(is_trivially_copy_assignable, _Tp) ? __smf_availability::__trivial @@ -570,7 +570,7 @@ struct __optional_copy_assign_base<_Tp, __smf_availability::__deleted> : __optio }; template -_CCCL_INLINE_VAR constexpr __smf_availability __optional_can_move_assign = +inline constexpr __smf_availability __optional_can_move_assign = _CCCL_TRAIT(is_trivially_destructible, _Tp) && _CCCL_TRAIT(is_trivially_move_constructible, _Tp) && _CCCL_TRAIT(is_trivially_move_assignable, _Tp) ? __smf_availability::__trivial @@ -642,32 +642,32 @@ using __opt_check_assignable_from_opt = is_assignable<_Tp&, _Opt const&&>>; template -_CCCL_INLINE_VAR constexpr bool __opt_is_implictly_constructible = +inline constexpr bool __opt_is_implictly_constructible = _CCCL_TRAIT(is_constructible, _Tp, _Up) && _CCCL_TRAIT(is_convertible, _Up, _Tp); template -_CCCL_INLINE_VAR constexpr bool __opt_is_explictly_constructible = +inline constexpr bool __opt_is_explictly_constructible = _CCCL_TRAIT(is_constructible, _Tp, _Up) && !_CCCL_TRAIT(is_convertible, _Up, _Tp); template -_CCCL_INLINE_VAR constexpr bool __opt_is_constructible_from_U = +inline constexpr bool __opt_is_constructible_from_U = !_CCCL_TRAIT(is_same, remove_cvref_t<_Up>, in_place_t) && !_CCCL_TRAIT(is_same, remove_cvref_t<_Up>, optional<_Tp>); template -_CCCL_INLINE_VAR constexpr bool __opt_is_constructible_from_opt = +inline constexpr bool __opt_is_constructible_from_opt = !_CCCL_TRAIT(is_same, _Up, _Tp) && !__opt_check_constructible_from_opt<_Tp, _Up>::value; template -_CCCL_INLINE_VAR constexpr bool __opt_is_assignable = +inline constexpr bool __opt_is_assignable = _CCCL_TRAIT(is_constructible, _Tp, _Up) && _CCCL_TRAIT(is_assignable, _Tp&, _Up); template -_CCCL_INLINE_VAR constexpr bool __opt_is_assignable_from_U = +inline constexpr bool __opt_is_assignable_from_U = !_CCCL_TRAIT(is_same, remove_cvref_t<_Up>, optional<_Tp>) && (!_CCCL_TRAIT(is_same, remove_cvref_t<_Up>, _Tp) || !_CCCL_TRAIT(is_scalar, _Tp)); template -_CCCL_INLINE_VAR constexpr bool __opt_is_assignable_from_opt = +inline constexpr bool __opt_is_assignable_from_opt = !_CCCL_TRAIT(is_same, _Up, _Tp) && !__opt_check_constructible_from_opt<_Tp, _Up>::value && !__opt_check_assignable_from_opt<_Tp, _Up>::value; diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ratio b/libcudacxx/include/cuda/std/detail/libcxx/include/ratio index 6f3419325d8..b6000b6f9f6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ratio +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ratio @@ -461,22 +461,22 @@ struct __ratio_gcd #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) template -_CCCL_INLINE_VAR constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; +inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; template -_CCCL_INLINE_VAR constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; +inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; template -_CCCL_INLINE_VAR constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; +inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; template -_CCCL_INLINE_VAR constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; +inline constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; template -_CCCL_INLINE_VAR constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; +inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; template -_CCCL_INLINE_VAR constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; +inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; #endif // _CCCL_NO_VARIABLE_TEMPLATES _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/span b/libcudacxx/include/cuda/std/detail/libcxx/include/span index 1996fe11a61..7c8e505e99d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/span +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/span @@ -187,16 +187,16 @@ template _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_INLINE_VAR constexpr bool __is_std_array = false; +inline constexpr bool __is_std_array = false; template -_CCCL_INLINE_VAR constexpr bool __is_std_array> = true; +inline constexpr bool __is_std_array> = true; template -_CCCL_INLINE_VAR constexpr bool __is_std_span = false; +inline constexpr bool __is_std_span = false; template -_CCCL_INLINE_VAR constexpr bool __is_std_span> = true; +inline constexpr bool __is_std_span> = true; template _CCCL_CONCEPT __span_array_convertible = _CCCL_TRAIT(is_convertible, _From (*)[], _To (*)[]); @@ -269,10 +269,10 @@ _CCCL_CONCEPT __integral_constant_like = _CCCL_FRAGMENT(__integral_constant_like #endif // _CCCL_NO_CONCEPTS template > -_CCCL_INLINE_VAR constexpr size_t __maybe_static_ext = dynamic_extent; +inline constexpr size_t __maybe_static_ext = dynamic_extent; template -_CCCL_INLINE_VAR constexpr size_t __maybe_static_ext<_Tp, true> = {_Tp::value}; +inline constexpr size_t __maybe_static_ext<_Tp, true> = {_Tp::value}; template class _CCCL_TYPE_VISIBILITY_DEFAULT span @@ -752,10 +752,10 @@ _LIBCUDACXX_END_NAMESPACE_STD _LIBCUDACXX_BEGIN_NAMESPACE_RANGES template -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; +inline constexpr bool enable_borrowed_range> = true; template -_CCCL_INLINE_VAR constexpr bool enable_view> = true; +inline constexpr bool enable_view> = true; _LIBCUDACXX_END_NAMESPACE_RANGES #endif // _LIBCUDACXX_SPAN diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/variant b/libcudacxx/include/cuda/std/detail/libcxx/include/variant index 0b58354f8f9..86b1133ab43 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -313,7 +313,7 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT variant_size; template -_CCCL_INLINE_VAR constexpr size_t variant_size_v = variant_size<_Tp>::value; +inline constexpr size_t variant_size_v = variant_size<_Tp>::value; template struct _CCCL_TYPE_VISIBILITY_DEFAULT variant_size : variant_size<_Tp> @@ -358,7 +358,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT variant_alternative<_Ip, variant<_Types...> using type = __type_index_c<_Ip, _Types...>; }; -_CCCL_INLINE_VAR constexpr size_t variant_npos = static_cast(-1); +inline constexpr size_t variant_npos = static_cast(-1); _LIBCUDACXX_HIDE_FROM_ABI constexpr int __choose_index_type(unsigned int __num_elem) { diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp index 0eac1253cb4..67c1242c22f 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp @@ -20,11 +20,10 @@ #include "test_macros.h" template -_CCCL_INLINE_VAR constexpr bool has_iterator_concept_v = false; +inline constexpr bool has_iterator_concept_v = false; template -_CCCL_INLINE_VAR constexpr bool has_iterator_concept_v> = - true; +inline constexpr bool has_iterator_concept_v> = true; template , int> = 0> __host__ __device__ constexpr void test_iter_concept() diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/iter_difference_t.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/iter_difference_t.compile.pass.cpp index de2078e7dc2..710d32171ed 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/iter_difference_t.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/iter_difference_t.compile.pass.cpp @@ -19,10 +19,10 @@ inline constexpr bool has_no_iter_difference_t = !requires { typename cuda::std: #else template -_CCCL_INLINE_VAR constexpr bool has_no_iter_difference_t = true; +inline constexpr bool has_no_iter_difference_t = true; template -_CCCL_INLINE_VAR constexpr bool has_no_iter_difference_t>> = false; +inline constexpr bool has_no_iter_difference_t>> = false; #endif template diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/readable.traits/iter_value_t.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/readable.traits/iter_value_t.pass.cpp index 7f45def2802..75683d8f25d 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/readable.traits/iter_value_t.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/readable.traits/iter_value_t.pass.cpp @@ -43,10 +43,10 @@ static_assert(check_iter_value_t(), ""); // clang-format off template -_CCCL_INLINE_VAR constexpr bool check_no_iter_value_t = true; +inline constexpr bool check_no_iter_value_t = true; template -_CCCL_INLINE_VAR constexpr bool check_no_iter_value_t>> = false; +inline constexpr bool check_no_iter_value_t>> = false; static_assert(check_no_iter_value_t, ""); static_assert(check_no_iter_value_t, ""); diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sized_sentinel_for.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sized_sentinel_for.compile.pass.cpp index c78e97b3a7c..356b78dfb5d 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sized_sentinel_for.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sized_sentinel_for.compile.pass.cpp @@ -105,7 +105,7 @@ namespace cuda namespace std { template <> -_CCCL_INLINE_VAR constexpr bool disable_sized_sentinel_for = true; +inline constexpr bool disable_sized_sentinel_for = true; } } // namespace cuda diff --git a/libcudacxx/test/libcudacxx/std/ranges/range.access/begin.pass.cpp b/libcudacxx/test/libcudacxx/std/ranges/range.access/begin.pass.cpp index 7474d4f7f01..c29bd1c3d65 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.access/begin.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/ranges/range.access/begin.pass.cpp @@ -183,7 +183,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -298,7 +298,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda diff --git a/libcudacxx/test/libcudacxx/std/ranges/range.access/data.pass.cpp b/libcudacxx/test/libcudacxx/std/ranges/range.access/data.pass.cpp index 712dad4e140..266d5e0de38 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.access/data.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/ranges/range.access/data.pass.cpp @@ -160,7 +160,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -291,7 +291,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda diff --git a/libcudacxx/test/libcudacxx/std/ranges/range.access/end.pass.cpp b/libcudacxx/test/libcudacxx/std/ranges/range.access/end.pass.cpp index 78ee91331f8..15f0fe6c8ab 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.access/end.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/ranges/range.access/end.pass.cpp @@ -174,7 +174,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -326,7 +326,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda diff --git a/libcudacxx/test/libcudacxx/std/ranges/range.access/size.pass.cpp b/libcudacxx/test/libcudacxx/std/ranges/range.access/size.pass.cpp index 891e8c03f71..11ee41448a9 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.access/size.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/ranges/range.access/size.pass.cpp @@ -268,7 +268,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; +inline constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -290,7 +290,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; +inline constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -310,7 +310,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; +inline constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -330,7 +330,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; +inline constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -486,7 +486,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; +inline constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda diff --git a/libcudacxx/test/libcudacxx/std/ranges/range.req/range.range/borrowed_range.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/ranges/range.req/range.range/borrowed_range.compile.pass.cpp index f25da604098..16250bfc83f 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.req/range.range/borrowed_range.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/ranges/range.req/range.range/borrowed_range.compile.pass.cpp @@ -45,7 +45,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda diff --git a/libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/types.h b/libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/types.h index ff2b9ddc732..d95b4ba5337 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/types.h +++ b/libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/types.h @@ -256,7 +256,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -286,7 +286,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -333,7 +333,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -387,7 +387,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda diff --git a/libcudacxx/test/support/test_iterators.h b/libcudacxx/test/support/test_iterators.h index 83f63f0f18f..c0416adb8f2 100644 --- a/libcudacxx/test/support/test_iterators.h +++ b/libcudacxx/test/support/test_iterators.h @@ -1614,10 +1614,10 @@ template struct Proxy; template -_CCCL_INLINE_VAR constexpr bool IsProxy = false; +inline constexpr bool IsProxy = false; template -_CCCL_INLINE_VAR constexpr bool IsProxy> = true; +inline constexpr bool IsProxy> = true; template struct Proxy diff --git a/libcudacxx/test/support/test_range.h b/libcudacxx/test/support/test_range.h index 91e51ef74b4..a1d8cdd9fe8 100644 --- a/libcudacxx/test/support/test_range.h +++ b/libcudacxx/test/support/test_range.h @@ -93,7 +93,7 @@ namespace std namespace ranges { template <> -_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; +inline constexpr bool enable_borrowed_range = true; } // namespace ranges } // namespace std } // namespace cuda diff --git a/thrust/thrust/detail/raw_reference_cast.h b/thrust/thrust/detail/raw_reference_cast.h index 930f4e4eab6..c6af2f67906 100644 --- a/thrust/thrust/detail/raw_reference_cast.h +++ b/thrust/thrust/detail/raw_reference_cast.h @@ -49,17 +49,17 @@ __THRUST_DEFINE_HAS_NESTED_TYPE(is_wrapped_reference, wrapped_reference_hint) // wrapped reference-like things which aren't strictly wrapped references // (e.g. tuples of wrapped references) are considered unwrappable template -_CCCL_INLINE_VAR constexpr bool can_unwrap = is_wrapped_reference::value; +inline constexpr bool can_unwrap = is_wrapped_reference::value; // specialize is_unwrappable // a tuple is_unwrappable if any of its elements is_unwrappable template -_CCCL_INLINE_VAR constexpr bool can_unwrap> = (can_unwrap || ...); +inline constexpr bool can_unwrap> = (can_unwrap || ...); // specialize is_unwrappable // a tuple_of_iterator_references is_unwrappable if any of its elements is_unwrappable template -_CCCL_INLINE_VAR constexpr bool can_unwrap> = (can_unwrap || ...); +inline constexpr bool can_unwrap> = (can_unwrap || ...); namespace raw_reference_detail { diff --git a/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h b/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h index 1d06146955f..5aa85ce0d9f 100644 --- a/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h +++ b/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h @@ -36,10 +36,10 @@ THRUST_NAMESPACE_BEGIN namespace detail { template -_CCCL_INLINE_VAR constexpr bool is_output_iterator = true; +inline constexpr bool is_output_iterator = true; template -_CCCL_INLINE_VAR constexpr bool is_output_iterator>> = +inline constexpr bool is_output_iterator>> = ::cuda::std::is_void_v> || ::cuda::std::is_same_v, any_assign>; } // namespace detail diff --git a/thrust/thrust/iterator/detail/iterator_facade_category.h b/thrust/thrust/iterator/detail/iterator_facade_category.h index 07dab53525a..7ac68e88843 100644 --- a/thrust/thrust/iterator/detail/iterator_facade_category.h +++ b/thrust/thrust/iterator/detail/iterator_facade_category.h @@ -41,17 +41,17 @@ THRUST_NAMESPACE_BEGIN namespace detail { template -_CCCL_INLINE_VAR constexpr bool is_host_iterator_category = +inline constexpr bool is_host_iterator_category = ::cuda::std::is_convertible_v || ::cuda::std::is_convertible_v; template -_CCCL_INLINE_VAR constexpr bool is_device_iterator_category = +inline constexpr bool is_device_iterator_category = ::cuda::std::is_convertible_v || ::cuda::std::is_convertible_v; template -_CCCL_INLINE_VAR constexpr bool is_iterator_category = is_host_iterator_category || is_device_iterator_category; +inline constexpr bool is_iterator_category = is_host_iterator_category || is_device_iterator_category; // adapted from http://www.boost.org/doc/libs/1_37_0/libs/iterator/doc/iterator_facade.html#iterator-category // diff --git a/thrust/thrust/iterator/detail/retag.h b/thrust/thrust/iterator/detail/retag.h index a931c42e27a..f4018ca32b1 100644 --- a/thrust/thrust/iterator/detail/retag.h +++ b/thrust/thrust/iterator/detail/retag.h @@ -34,7 +34,7 @@ namespace detail { // we can retag an iterator if FromTag converts to ToTag or vice versa template -_CCCL_INLINE_VAR constexpr bool is_retaggable = +inline constexpr bool is_retaggable = ::cuda::std::is_convertible_v || ::cuda::std::is_convertible_v; } // namespace detail From d79f7b082a58f754bf68a6fd9810c97976784191 Mon Sep 17 00:00:00 2001 From: David Bayer Date: Wed, 19 Mar 2025 14:41:38 +0100 Subject: [PATCH 2/3] fix everything --- libcudacxx/include/cuda/std/__cccl/dialect.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libcudacxx/include/cuda/std/__cccl/dialect.h b/libcudacxx/include/cuda/std/__cccl/dialect.h index 1ea42a7f246..dbeca03d31c 100644 --- a/libcudacxx/include/cuda/std/__cccl/dialect.h +++ b/libcudacxx/include/cuda/std/__cccl/dialect.h @@ -122,12 +122,6 @@ // Conditionally use certain language features depending on availability /////////////////////////////////////////////////////////////////////////////// -#if defined(_CCCL_NO_INLINE_VARIABLES) -# define inline -#else // ^^^ _CCCL_NO_INLINE_VARIABLES ^^^ / vvv !_CCCL_NO_INLINE_VARIABLES vvv -# define inline inline -#endif // !_CCCL_NO_INLINE_VARIABLES - #if defined(_CCCL_NO_NOEXCEPT_FUNCTION_TYPE) # define _CCCL_FUNCTION_TYPE_NOEXCEPT #else // ^^^ _CCCL_NO_NOEXCEPT_FUNCTION_TYPE ^^^ / vvv !_CCCL_NO_NOEXCEPT_FUNCTION_TYPE vvv From 241db719a44faa02a8637c642720cb27fd51cfdb Mon Sep 17 00:00:00 2001 From: David Bayer Date: Wed, 19 Mar 2025 15:05:16 +0100 Subject: [PATCH 3/3] fix main merge --- libcudacxx/include/cuda/std/__floating_point/native_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcudacxx/include/cuda/std/__floating_point/native_type.h b/libcudacxx/include/cuda/std/__floating_point/native_type.h index 308a79ef0cd..782eaaaf7e2 100644 --- a/libcudacxx/include/cuda/std/__floating_point/native_type.h +++ b/libcudacxx/include/cuda/std/__floating_point/native_type.h @@ -65,7 +65,7 @@ template <__fp_format _Fmt> using __fp_native_type_t = decltype(__fp_native_type_impl<_Fmt>()); template <__fp_format _Fmt> -_CCCL_INLINE_VAR constexpr bool __fp_has_native_type_v = !_CCCL_TRAIT(is_void, __fp_native_type_t<_Fmt>); +inline constexpr bool __fp_has_native_type_v = !_CCCL_TRAIT(is_void, __fp_native_type_t<_Fmt>); _LIBCUDACXX_END_NAMESPACE_STD