From e5229f2c7509ced5a830be4ae884d9e1639e8951 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Tue, 15 Oct 2024 07:08:09 -0700 Subject: [PATCH] add a config macro for testing support for inline variables (#2581) * add a config macro for testing support for inline variables * Drop `_LIBCUDACXX_` macros * Use a consistent macro for enabling variable templates * Move it in repo.toml --------- Co-authored-by: Michael Schellenberger Costa --- cub/cub/device/dispatch/dispatch_merge.cuh | 4 +- cub/cub/util_type.cuh | 2 +- cub/test/catch2_test_launch_helper.h | 2 +- .../__hierarchy/hierarchy_dimensions.cuh | 4 +- .../__hierarchy/hierarchy_levels.cuh | 10 ++-- .../__memory_resource/any_resource.cuh | 5 +- docs/repo.toml | 2 +- .../cuda/__memory_resource/get_property.h | 8 ++-- .../cuda/__memory_resource/properties.h | 12 ++--- .../cuda/__memory_resource/resource_ref.h | 2 +- libcudacxx/include/cuda/std/__atomic/order.h | 12 ++--- libcudacxx/include/cuda/std/__cccl/dialect.h | 8 +++- .../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 +-- .../include/cuda/std/__functional/bind.h | 20 ++++---- .../include/cuda/std/__functional/invoke.h | 8 ++-- 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 | 13 +++-- .../cuda/std/__iterator/move_iterator.h | 4 +- .../cuda/std/__iterator/readable_traits.h | 8 ++-- .../cuda/std/__iterator/reverse_iterator.h | 11 ++--- .../include/cuda/std/__mdspan/full_extent_t.h | 2 +- .../include/cuda/std/__mdspan/layout_stride.h | 2 +- .../cuda/std/__memory/allocator_arg_t.h | 2 +- .../cuda/std/__memory/uses_allocator.h | 10 ++-- .../include/cuda/std/__ranges/concepts.h | 8 ++-- .../cuda/std/__ranges/enable_borrowed_range.h | 2 +- .../include/cuda/std/__ranges/enable_view.h | 6 +-- 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 | 6 +-- .../cuda/std/__type_traits/common_reference.h | 4 +- .../cuda/std/__type_traits/common_type.h | 4 +- .../cuda/std/__type_traits/conjunction.h | 6 +-- .../cuda/std/__type_traits/disjunction.h | 6 +-- .../include/cuda/std/__type_traits/extent.h | 12 ++--- .../include/cuda/std/__type_traits/fold.h | 8 ++-- .../has_unique_object_representation.h | 7 ++- .../__type_traits/has_virtual_destructor.h | 6 +-- .../cuda/std/__type_traits/is_abstract.h | 6 +-- .../cuda/std/__type_traits/is_aggregate.h | 6 +-- .../cuda/std/__type_traits/is_arithmetic.h | 6 +-- .../include/cuda/std/__type_traits/is_array.h | 12 ++--- .../cuda/std/__type_traits/is_assignable.h | 12 ++--- .../cuda/std/__type_traits/is_base_of.h | 12 ++--- .../cuda/std/__type_traits/is_bounded_array.h | 2 +- .../include/cuda/std/__type_traits/is_class.h | 12 ++--- .../cuda/std/__type_traits/is_compound.h | 12 ++--- .../include/cuda/std/__type_traits/is_const.h | 12 ++--- .../cuda/std/__type_traits/is_constructible.h | 12 ++--- .../cuda/std/__type_traits/is_convertible.h | 20 ++++---- .../std/__type_traits/is_copy_assignable.h | 6 +-- .../std/__type_traits/is_copy_constructible.h | 6 +-- .../__type_traits/is_default_constructible.h | 6 +-- .../cuda/std/__type_traits/is_destructible.h | 12 ++--- .../include/cuda/std/__type_traits/is_empty.h | 12 ++--- .../include/cuda/std/__type_traits/is_enum.h | 12 ++--- .../is_extended_floating_point.h | 26 +++++----- .../include/cuda/std/__type_traits/is_final.h | 12 ++--- .../std/__type_traits/is_floating_point.h | 6 +-- .../cuda/std/__type_traits/is_function.h | 12 ++--- .../cuda/std/__type_traits/is_fundamental.h | 12 ++--- .../cuda/std/__type_traits/is_integral.h | 12 ++--- .../cuda/std/__type_traits/is_literal_type.h | 12 ++--- .../is_member_function_pointer.h | 12 ++--- .../__type_traits/is_member_object_pointer.h | 12 ++--- .../std/__type_traits/is_member_pointer.h | 12 ++--- .../std/__type_traits/is_move_assignable.h | 6 +-- .../std/__type_traits/is_move_constructible.h | 6 +-- .../std/__type_traits/is_nothrow_assignable.h | 18 +++---- .../__type_traits/is_nothrow_constructible.h | 13 +++-- .../__type_traits/is_nothrow_convertible.h | 2 +- .../is_nothrow_copy_assignable.h | 12 ++--- .../is_nothrow_copy_constructible.h | 6 +-- .../is_nothrow_default_constructible.h | 12 ++--- .../__type_traits/is_nothrow_destructible.h | 6 +-- .../is_nothrow_move_assignable.h | 12 ++--- .../is_nothrow_move_constructible.h | 6 +-- .../cuda/std/__type_traits/is_null_pointer.h | 6 +-- .../cuda/std/__type_traits/is_object.h | 12 ++--- .../include/cuda/std/__type_traits/is_pod.h | 12 ++--- .../cuda/std/__type_traits/is_pointer.h | 12 ++--- .../cuda/std/__type_traits/is_polymorphic.h | 12 ++--- .../cuda/std/__type_traits/is_reference.h | 20 ++++---- .../include/cuda/std/__type_traits/is_same.h | 12 ++--- .../cuda/std/__type_traits/is_scalar.h | 12 ++--- .../cuda/std/__type_traits/is_scoped_enum.h | 2 +- .../cuda/std/__type_traits/is_signed.h | 12 ++--- .../std/__type_traits/is_standard_layout.h | 12 ++--- .../cuda/std/__type_traits/is_swappable.h | 8 ++-- .../cuda/std/__type_traits/is_trivial.h | 12 ++--- .../__type_traits/is_trivially_assignable.h | 12 ++--- .../is_trivially_constructible.h | 13 +++-- .../is_trivially_copy_assignable.h | 12 ++--- .../is_trivially_copy_constructible.h | 12 ++--- .../std/__type_traits/is_trivially_copyable.h | 12 ++--- .../is_trivially_default_constructible.h | 14 +++--- .../__type_traits/is_trivially_destructible.h | 6 +-- .../is_trivially_move_assignable.h | 12 ++--- .../is_trivially_move_constructible.h | 12 ++--- .../std/__type_traits/is_unbounded_array.h | 2 +- .../include/cuda/std/__type_traits/is_union.h | 12 ++--- .../cuda/std/__type_traits/is_unsigned.h | 12 ++--- .../include/cuda/std/__type_traits/is_void.h | 12 ++--- .../cuda/std/__type_traits/is_volatile.h | 12 ++--- .../include/cuda/std/__type_traits/negation.h | 2 +- .../include/cuda/std/__type_traits/rank.h | 12 ++--- .../cuda/std/__type_traits/type_list.h | 4 +- .../include/cuda/std/__type_traits/type_set.h | 6 +-- .../include/cuda/std/__utility/in_place.h | 4 +- .../cuda/std/detail/libcxx/include/__config | 23 --------- .../cuda/std/detail/libcxx/include/chrono | 48 +++++++++---------- .../cuda/std/detail/libcxx/include/optional | 22 ++++----- .../cuda/std/detail/libcxx/include/ratio | 16 +++---- .../cuda/std/detail/libcxx/include/span | 20 ++++---- .../cuda/std/detail/libcxx/include/variant | 4 +- .../std/ranges/range.access/size.pass.cpp | 8 ++-- .../borrowed_range.compile.pass.cpp | 2 +- .../range.utility/range.subrange/types.h | 8 ++-- libcudacxx/test/support/test_iterators.h | 4 +- .../type_traits/logical_metafunctions.h | 4 +- 129 files changed, 591 insertions(+), 614 deletions(-) diff --git a/cub/cub/device/dispatch/dispatch_merge.cuh b/cub/cub/device/dispatch/dispatch_merge.cuh index 8db48787d66..dd90787f771 100644 --- a/cub/cub/device/dispatch/dispatch_merge.cuh +++ b/cub/cub/device/dispatch/dispatch_merge.cuh @@ -25,8 +25,8 @@ namespace detail { namespace merge { -_LIBCUDACXX_INLINE_VAR constexpr int fallback_BLOCK_THREADS = 64; -_LIBCUDACXX_INLINE_VAR constexpr int fallback_ITEMS_PER_THREAD = 1; +_CCCL_INLINE_VAR constexpr int fallback_BLOCK_THREADS = 64; +_CCCL_INLINE_VAR constexpr int fallback_ITEMS_PER_THREAD = 1; template class choose_merge_agent diff --git a/cub/cub/util_type.cuh b/cub/cub/util_type.cuh index 8ae4e2d05bd..cabab8ea6da 100644 --- a/cub/cub/util_type.cuh +++ b/cub/cub/util_type.cuh @@ -458,7 +458,7 @@ struct CubVector }; /// The maximum number of elements in CUDA vector types -_LIBCUDACXX_INLINE_VAR constexpr int MAX_VEC_ELEMENTS = 4; +_CCCL_INLINE_VAR constexpr int MAX_VEC_ELEMENTS = 4; /** * Generic vector-1 type diff --git a/cub/test/catch2_test_launch_helper.h b/cub/test/catch2_test_launch_helper.h index 4add1d15d11..4ccb0622abd 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, , ); \ - _LIBCUDACXX_INLINE_VAR constexpr struct WRAPPED_API_NAME##_t \ + _CCCL_INLINE_VAR constexpr struct WRAPPED_API_NAME##_t \ { \ template \ void operator()(As... args) const \ diff --git a/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh b/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh index d69c19e8c44..9e1df486adf 100644 --- a/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh +++ b/cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh @@ -102,11 +102,11 @@ struct get_level_helper } // namespace detail template -_LIBCUDACXX_INLINE_VAR constexpr bool has_level = +_CCCL_INLINE_VAR constexpr bool has_level = detail::has_level_helper>>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool has_level_or_unit = +_CCCL_INLINE_VAR constexpr bool has_level_or_unit = detail::has_level_helper>>::value || detail::has_unit>>::value; diff --git a/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh b/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh index 8ab0a0f7270..67fb9f05006 100644 --- a/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh +++ b/cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh @@ -91,22 +91,22 @@ struct allowed_levels<> namespace detail { template -_LIBCUDACXX_INLINE_VAR constexpr bool is_level_allowed = false; +_CCCL_INLINE_VAR constexpr bool is_level_allowed = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_level_allowed> = +_CCCL_INLINE_VAR constexpr bool is_level_allowed> = ::cuda::std::disjunction_v<::cuda::std::is_same...>; template -_LIBCUDACXX_INLINE_VAR constexpr bool can_stack_on_top = +_CCCL_INLINE_VAR constexpr bool can_stack_on_top = is_level_allowed || is_level_allowed; template -_LIBCUDACXX_INLINE_VAR constexpr bool legal_unit_for_level = +_CCCL_INLINE_VAR constexpr bool legal_unit_for_level = can_stack_on_top || legal_unit_for_level; template -_LIBCUDACXX_INLINE_VAR constexpr bool legal_unit_for_level = false; +_CCCL_INLINE_VAR constexpr bool legal_unit_for_level = false; } // namespace detail // Base type for all hierarchy levels diff --git a/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh b/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh index aaee0d3d4f4..b36523fbfe3 100644 --- a/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh @@ -54,7 +54,7 @@ namespace cuda::experimental::mr { template > -_LIBCUDACXX_INLINE_VAR constexpr bool __is_basic_any_resource = false; +_CCCL_INLINE_VAR constexpr bool __is_basic_any_resource = false; //! @rst //! .. _cudax-memory-resource-basic-any-resource: @@ -279,8 +279,7 @@ public: //! @brief Checks whether a passed in type is a specialization of basic_any_resource template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_basic_any_resource<_Ty, basic_any_resource<_Alloc_type, _Properties...>> = - true; +_CCCL_INLINE_VAR constexpr bool __is_basic_any_resource<_Ty, basic_any_resource<_Alloc_type, _Properties...>> = true; //! @rst //! .. _cudax-memory-resource-any-resource: diff --git a/docs/repo.toml b/docs/repo.toml index 47069987d05..8603e3d70f9 100644 --- a/docs/repo.toml +++ b/docs/repo.toml @@ -388,6 +388,7 @@ doxygen_predefined = [ "_CCCL_HOST=", "_CCCL_HOST_DEVICE=", "_CCCL_IF_CONSTEXPR=if constexpr", + "_CCCL_INLINE_VAR=inline", "_CCCL_NODISCARD=[[nodiscard]]", "_CCCL_NODISCARD_FRIEND=", "_CCCL_STD_VER=2020", @@ -406,7 +407,6 @@ doxygen_predefined = [ "_LIBCUDACXX_AND=&&", "_LIBCUDACXX_EAT_REST(x)=", "_LIBCUDACXX_GLOBAL_CONSTANT=inline", - "_LIBCUDACXX_INLINE_VAR=inline", "_LIBCUDACXX_REQUIRES(x)= ::cuda::std::__enable_if_t = 0>", "_LIBCUDACXX_TEMPLATE(x)=template x _LIBCUDACXX_EAT_REST", diff --git a/libcudacxx/include/cuda/__memory_resource/get_property.h b/libcudacxx/include/cuda/__memory_resource/get_property.h index a2a72631d52..4178e4ec554 100644 --- a/libcudacxx/include/cuda/__memory_resource/get_property.h +++ b/libcudacxx/include/cuda/__memory_resource/get_property.h @@ -42,10 +42,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CUDA //! //! @endrst template -_LIBCUDACXX_INLINE_VAR constexpr bool has_property = false; +_CCCL_INLINE_VAR constexpr bool has_property = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool has_property< +_CCCL_INLINE_VAR constexpr bool has_property< _Resource, _Property, _CUDA_VSTD::void_t(), _CUDA_VSTD::declval<_Property>()))>> = @@ -67,10 +67,10 @@ using __property_value_t = typename _Property::value_type; //! //! @endrst template -_LIBCUDACXX_INLINE_VAR constexpr bool property_with_value = false; +_CCCL_INLINE_VAR constexpr bool property_with_value = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool property_with_value<_Property, _CUDA_VSTD::void_t<__property_value_t<_Property>>> = +_CCCL_INLINE_VAR constexpr bool property_with_value<_Property, _CUDA_VSTD::void_t<__property_value_t<_Property>>> = true; //! @brief The \c has_property_with concept verifies that a Resource satisfies a given stateful Property diff --git a/libcudacxx/include/cuda/__memory_resource/properties.h b/libcudacxx/include/cuda/__memory_resource/properties.h index 9e501023886..c3b6e194245 100644 --- a/libcudacxx/include/cuda/__memory_resource/properties.h +++ b/libcudacxx/include/cuda/__memory_resource/properties.h @@ -31,10 +31,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CUDA_MR //! @brief The default alignment by a cudaMalloc{...} call -_LIBCUDACXX_INLINE_VAR constexpr size_t default_cuda_malloc_alignment = 256; +_CCCL_INLINE_VAR constexpr size_t default_cuda_malloc_alignment = 256; //! @brief The default alignment by a cudaMallocHost{...} call -_LIBCUDACXX_INLINE_VAR constexpr size_t default_cuda_malloc_host_alignment = alignof(_CUDA_VSTD::max_align_t); +_CCCL_INLINE_VAR 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 @@ -46,22 +46,22 @@ struct host_accessible //! @brief determines wether a set of properties signals host accessible memory. template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_host_accessible = +_CCCL_INLINE_VAR constexpr bool __is_host_accessible = _CUDA_VSTD::__type_set_contains<_CUDA_VSTD::__make_type_set<_Properties...>, host_accessible>; //! @brief determines wether a set of properties signals device accessible memory. template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_device_accessible = +_CCCL_INLINE_VAR constexpr bool __is_device_accessible = _CUDA_VSTD::__type_set_contains<_CUDA_VSTD::__make_type_set<_Properties...>, device_accessible>; //! @brief determines wether a set of properties signals host device accessible memory. template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_host_device_accessible = +_CCCL_INLINE_VAR constexpr bool __is_host_device_accessible = _CUDA_VSTD::__type_set_contains<_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 -_LIBCUDACXX_INLINE_VAR constexpr bool __contains_execution_space_property = +_CCCL_INLINE_VAR 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 3ac09a8237e..c70a295eac0 100644 --- a/libcudacxx/include/cuda/__memory_resource/resource_ref.h +++ b/libcudacxx/include/cuda/__memory_resource/resource_ref.h @@ -469,7 +469,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> -_LIBCUDACXX_INLINE_VAR constexpr _Vtable_store<_Alloc_type> __alloc_vtable = +_CCCL_INLINE_VAR 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/std/__atomic/order.h b/libcudacxx/include/cuda/std/__atomic/order.h index 935efab7576..27136bb3244 100644 --- a/libcudacxx/include/cuda/std/__atomic/order.h +++ b/libcudacxx/include/cuda/std/__atomic/order.h @@ -144,12 +144,12 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CUDA using memory_order = _CUDA_VSTD::memory_order; -_LIBCUDACXX_INLINE_VAR constexpr memory_order memory_order_relaxed = _CUDA_VSTD::memory_order_relaxed; -_LIBCUDACXX_INLINE_VAR constexpr memory_order memory_order_consume = _CUDA_VSTD::memory_order_consume; -_LIBCUDACXX_INLINE_VAR constexpr memory_order memory_order_acquire = _CUDA_VSTD::memory_order_acquire; -_LIBCUDACXX_INLINE_VAR constexpr memory_order memory_order_release = _CUDA_VSTD::memory_order_release; -_LIBCUDACXX_INLINE_VAR constexpr memory_order memory_order_acq_rel = _CUDA_VSTD::memory_order_acq_rel; -_LIBCUDACXX_INLINE_VAR constexpr memory_order memory_order_seq_cst = _CUDA_VSTD::memory_order_seq_cst; +_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; _LIBCUDACXX_END_NAMESPACE_CUDA diff --git a/libcudacxx/include/cuda/std/__cccl/dialect.h b/libcudacxx/include/cuda/std/__cccl/dialect.h index 0c8989fbc6f..16b072373a8 100644 --- a/libcudacxx/include/cuda/std/__cccl/dialect.h +++ b/libcudacxx/include/cuda/std/__cccl/dialect.h @@ -100,10 +100,16 @@ // Inline variables are only available from C++17 onwards #if _CCCL_STD_VER >= 2017 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) # define _CCCL_INLINE_VAR inline -#else // ^^^ C++14 ^^^ / vvv C++17 vvv +#else // ^^^ C++17 ^^^ / vvv C++14 vvv +# define _CCCL_NO_INLINE_VARIABLES # define _CCCL_INLINE_VAR #endif // _CCCL_STD_VER <= 2014 +// Variable templates are only available from C++14 onwards and require some compiler support +#if _CCCL_STD_VER <= 2011 || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304L) +# define _CCCL_NO_VARIABLE_TEMPALTES +#endif // _CCCL_STD_VER <= 2011 + // We need to treat host and device separately #if defined(__CUDA_ARCH__) # define _CCCL_GLOBAL_CONSTANT _CCCL_DEVICE _CCCL_CONSTEXPR_GLOBAL diff --git a/libcudacxx/include/cuda/std/__concepts/__concept_macros.h b/libcudacxx/include/cuda/std/__concepts/__concept_macros.h index 66148b289b1..b1eee235236 100644 --- a/libcudacxx/include/cuda/std/__concepts/__concept_macros.h +++ b/libcudacxx/include/cuda/std/__concepts/__concept_macros.h @@ -260,7 +260,7 @@ # else -# define _LIBCUDACXX_CONCEPT _LIBCUDACXX_INLINE_VAR constexpr bool +# define _LIBCUDACXX_CONCEPT _CCCL_INLINE_VAR constexpr bool # define _LIBCUDACXX_CONCEPT_FRAGMENT(_NAME, ...) \ _LIBCUDACXX_HIDE_FROM_ABI auto _NAME##_LIBCUDACXX_CONCEPT_FRAGMENT_impl_ \ @@ -356,7 +356,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _Concept::_Enable_if_t<_Bp> _Requires() {} # else template = 0> -_LIBCUDACXX_INLINE_VAR constexpr int _Requires = 0; +_CCCL_INLINE_VAR constexpr int _Requires = 0; # endif } // namespace _Concept diff --git a/libcudacxx/include/cuda/std/__concepts/destructible.h b/libcudacxx/include/cuda/std/__concepts/destructible.h index f51d05daba5..341a1d86b16 100644 --- a/libcudacxx/include/cuda/std/__concepts/destructible.h +++ b/libcudacxx/include/cuda/std/__concepts/destructible.h @@ -40,29 +40,29 @@ _LIBCUDACXX_CONCEPT destructible = __is_nothrow_destructible(_Tp); # else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv template -_LIBCUDACXX_INLINE_VAR constexpr bool __destructible_impl = false; +_CCCL_INLINE_VAR constexpr bool __destructible_impl = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __destructible_impl<_Tp, - __enable_if_t<_CCCL_TRAIT(is_object, _Tp)>, +_CCCL_INLINE_VAR constexpr bool __destructible_impl<_Tp, + __enable_if_t<_CCCL_TRAIT(is_object, _Tp)>, # if defined(_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 -_LIBCUDACXX_INLINE_VAR constexpr bool __destructible = __destructible_impl<_Tp>; +_CCCL_INLINE_VAR constexpr bool __destructible = __destructible_impl<_Tp>; template -_LIBCUDACXX_INLINE_VAR constexpr bool __destructible<_Tp&> = true; +_CCCL_INLINE_VAR constexpr bool __destructible<_Tp&> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __destructible<_Tp&&> = true; +_CCCL_INLINE_VAR constexpr bool __destructible<_Tp&&> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __destructible<_Tp[_Nm]> = __destructible<_Tp>; +_CCCL_INLINE_VAR constexpr bool __destructible<_Tp[_Nm]> = __destructible<_Tp>; template _LIBCUDACXX_CONCEPT destructible = __destructible<_Tp>; diff --git a/libcudacxx/include/cuda/std/__concepts/swappable.h b/libcudacxx/include/cuda/std/__concepts/swappable.h index 2cd35a3b56f..52cc22e9c45 100644 --- a/libcudacxx/include/cuda/std/__concepts/swappable.h +++ b/libcudacxx/include/cuda/std/__concepts/swappable.h @@ -95,11 +95,11 @@ _CCCL_NV_DIAG_DEFAULT(2642) # else template -_LIBCUDACXX_INLINE_VAR constexpr bool __swappable_arrays = false; +_CCCL_INLINE_VAR constexpr bool __swappable_arrays = false; # endif // _CCCL_STD_VER < 2020 || defined(_CCCL_COMPILER_NVHPC) template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_swappable_arrays = false; +_CCCL_INLINE_VAR constexpr bool __noexcept_swappable_arrays = false; struct __fn { @@ -146,12 +146,12 @@ _LIBCUDACXX_CONCEPT_FRAGMENT( (__swap(__t[0], __u[0])))); template -_LIBCUDACXX_INLINE_VAR constexpr bool __swappable_arrays<_Tp, _Up, _Size, void_t>> = +_CCCL_INLINE_VAR constexpr bool __swappable_arrays<_Tp, _Up, _Size, void_t>> = _LIBCUDACXX_FRAGMENT(__swappable_arrays_, _Tp, _Up, _CUDA_VSTD::integral_constant); # endif // _CCCL_STD_VER < 2020 || defined(_CCCL_COMPILER_NVHPC) template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_swappable_arrays<_Tp, _Up, void_t>> = +_CCCL_INLINE_VAR 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 0380f7c6c62..fd15d2a50cb 100644 --- a/libcudacxx/include/cuda/std/__expected/expected.h +++ b/libcudacxx/include/cuda/std/__expected/expected.h @@ -72,31 +72,31 @@ class expected; namespace __expected { template -_LIBCUDACXX_INLINE_VAR constexpr bool __valid_expected = +_CCCL_INLINE_VAR 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<__remove_cv_t<_Tp>> && __unexpected::__valid_unexpected<_Err>; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_expected = false; +_CCCL_INLINE_VAR constexpr bool __is_expected = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_expected> = true; +_CCCL_INLINE_VAR constexpr bool __is_expected> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_expected_nonvoid = __is_expected<_Tp>; +_CCCL_INLINE_VAR constexpr bool __is_expected_nonvoid = __is_expected<_Tp>; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_expected_nonvoid> = false; +_CCCL_INLINE_VAR constexpr bool __is_expected_nonvoid> = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __can_swap = +_CCCL_INLINE_VAR 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 -_LIBCUDACXX_INLINE_VAR constexpr bool __can_swap = +_CCCL_INLINE_VAR 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 bffa5fe0667..9c675a90456 100644 --- a/libcudacxx/include/cuda/std/__expected/expected_base.h +++ b/libcudacxx/include/cuda/std/__expected/expected_base.h @@ -516,7 +516,7 @@ struct __expected_storage : __expected_destruct<_Tp, _Err> }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __expected_can_copy_construct = +_CCCL_INLINE_VAR 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 @@ -567,7 +567,7 @@ struct __expected_copy<_Tp, _Err, __smf_availability::__deleted> : __expected_st }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __expected_can_move_construct = +_CCCL_INLINE_VAR 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 @@ -620,7 +620,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 -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __expected_can_copy_assign = +_CCCL_INLINE_VAR 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)) @@ -695,7 +695,7 @@ struct __expected_copy_assign<_Tp, _Err, __smf_availability::__deleted> : __expe }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __expected_can_move_assign = +_CCCL_INLINE_VAR 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 950ab81efbf..2bcf32cfa87 100644 --- a/libcudacxx/include/cuda/std/__expected/unexpected.h +++ b/libcudacxx/include/cuda/std/__expected/unexpected.h @@ -46,13 +46,13 @@ class unexpected; namespace __unexpected { template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_unexpected = false; +_CCCL_INLINE_VAR constexpr bool __is_unexpected = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_unexpected> = true; +_CCCL_INLINE_VAR constexpr bool __is_unexpected> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __valid_unexpected = +_CCCL_INLINE_VAR 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/__functional/bind.h b/libcudacxx/include/cuda/std/__functional/bind.h index 14b68de5c02..871d59ab1c0 100644 --- a/libcudacxx/include/cuda/std/__functional/bind.h +++ b/libcudacxx/include/cuda/std/__functional/bind.h @@ -87,16 +87,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 -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<1> _1{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<2> _2{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<3> _3{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<4> _4{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<5> _5{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<6> _6{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<7> _7{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<8> _8{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<9> _9{}; -/* _LIBCUDACXX_INLINE_VAR */ constexpr __ph<10> _10{}; +/* _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{}; # 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 58c298b046d..eef04c295f2 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 -_LIBCUDACXX_INLINE_VAR constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; +_CCCL_INLINE_VAR constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; +_CCCL_INLINE_VAR constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; // is_nothrow_invocable @@ -520,10 +520,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_invocable_r {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; +_CCCL_INLINE_VAR constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; +_CCCL_INLINE_VAR 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/span.h b/libcudacxx/include/cuda/std/__fwd/span.h index babff35bacb..83a280692d8 100644 --- a/libcudacxx/include/cuda/std/__fwd/span.h +++ b/libcudacxx/include/cuda/std/__fwd/span.h @@ -27,7 +27,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if _CCCL_STD_VER > 2011 -_LIBCUDACXX_INLINE_VAR constexpr size_t dynamic_extent = static_cast(-1); +_CCCL_INLINE_VAR 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 996f1a96fa5..e7950f14bf1 100644 --- a/libcudacxx/include/cuda/std/__iterator/concepts.h +++ b/libcudacxx/include/cuda/std/__iterator/concepts.h @@ -341,7 +341,7 @@ template _LIBCUDACXX_CONCEPT sentinel_for = _LIBCUDACXX_FRAGMENT(__sentinel_for_, _Sp, _Ip); template -_LIBCUDACXX_INLINE_VAR constexpr bool disable_sized_sentinel_for = false; +_CCCL_INLINE_VAR constexpr bool disable_sized_sentinel_for = false; template _LIBCUDACXX_CONCEPT_FRAGMENT( @@ -616,16 +616,16 @@ template _LIBCUDACXX_CONCEPT indirectly_copyable_storable = _LIBCUDACXX_FRAGMENT(__indirectly_copyable_storable_, _In, _Out); template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_iter_category = false; +_CCCL_INLINE_VAR constexpr bool __has_iter_category = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_iter_category<_Ip, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_iter_category<_Ip, void_t> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_iter_concept = false; +_CCCL_INLINE_VAR constexpr bool __has_iter_concept = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_iter_concept<_Ip, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_iter_concept<_Ip, void_t> = true; #endif // _CCCL_STD_VER > 2014 diff --git a/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h b/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h index eca27deea7c..e9d462eeaf4 100644 --- a/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h @@ -106,17 +106,17 @@ struct incrementable_traits : incrementable_traits<_Ip> {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_difference_type = false; +_CCCL_INLINE_VAR constexpr bool __has_member_difference_type = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_difference_type<_Tp, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_member_difference_type<_Tp, void_t> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_integral_minus = false; +_CCCL_INLINE_VAR 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 -_LIBCUDACXX_INLINE_VAR constexpr bool +_CCCL_INLINE_VAR 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 a10a7cbbd10..90b76dc0d4b 100644 --- a/libcudacxx/include/cuda/std/__iterator/iter_swap.h +++ b/libcudacxx/include/cuda/std/__iterator/iter_swap.h @@ -150,10 +150,10 @@ _LIBCUDACXX_CONCEPT indirectly_swappable = _LIBCUDACXX_FRAGMENT(__indirectly_swa # endif // _CCCL_STD_VER > 2017 template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_swappable = false; +_CCCL_INLINE_VAR constexpr bool __noexcept_swappable = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_swappable<_I1, _I2, __enable_if_t>> = +_CCCL_INLINE_VAR 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 ae8e4873676..741662fb960 100644 --- a/libcudacxx/include/cuda/std/__iterator/iterator_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/iterator_traits.h @@ -561,23 +561,22 @@ _LIBCUDACXX_CONCEPT __cpp17_random_access_iterator = } // namespace __iterator_traits_detail template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_reference = false; +_CCCL_INLINE_VAR constexpr bool __has_member_reference = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_reference<_Tp, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_member_reference<_Tp, void_t> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_pointer = false; +_CCCL_INLINE_VAR constexpr bool __has_member_pointer = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_pointer<_Tp, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_member_pointer<_Tp, void_t> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_iterator_category = false; +_CCCL_INLINE_VAR constexpr bool __has_member_iterator_category = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_iterator_category<_Tp, void_t> = - true; +_CCCL_INLINE_VAR constexpr bool __has_member_iterator_category<_Tp, void_t> = true; template _LIBCUDACXX_CONCEPT __specifies_members = diff --git a/libcudacxx/include/cuda/std/__iterator/move_iterator.h b/libcudacxx/include/cuda/std/__iterator/move_iterator.h index 4ca73b91abb..3acb29f6fbd 100644 --- a/libcudacxx/include/cuda/std/__iterator/move_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/move_iterator.h @@ -65,7 +65,7 @@ concept __move_iter_comparable = requires { }; template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_move_iter_iter_move = +_CCCL_INLINE_VAR constexpr bool __noexcept_move_iter_iter_move = noexcept(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Iter>())); #elif _CCCL_STD_VER >= 2017 template @@ -90,7 +90,7 @@ template _LIBCUDACXX_CONCEPT __move_iter_comparable = _LIBCUDACXX_FRAGMENT(__move_iter_comparable_, _Iter, _Sent); template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_move_iter_iter_move = +_CCCL_INLINE_VAR constexpr bool __noexcept_move_iter_iter_move = noexcept(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Iter>())); #endif // _CCCL_STD_VER >= 2017 diff --git a/libcudacxx/include/cuda/std/__iterator/readable_traits.h b/libcudacxx/include/cuda/std/__iterator/readable_traits.h index 9515e58d242..e7e5dcd3bf4 100644 --- a/libcudacxx/include/cuda/std/__iterator/readable_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/readable_traits.h @@ -120,16 +120,16 @@ struct __cond_value_type<_Tp, enable_if_t<_CCCL_TRAIT(is_object, _Tp)>> }; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_value_type = false; +_CCCL_INLINE_VAR constexpr bool __has_member_value_type = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_value_type<_Tp, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_member_value_type<_Tp, void_t> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_element_type = false; +_CCCL_INLINE_VAR constexpr bool __has_member_element_type = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_member_element_type<_Tp, void_t> = true; +_CCCL_INLINE_VAR 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 e4063473f5f..41229b9099b 100644 --- a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h @@ -56,18 +56,17 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if _CCCL_STD_VER >= 2017 template -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_move = false; +_CCCL_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_move = false; template -_LIBCUDACXX_INLINE_VAR 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&>())); +_CCCL_INLINE_VAR 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 -_LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_swap = false; +_CCCL_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_swap = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool +_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&>())); diff --git a/libcudacxx/include/cuda/std/__mdspan/full_extent_t.h b/libcudacxx/include/cuda/std/__mdspan/full_extent_t.h index 556464a0fdc..c8d8c67733a 100644 --- a/libcudacxx/include/cuda/std/__mdspan/full_extent_t.h +++ b/libcudacxx/include/cuda/std/__mdspan/full_extent_t.h @@ -65,7 +65,7 @@ struct full_extent_t _CCCL_HIDE_FROM_ABI explicit full_extent_t() = default; }; -_LIBCUDACXX_INLINE_VAR constexpr auto full_extent = full_extent_t{}; +_CCCL_INLINE_VAR constexpr auto full_extent = full_extent_t{}; #endif // _CCCL_STD_VER > 2011 diff --git a/libcudacxx/include/cuda/std/__mdspan/layout_stride.h b/libcudacxx/include/cuda/std/__mdspan/layout_stride.h index 99254e955e3..723d2e816cd 100644 --- a/libcudacxx/include/cuda/std/__mdspan/layout_stride.h +++ b/libcudacxx/include/cuda/std/__mdspan/layout_stride.h @@ -93,7 +93,7 @@ struct layout_right namespace __detail { template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_mapping_of = +_CCCL_INLINE_VAR constexpr bool __is_mapping_of = is_same, _Mapping>::value; # if __MDSPAN_USE_CONCEPTS && __MDSPAN_HAS_CXX_20 diff --git a/libcudacxx/include/cuda/std/__memory/allocator_arg_t.h b/libcudacxx/include/cuda/std/__memory/allocator_arg_t.h index 540882368e5..424e67122d0 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; }; -_LIBCUDACXX_INLINE_VAR constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +_CCCL_INLINE_VAR constexpr allocator_arg_t allocator_arg = allocator_arg_t(); // allocator construction diff --git a/libcudacxx/include/cuda/std/__memory/uses_allocator.h b/libcudacxx/include/cuda/std/__memory/uses_allocator.h index 5f305a26247..8f2d504d3ad 100644 --- a/libcudacxx/include/cuda/std/__memory/uses_allocator.h +++ b/libcudacxx/include/cuda/std/__memory/uses_allocator.h @@ -44,14 +44,14 @@ struct __uses_allocator<_Tp, _Alloc, true> : is_convertible<_Alloc, typename _Tp {}; #else // ^^^ _CCCL_STD_VER <= 2014 ^^^ / vvv _CCCL_STD_VER >= 2017 vvv template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_allocator_type_v = false; +_CCCL_INLINE_VAR constexpr bool __has_allocator_type_v = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_allocator_type_v<_Tp, void_t> = true; +_CCCL_INLINE_VAR constexpr bool __has_allocator_type_v<_Tp, void_t> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __uses_allocator_v = false; +_CCCL_INLINE_VAR constexpr bool __uses_allocator_v = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __uses_allocator_v<_Tp, _Alloc, true> = +_CCCL_INLINE_VAR constexpr bool __uses_allocator_v<_Tp, _Alloc, true> = is_convertible_v<_Alloc, typename _Tp::allocator_type>; #endif // _CCCL_STD_VER >= 2017 @@ -62,7 +62,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT uses_allocator #if _CCCL_STD_VER >= 2014 template -_LIBCUDACXX_INLINE_VAR constexpr bool uses_allocator_v = _CCCL_TRAIT(__uses_allocator, _Tp, _Alloc); +_CCCL_INLINE_VAR constexpr bool uses_allocator_v = _CCCL_TRAIT(__uses_allocator, _Tp, _Alloc); #endif // _CCCL_STD_VER >= 2014 _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__ranges/concepts.h b/libcudacxx/include/cuda/std/__ranges/concepts.h index 49163cd99b0..4439bce6b3c 100644 --- a/libcudacxx/include/cuda/std/__ranges/concepts.h +++ b/libcudacxx/include/cuda/std/__ranges/concepts.h @@ -126,10 +126,10 @@ template concept common_range = range<_Tp> && same_as, sentinel_t<_Tp>>; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_initializer_list = false; +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_initializer_list> = true; +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list> = true; template concept viewable_range = @@ -269,10 +269,10 @@ template _LIBCUDACXX_CONCEPT common_range = _LIBCUDACXX_FRAGMENT(__common_range_, _Tp); template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_initializer_list = false; +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_initializer_list> = true; +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list> = true; template _LIBCUDACXX_CONCEPT_FRAGMENT( diff --git a/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h b/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h index a8b9ce21655..f0c9a58e679 100644 --- a/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h +++ b/libcudacxx/include/cuda/std/__ranges/enable_borrowed_range.h @@ -32,7 +32,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES // [range.range], ranges template -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range = false; +_CCCL_INLINE_VAR 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 a4d67623b77..ff6376001e8 100644 --- a/libcudacxx/include/cuda/std/__ranges/enable_view.h +++ b/libcudacxx/include/cuda/std/__ranges/enable_view.h @@ -59,17 +59,17 @@ _LIBCUDACXX_HIDE_FROM_ABI void __is_derived_from_view_interface(const _Op*, cons # if _CCCL_STD_VER >= 2020 template -_LIBCUDACXX_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base> || requires { +_CCCL_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base> || requires { _CUDA_VRANGES::__is_derived_from_view_interface((_Tp*) nullptr, (_Tp*) nullptr); }; # else // ^^^ _CCCL_STD_VER >= 2020 ^^^ / vvv _CCCL_STD_VER <= 2017 vvv template -_LIBCUDACXX_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base>; +_CCCL_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base>; template -_LIBCUDACXX_INLINE_VAR constexpr bool +_CCCL_INLINE_VAR constexpr bool enable_view<_Tp, void_t> = true; # endif // _CCCL_STD_VER <= 2017 diff --git a/libcudacxx/include/cuda/std/__ranges/size.h b/libcudacxx/include/cuda/std/__ranges/size.h index 9adc3e4450f..259900b537e 100644 --- a/libcudacxx/include/cuda/std/__ranges/size.h +++ b/libcudacxx/include/cuda/std/__ranges/size.h @@ -39,7 +39,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES #if _CCCL_STD_VER >= 2017 && !defined(_CCCL_COMPILER_MSVC_2017) template -_LIBCUDACXX_INLINE_VAR constexpr bool disable_sized_range = false; +_CCCL_INLINE_VAR 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 ecce08b4e7f..a719f5339e8 100644 --- a/libcudacxx/include/cuda/std/__ranges/subrange.h +++ b/libcudacxx/include/cuda/std/__ranges/subrange.h @@ -470,7 +470,7 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __s } template -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range> = true; +_CCCL_INLINE_VAR 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 594becca096..f76db547e20 100644 --- a/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h +++ b/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h @@ -69,7 +69,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT tuple_size<__tuple_types<_Tp...>> #if _CCCL_STD_VER >= 2017 template -_LIBCUDACXX_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value; +_CCCL_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value; #endif // _CCCL_STD_VER >= 2017 _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 d1459ab14f9..0fa566e39ae 100644 --- a/libcudacxx/include/cuda/std/__type_traits/alignment_of.h +++ b/libcudacxx/include/cuda/std/__type_traits/alignment_of.h @@ -29,10 +29,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT alignment_of : public integral_constant {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr size_t alignment_of_v = _LIBCUDACXX_ALIGNOF(_Tp); -#endif +_CCCL_INLINE_VAR constexpr size_t alignment_of_v = _LIBCUDACXX_ALIGNOF(_Tp); +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 14f7213697c..2bc69cfc564 100644 --- a/libcudacxx/include/cuda/std/__type_traits/common_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/common_reference.h @@ -167,10 +167,10 @@ using common_reference_t = typename common_reference<_Types...>::type; # if _CCCL_STD_VER > 2011 template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_common_reference = false; +_CCCL_INLINE_VAR constexpr bool __has_common_reference = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_common_reference<_Tp, _Up, void_t>> = true; +_CCCL_INLINE_VAR constexpr bool __has_common_reference<_Tp, _Up, void_t>> = true; # endif // _CCCL_STD_VER > 2011 // 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 002306d1970..0058d1b5fcf 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 @@ template using common_type_t = typename common_type<_Tp...>::type; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_common_type = false; +_CCCL_INLINE_VAR constexpr bool __has_common_type = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __has_common_type<_Tp, _Up, void_t>> = true; +_CCCL_INLINE_VAR constexpr bool __has_common_type<_Tp, _Up, void_t>> = true; #endif // _CCCL_STD_VER >= 2014 _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 73cfd4e5478..dcaa2e60959 100644 --- a/libcudacxx/include/cuda/std/__type_traits/conjunction.h +++ b/libcudacxx/include/cuda/std/__type_traits/conjunction.h @@ -55,10 +55,10 @@ template struct conjunction<_Arg, _Args...> : _If> {}; -#if _CCCL_STD_VER >= 2014 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool conjunction_v = conjunction<_Args...>::value; -#endif // _CCCL_STD_VER >= 2014 +_CCCL_INLINE_VAR constexpr bool conjunction_v = conjunction<_Args...>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 c4a9abd8b83..fbb00f463a0 100644 --- a/libcudacxx/include/cuda/std/__type_traits/disjunction.h +++ b/libcudacxx/include/cuda/std/__type_traits/disjunction.h @@ -65,10 +65,10 @@ struct disjunction : _Or<_Args...> {}; #endif // !MSVC -#if _CCCL_STD_VER >= 2014 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool disjunction_v = _Or<_Args...>::value; -#endif // _CCCL_STD_VER >= 2014 +_CCCL_INLINE_VAR constexpr bool disjunction_v = _Or<_Args...>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 8f81bbaf324..ff27d1503c2 100644 --- a/libcudacxx/include/cuda/std/__type_traits/extent.h +++ b/libcudacxx/include/cuda/std/__type_traits/extent.h @@ -32,10 +32,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT extent : integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr size_t extent_v = _CCCL_BUILTIN_ARRAY_EXTENT(_Tp, _Ip); -# endif +_CCCL_INLINE_VAR constexpr size_t extent_v = _CCCL_BUILTIN_ARRAY_EXTENT(_Tp, _Ip); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_ARRAY_EXTENT ^^^ / vvv !_CCCL_BUILTIN_ARRAY_EXTENT vvv @@ -56,10 +56,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent<_Tp[_Np], _Ip> : public integral_constant::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr size_t extent_v = extent<_Tp, _Ip>::value; -# endif +_CCCL_INLINE_VAR constexpr size_t extent_v = extent<_Tp, _Ip>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 943eb55348e..4083b56e31a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/fold.h +++ b/libcudacxx/include/cuda/std/__type_traits/fold.h @@ -26,21 +26,21 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if _CCCL_STD_VER >= 2017 template -_LIBCUDACXX_INLINE_VAR constexpr bool __fold_and = (_Preds && ...); +_CCCL_INLINE_VAR constexpr bool __fold_and = (_Preds && ...); template -_LIBCUDACXX_INLINE_VAR constexpr bool __fold_or = (_Preds || ...); +_CCCL_INLINE_VAR constexpr bool __fold_or = (_Preds || ...); #elif _CCCL_STD_VER >= 2014 template struct __fold_helper; template -_LIBCUDACXX_INLINE_VAR constexpr bool __fold_and = +_CCCL_INLINE_VAR constexpr bool __fold_and = _IsSame<__fold_helper, __fold_helper<_Preds..., true>>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool __fold_or = +_CCCL_INLINE_VAR constexpr bool __fold_or = !_IsSame<__fold_helper, __fold_helper<_Preds..., false>>::value; #endif // _CCCL_STD_VER >= 2014 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 b7949b08822..a41f5d4d716 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 @@ -33,11 +33,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT has_unique_object_representations : public integral_constant>)> {}; -# if !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool has_unique_object_representations_v = - has_unique_object_representations<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif 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 c7bf5e0dfb4..63ced991735 100644 --- a/libcudacxx/include/cuda/std/__type_traits/has_virtual_destructor.h +++ b/libcudacxx/include/cuda/std/__type_traits/has_virtual_destructor.h @@ -39,10 +39,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT has_virtual_destructor : public false_type #endif // defined(_CCCL_BUILTIN_HAS_VIRTUAL_DESTRUCTOR) && !defined(_LIBCUDACXX_USE_HAS_VIRTUAL_DESTRUCTOR_FALLBACK) -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 67284b01564..02223c853d2 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_abstract.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_abstract.h @@ -28,10 +28,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_abstract : public integral_constant {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_abstract_v = __is_abstract(_Tp); -#endif +_CCCL_INLINE_VAR constexpr bool is_abstract_v = __is_abstract(_Tp); +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 7ef8a94c632..302a06814af 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_aggregate.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_aggregate.h @@ -30,10 +30,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_aggregate : public integral_constant {}; -# if !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_aggregate_v = _CCCL_BUILTIN_IS_AGGREGATE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_aggregate_v = _CCCL_BUILTIN_IS_AGGREGATE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // _CCCL_STD_VER > 2011 && 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 df6ef7f06cd..572043711ce 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_arithmetic.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_arithmetic.h @@ -31,10 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_arithmetic : public integral_constant::value || is_floating_point<_Tp>::value> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 64b75abac2d..af2dc7b4bd7 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_array.h @@ -33,10 +33,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_array : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_array_v = _CCCL_BUILTIN_IS_ARRAY(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_array_v = _CCCL_BUILTIN_IS_ARRAY(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -50,10 +50,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_array<_Tp[_Np]> : public true_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_array_v = is_array<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_array_v = is_array<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 b4b1e7e7710..a5416157b85 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_assignable.h @@ -39,10 +39,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_assignable : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_assignable_v = _CCCL_BUILTIN_IS_ASSIGNABLE(_T1, _T2); -# endif +_CCCL_INLINE_VAR constexpr bool is_assignable_v = _CCCL_BUILTIN_IS_ASSIGNABLE(_T1, _T2); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -66,10 +66,10 @@ template struct is_assignable : public __is_assignable_imp<_Tp, _Arg> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 54fde84e3da..aa4392c3716 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_base_of.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_base_of.h @@ -34,10 +34,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_base_of : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_base_of_v = _CCCL_BUILTIN_IS_BASE_OF(_Bp, _Dp); -# endif +_CCCL_INLINE_VAR constexpr bool is_base_of_v = _CCCL_BUILTIN_IS_BASE_OF(_Bp, _Dp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // defined(_CCCL_BUILTIN_IS_BASE_OF) && !defined(_LIBCUDACXX_USE_IS_BASE_OF_FALLBACK) @@ -71,10 +71,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_base_of : public integral_constant::value && sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_base_of_v = is_base_of<_Bp, _Dp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_base_of_v = is_base_of<_Bp, _Dp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 c4aa9e40b30..a913ab953a8 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h @@ -42,7 +42,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_bounded_array<_Tp[_Np]> : true_type {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value; #endif diff --git a/libcudacxx/include/cuda/std/__type_traits/is_class.h b/libcudacxx/include/cuda/std/__type_traits/is_class.h index c967fbad5f6..3017023ef0c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_class.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_class.h @@ -36,10 +36,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_class : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_class_v = _CCCL_BUILTIN_IS_CLASS(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_class_v = _CCCL_BUILTIN_IS_CLASS(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -56,10 +56,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_class : public integral_constant(0)) == 1 && !is_union<_Tp>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_class_v = is_class<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_class_v = is_class<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 356c2d25b9a..e423514d3d0 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_compound.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_compound.h @@ -31,10 +31,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_compound : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_compound_v = _CCCL_BUILTIN_IS_COMPOUND(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_compound_v = _CCCL_BUILTIN_IS_COMPOUND(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_COMPOUND ^^^ / vvv !_CCCL_BUILTIN_IS_COMPOUND vvv @@ -42,10 +42,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_compound : public integral_constant::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_compound_v = is_compound<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_compound_v = is_compound<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 94d669e3902..8321cb7a69b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_const.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_const.h @@ -30,10 +30,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_const : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_const_v = _CCCL_BUILTIN_IS_CONST(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_const_v = _CCCL_BUILTIN_IS_CONST(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_CONST ^^^ / vvv !_CCCL_BUILTIN_IS_CONST vvv @@ -44,10 +44,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_const<_Tp const> : public true_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_const_v = is_const<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_const_v = is_const<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 1790318a1af..a5fc6e656f8 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_constructible.h @@ -153,20 +153,20 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_constructible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_constructible_v = _CCCL_BUILTIN_IS_CONSTRUCTIBLE(_Tp, _Args...); -# endif +_CCCL_INLINE_VAR constexpr bool is_constructible_v = _CCCL_BUILTIN_IS_CONSTRUCTIBLE(_Tp, _Args...); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_constructible : public __libcpp_is_constructible<_Tp, _Args...>::type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 dd4924de7fd..9e94abda661 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_convertible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_convertible.h @@ -38,10 +38,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_convertible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_convertible_v = _CCCL_BUILTIN_IS_CONVERTIBLE_TO(_T1, _T2); -# endif +_CCCL_INLINE_VAR constexpr bool is_convertible_v = _CCCL_BUILTIN_IS_CONVERTIBLE_TO(_T1, _T2); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES # ifdef _CCCL_COMPILER_MSVC // Workaround for DevCom-1627396 template @@ -61,16 +61,16 @@ struct is_convertible : true_type {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_convertible_v<_Ty&, volatile _Ty&> = true; +_CCCL_INLINE_VAR constexpr bool is_convertible_v<_Ty&, volatile _Ty&> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_convertible_v = true; +_CCCL_INLINE_VAR constexpr bool is_convertible_v = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_convertible_v<_Ty&, const volatile _Ty&> = true; +_CCCL_INLINE_VAR constexpr bool is_convertible_v<_Ty&, const volatile _Ty&> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_convertible_v = true; +_CCCL_INLINE_VAR constexpr bool is_convertible_v = true; # endif // _CCCL_COMPILER_MSVC #else // ^^^ _CCCL_BUILTIN_IS_CONVERTIBLE_TO ^^^ / vvv !_CCCL_BUILTIN_IS_CONVERTIBLE_TO vvv @@ -198,10 +198,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_convertible : public __is_convertible_fa static const size_t __complete_check2 = __is_convertible_check<_T2>::__v; }; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_convertible_v = is_convertible<_From, _To>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_convertible_v = is_convertible<_From, _To>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 75d8cef6fb7..69bacd1bb91 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_copy_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_copy_assignable.h @@ -31,10 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_copy_assignable : public is_assignable<__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t::type>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 2628e3f8e8f..2a57157abcf 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_copy_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_copy_constructible.h @@ -31,10 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_copy_constructible : public is_constructible<_Tp, __add_lvalue_reference_t::type>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 5d4cac181b6..549c149f95d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_default_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_default_constructible.h @@ -28,10 +28,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_default_constructible : public is_constructible<_Tp> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_default_constructible_v = is_constructible_v<_Tp>; -#endif +_CCCL_INLINE_VAR constexpr bool is_default_constructible_v = is_constructible_v<_Tp>; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 8aefc395e12..634dfc63334 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_destructible.h @@ -35,10 +35,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_destructible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_destructible_v = _CCCL_BUILTIN_IS_DESTRUCTIBLE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_destructible_v = _CCCL_BUILTIN_IS_DESTRUCTIBLE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_DESTRUCTIBLE ^^^ / vvv !_CCCL_BUILTIN_IS_DESTRUCTIBLE vvv @@ -103,10 +103,10 @@ template <> struct is_destructible : public false_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_destructible_v = is_destructible<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_destructible_v = is_destructible<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 dffd075534b..7783093b9a4 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_empty.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_empty.h @@ -31,10 +31,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_empty : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_empty_v = _CCCL_BUILTIN_IS_EMPTY(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_empty_v = _CCCL_BUILTIN_IS_EMPTY(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -61,10 +61,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_empty : public __libcpp_empty<_Tp> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_empty_v = is_empty<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_empty_v = is_empty<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 21d8c47a5fd..7fe2856c513 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_enum.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_enum.h @@ -40,10 +40,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_enum : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_enum_v = _CCCL_BUILTIN_IS_ENUM(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_enum_v = _CCCL_BUILTIN_IS_ENUM(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -56,10 +56,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_enum && !is_union<_Tp>::value && !is_class<_Tp>::value && !is_function<_Tp>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_enum_v = is_enum<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_enum_v = is_enum<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_ENUM) && !defined(_LIBCUDACXX_USE_IS_ENUM_FALLBACK) 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 03c44a8046a..85c88064d62 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 @@ -28,13 +28,15 @@ template struct __is_extended_floating_point : false_type {}; -#if _CCCL_STD_VER >= 2017 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_extended_floating_point_v = false; -#elif _CCCL_STD_VER >= 2014 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) -template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_extended_floating_point_v = __is_extended_floating_point<_Tp>::value; -#endif // _CCCL_STD_VER >= 2014 +_CCCL_INLINE_VAR 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 + = false; +# endif // !_CCCL_NO_INLINE_VARIABLES +#endif // !_CCCL_NO_VARIABLE_TEMPALTES #if defined(_LIBCUDACXX_HAS_NVFP16) # include @@ -43,10 +45,10 @@ template <> struct __is_extended_floating_point<__half> : true_type {}; -# if _CCCL_STD_VER >= 2017 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +# ifndef _CCCL_NO_INLINE_VARIABLES template <> -_LIBCUDACXX_INLINE_VAR constexpr bool __is_extended_floating_point_v<__half> = true; -# endif // _CCCL_STD_VER >= 2014 +_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__half> = true; +# endif // !_CCCL_NO_INLINE_VARIABLES #endif // _LIBCUDACXX_HAS_NVFP16 #if defined(_LIBCUDACXX_HAS_NVBF16) @@ -59,10 +61,10 @@ template <> struct __is_extended_floating_point<__nv_bfloat16> : true_type {}; -# if _CCCL_STD_VER >= 2017 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +# ifndef _CCCL_NO_INLINE_VARIABLES template <> -_LIBCUDACXX_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_bfloat16> = true; -# endif // _CCCL_STD_VER >= 2014 +_CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_bfloat16> = true; +# endif // !_CCCL_NO_INLINE_VARIABLES #endif // _LIBCUDACXX_HAS_NVBF16 _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__type_traits/is_final.h b/libcudacxx/include/cuda/std/__type_traits/is_final.h index d98eec97f78..5924355a6cd 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_final.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_final.h @@ -36,10 +36,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_final : public integral_constant 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_final_v = _CCCL_BUILTIN_IS_FINAL(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_final_v = _CCCL_BUILTIN_IS_FINAL(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -53,10 +53,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_final : public false_type {}; # endif -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_final_v = false; -# endif +_CCCL_INLINE_VAR constexpr bool is_final_v = false; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_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 ccf2bf93075..452677c0469 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h @@ -42,10 +42,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_floating_point : public __libcpp_is_floating_point<__remove_cv_t<_Tp>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 e5d9a15ad35..a7676026e10 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_function.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_function.h @@ -32,10 +32,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_function : integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_function_v = _CCCL_BUILTIN_IS_FUNCTION(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_function_v = _CCCL_BUILTIN_IS_FUNCTION(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -44,10 +44,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_function : public integral_constant::value || is_const::value)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_function_v = is_function<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_function_v = is_function<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 0e3b2060f7a..9fba2e288bb 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_fundamental.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_fundamental.h @@ -33,10 +33,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_fundamental : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_fundamental_v = _CCCL_BUILTIN_IS_FUNDAMENTAL(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_fundamental_v = _CCCL_BUILTIN_IS_FUNDAMENTAL(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_FUNDAMENTAL ^^^ / vvv !_CCCL_BUILTIN_IS_FUNDAMENTAL vvv @@ -45,10 +45,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_fundamental : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // !_CCCL_BUILTIN_IS_FUNDAMENTAL diff --git a/libcudacxx/include/cuda/std/__type_traits/is_integral.h b/libcudacxx/include/cuda/std/__type_traits/is_integral.h index 89562a0be80..db869f1a5a0 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_integral.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_integral.h @@ -31,10 +31,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_integral : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_integral_v = _CCCL_BUILTIN_IS_INTEGRAL(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_integral_v = _CCCL_BUILTIN_IS_INTEGRAL(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_INTEGRAL ^^^ / vvv !_CCCL_BUILTIN_IS_INTEGRAL vvv @@ -107,10 +107,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_integral : public integral_constant>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_integral_v = is_integral<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_integral_v = is_integral<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 0dac0b10bef..fd415f123df 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h @@ -33,10 +33,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT _LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VAR constexpr bool is_literal_type_v = __is_literal_type(_Tp); -# endif +_LIBCUDACXX_DEPRECATED_IN_CXX17 _CCCL_INLINE_VAR constexpr bool is_literal_type_v = __is_literal_type(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -47,10 +47,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT _LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_ || is_reference<__remove_all_extents_t<_Tp>>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VAR constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; -# endif +_LIBCUDACXX_DEPRECATED_IN_CXX17 _CCCL_INLINE_VAR constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 4b2b26b8821..d7bc4f992d7 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 @@ -55,10 +55,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_member_function_pointer_v = _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER vvv @@ -67,10 +67,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer : public integral_constant>::__is_func> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 391df40c146..545c5af3cc6 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 @@ -33,10 +33,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_object_pointer : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_member_object_pointer_v = _CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_member_object_pointer_v = _CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_OBJECT_POINTER vvv @@ -45,10 +45,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_object_pointer : public integral_constant>::__is_obj> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 6d6b5448d2e..e2632a63d16 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h @@ -33,10 +33,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_member_pointer_v = _CCCL_BUILTIN_IS_MEMBER_POINTER(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_member_pointer_v = _CCCL_BUILTIN_IS_MEMBER_POINTER(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_POINTER vvv @@ -45,10 +45,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer : public integral_constant>::__is_member> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 fa8cc545935..534b46408a6 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_move_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_move_assignable.h @@ -31,10 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_move_assignable : public is_assignable<__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 93c061f76e1..ecd6c61630c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_move_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_move_constructible.h @@ -30,10 +30,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_move_constructible : public is_constructible<_Tp, __add_rvalue_reference_t<_Tp>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 c0a4af834a3..d9674a32d2d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h @@ -34,10 +34,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_assignable : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(_Tp, _Arg); -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(_Tp, _Arg); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #elif !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT) && !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT_SFINAE) @@ -58,10 +58,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_assignable : public __libcpp_is_nothrow_assignable::value, _Tp, _Arg> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -117,10 +117,10 @@ struct is_nothrow_assignable<_Tp&, _Tp&&> # endif // _LIBCUDACXX_HAS_NO_RVALUE_REFERENCES -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT) 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 66ce355d146..0a222501250 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h @@ -34,11 +34,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_constructible_v = - _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp, _Args...); -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp, _Args...); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -124,10 +123,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible<_Tp, _Tp&> # endif // !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT) -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 9ad099b5c1a..dd59ef98078 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_convertible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_convertible.h @@ -50,7 +50,7 @@ struct is_nothrow_convertible {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value; +_CCCL_INLINE_VAR constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value; #endif // _CCCL_STD_VER > 2011 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 2b97339f7ff..74af27aca68 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 @@ -35,11 +35,11 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_assignable __add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t::type>)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE( +_CCCL_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE( __add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t::type>); -# endif +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -48,10 +48,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_assignable : public is_nothrow_assignable<__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t::type>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 443d4c27483..582ccf6a3f3 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 @@ -31,10 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_constructible : public is_nothrow_constructible<_Tp, __add_lvalue_reference_t::type>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 fcb45e6eacf..f3be1e247a0 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 @@ -31,10 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_default_constructible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -42,10 +42,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_default_constructible : public is_nothrow_constructible<_Tp> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = is_nothrow_constructible<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = is_nothrow_constructible<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 0b81757940a..c1e34d89e77 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h @@ -82,10 +82,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_destructible<_Tp[]> : public fal #endif // defined(_CCCL_BUILTIN_IS_NOTHROW_DESTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_NOTHROW_DESTRUCTIBLE_FALLBACK) -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 13cc20b7878..dd3fe84c330 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 @@ -35,11 +35,11 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_assignable _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = +_CCCL_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>); -# endif +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -48,10 +48,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_assignable : public is_nothrow_assignable<__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 b13bcd7709e..e17d54c5ef7 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 @@ -30,10 +30,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_constructible : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 4e64b78928f..086adbb84a9 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_null_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_null_pointer.h @@ -41,10 +41,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp>> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; -#endif // _CCCL_STD_VER > 2011 +_CCCL_INLINE_VAR constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 bac9e616d8e..0c2c8e2e593 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_object.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_object.h @@ -34,10 +34,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_object : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_object_v = _CCCL_BUILTIN_IS_OBJECT(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_object_v = _CCCL_BUILTIN_IS_OBJECT(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -48,10 +48,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_object || is_class<_Tp>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_object_v = is_object<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_object_v = is_object<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 3de088826df..8237a42a870 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_pod.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_pod.h @@ -35,10 +35,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pod : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_pod_v = _CCCL_BUILTIN_IS_POD(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_pod_v = _CCCL_BUILTIN_IS_POD(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -50,10 +50,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pod && is_trivially_copy_assignable<_Tp>::value && is_trivially_destructible<_Tp>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_pod_v = is_pod<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_pod_v = is_pod<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 c75cce1bb96..0b0c46e46dd 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_pointer.h @@ -31,10 +31,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pointer : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_pointer_v = _CCCL_BUILTIN_IS_POINTER(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_pointer_v = _CCCL_BUILTIN_IS_POINTER(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -49,10 +49,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pointer : public __libcpp_is_pointer<__remove_cv_t<_Tp>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_pointer_v = is_pointer<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_pointer_v = is_pointer<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 8c6efaf361b..2581f782e85 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_polymorphic.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_polymorphic.h @@ -33,10 +33,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_polymorphic : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_polymorphic_v = _CCCL_BUILTIN_IS_POLYMORPHIC(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_polymorphic_v = _CCCL_BUILTIN_IS_POLYMORPHIC(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -51,10 +51,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_polymorphic : public integral_constant(0)) == 1> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_POLYMORPHIC) && !defined(_LIBCUDACXX_USE_IS_POLYMORPHIC_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_reference.h b/libcudacxx/include/cuda/std/__type_traits/is_reference.h index 5f607187a34..afb768f86b5 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_reference.h @@ -42,14 +42,14 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_lvalue_reference_v = _CCCL_BUILTIN_IS_LVALUE_REFERENCE(_Tp); +_CCCL_INLINE_VAR constexpr bool is_lvalue_reference_v = _CCCL_BUILTIN_IS_LVALUE_REFERENCE(_Tp); template -_LIBCUDACXX_INLINE_VAR constexpr bool is_rvalue_reference_v = _CCCL_BUILTIN_IS_RVALUE_REFERENCE(_Tp); +_CCCL_INLINE_VAR constexpr bool is_rvalue_reference_v = _CCCL_BUILTIN_IS_RVALUE_REFERENCE(_Tp); template -_LIBCUDACXX_INLINE_VAR constexpr bool is_reference_v = _CCCL_BUILTIN_IS_REFERENCE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_reference_v = _CCCL_BUILTIN_IS_REFERENCE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -77,16 +77,16 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference<_Tp&&> : public true_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_reference_v = is_reference<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_reference_v = is_reference<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 a1f1a4694ca..e89615391dc 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_same.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_same.h @@ -30,10 +30,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_same : bool_constant<_CCCL_BUILTIN_IS_SAME(_Tp, _Up)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_same_v = _CCCL_BUILTIN_IS_SAME(_Tp, _Up); -# endif +_CCCL_INLINE_VAR constexpr bool is_same_v = _CCCL_BUILTIN_IS_SAME(_Tp, _Up); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES // _IsSame has the same effect as is_same but instantiates fewer types: // is_same and is_same are guaranteed to be different types, but @@ -57,10 +57,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_same<_Tp, _Tp> : public true_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_same_v = is_same<_Tp, _Up>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_same_v = is_same<_Tp, _Up>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES // _IsSame has the same effect as is_same but instantiates fewer types: // is_same and is_same are guaranteed to be different types, but diff --git a/libcudacxx/include/cuda/std/__type_traits/is_scalar.h b/libcudacxx/include/cuda/std/__type_traits/is_scalar.h index 66808acfd56..31887570935 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_scalar.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_scalar.h @@ -36,10 +36,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_scalar_v = _CCCL_BUILTIN_IS_SCALAR(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_scalar_v = _CCCL_BUILTIN_IS_SCALAR(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -63,10 +63,10 @@ template <> struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar : public true_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_scalar_v = is_scalar<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_scalar_v = is_scalar<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 81bead33594..126d1a1b944 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_scoped_enum.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_scoped_enum.h @@ -41,7 +41,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scoped_enum : public __is_scoped_enum_he {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; #endif _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 7c0434f206c..c65c9449b8b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_signed.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_signed.h @@ -34,10 +34,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_signed_v = _CCCL_BUILTIN_IS_SIGNED(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_signed_v = _CCCL_BUILTIN_IS_SIGNED(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -61,10 +61,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public __libcpp_is_signed<_Tp> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_signed_v = is_signed<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_signed_v = is_signed<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_SIGNED) && !defined(_LIBCUDACXX_USE_IS_SIGNED_FALLBACK) 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 ae142676ad1..40e95e64070 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_standard_layout.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_standard_layout.h @@ -33,10 +33,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_standard_layout : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_standard_layout_v = _CCCL_BUILTIN_IS_STANDARD_LAYOUT(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_standard_layout_v = _CCCL_BUILTIN_IS_STANDARD_LAYOUT(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -45,10 +45,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_standard_layout : integral_constant>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 733d17e2297..4305305ea86 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h @@ -181,16 +181,16 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_swappable {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; +_CCCL_INLINE_VAR constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_swappable_v = is_swappable<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_swappable_v = is_swappable<_Tp>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; +_CCCL_INLINE_VAR constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; #endif // _CCCL_STD_VER > 2011 diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivial.h b/libcudacxx/include/cuda/std/__type_traits/is_trivial.h index f0dcbe77485..935499b401b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivial.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivial.h @@ -32,10 +32,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivial : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivial_v = _CCCL_BUILTIN_IS_TRIVIAL(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_trivial_v = _CCCL_BUILTIN_IS_TRIVIAL(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -44,10 +44,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivial : public integral_constant::value && is_trivially_default_constructible<_Tp>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivial_v = is_trivial<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivial_v = is_trivial<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 b4a16149db1..14e8c9918a7 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_assignable.h @@ -31,10 +31,10 @@ template struct is_trivially_assignable : integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(_Tp, _Arg); -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(_Tp, _Arg); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -58,10 +58,10 @@ template struct is_trivially_assignable<_Tp&, _Tp&&> : integral_constant::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 bf61e241233..0c80518662d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_constructible.h @@ -32,11 +32,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_constructible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_constructible_v = - _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, _Args...); -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, _Args...); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -70,10 +69,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_constructible<_Tp, _Tp&> : integral_constant::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && // !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_CONSTRUCTIBLE_FALLBACK) 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 3da071ef256..81eb5828413 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 @@ -35,11 +35,11 @@ struct is_trivially_copy_assignable __add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t::type>)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE( +_CCCL_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE( __add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t::type>); -# endif +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -49,10 +49,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copy_assignable __add_lvalue_reference_t::type>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 251b23dac1d..58688837531 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 @@ -35,11 +35,11 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copy_constructible _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, __add_lvalue_reference_t::type>)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = +_CCCL_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, __add_lvalue_reference_t::type>); -# endif +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -48,10 +48,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copy_constructible : public is_trivially_constructible<_Tp, __add_lvalue_reference_t::type>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && // !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_CONSTRUCTIBLE_FALLBACK) 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 b7303539c94..efea7234525 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_copyable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_copyable.h @@ -33,10 +33,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copyable : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_copyable_v = _CCCL_BUILTIN_IS_TRIVIALLY_COPYABLE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_copyable_v = _CCCL_BUILTIN_IS_TRIVIALLY_COPYABLE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -45,10 +45,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_copyable : integral_constant>::value> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_COPYABLE) && !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_COPYABLE_FALLBACK) _LIBCUDACXX_END_NAMESPACE_STD 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 98e03f9e6fb..d17dedaeb8e 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 @@ -31,11 +31,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_default_constructible : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_default_constructible_v = - _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_default_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -43,11 +42,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_default_constructible : public is_trivially_constructible<_Tp> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_default_constructible_v = - is_trivially_default_constructible<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && // !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_CONSTRUCTIBLE_FALLBACK) 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 9d7fb25d8e0..4c9dabc820a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h @@ -61,10 +61,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_destructible<_Tp[]> : public f #endif // defined(_CCCL_BUILTIN_HAS_TRIVIAL_DESTRUCTOR) && !defined(_LIBCUDACXX_USE_HAS_TRIVIAL_DESTRUCTOR_FALLBACK) -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; -#endif +_CCCL_INLINE_VAR constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES _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 d6e1d0fb428..fa970ff00f9 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 @@ -35,11 +35,11 @@ struct is_trivially_move_assignable _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_move_assignable_v = +_CCCL_INLINE_VAR constexpr bool is_trivially_move_assignable_v = _CCCL_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>); -# endif +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -48,10 +48,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_move_assignable : public is_trivially_assignable<__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 8f8a02060f7..840c6541f68 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 @@ -32,11 +32,11 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_move_constructible : public integral_constant)> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_move_constructible_v = +_CCCL_INLINE_VAR constexpr bool is_trivially_move_constructible_v = _CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(_Tp, __add_rvalue_reference_t<_Tp>); -# endif +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -45,10 +45,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_move_constructible : public is_trivially_constructible<_Tp, __add_rvalue_reference_t<_Tp>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE) && // !defined(_LIBCUDACXX_USE_IS_TRIVIALLY_CONSTRUCTIBLE_FALLBACK) 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 f1283168498..f5d0ff40d0a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h @@ -41,7 +41,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unbounded_array<_Tp[]> : true_type {}; template -_LIBCUDACXX_INLINE_VAR constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; +_CCCL_INLINE_VAR constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; #endif _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 f971996f2d3..77d8f099678 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_union.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_union.h @@ -31,10 +31,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_union : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_union_v = _CCCL_BUILTIN_IS_UNION(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_union_v = _CCCL_BUILTIN_IS_UNION(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -45,10 +45,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_union : public __libcpp_union<__remove_cv_t<_Tp>> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_union_v = is_union<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_union_v = is_union<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 a8ea6e11d34..c8cc2452971 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h @@ -37,10 +37,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unsigned : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_unsigned_v = _CCCL_BUILTIN_IS_UNSIGNED(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_unsigned_v = _CCCL_BUILTIN_IS_UNSIGNED(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -64,10 +64,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unsigned : public __libcpp_is_unsigned<_Tp> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_IS_UNSIGNED) && !defined(_LIBCUDACXX_USE_IS_UNSIGNED_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_void.h b/libcudacxx/include/cuda/std/__type_traits/is_void.h index 963ecf47ccc..01fe5d01fc7 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_void.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_void.h @@ -32,10 +32,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_void : integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_void_v = __is_void(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_void_v = __is_void(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -43,10 +43,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_void : public is_same<__remove_cv_t<_Tp>, void> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_void_v = is_void<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_void_v = is_void<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 2b9f38e63eb..ffa59313d52 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_volatile.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_volatile.h @@ -30,10 +30,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_volatile : : public integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_volatile_v = _CCCL_BUILTIN_IS_VOLATILE(_Tp); -# endif +_CCCL_INLINE_VAR constexpr bool is_volatile_v = _CCCL_BUILTIN_IS_VOLATILE(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else // ^^^ _CCCL_BUILTIN_IS_VOLATILE ^^^ / vvv !_CCCL_BUILTIN_IS_VOLATILE vvv @@ -44,10 +44,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_volatile<_Tp volatile> : public true_type {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool is_volatile_v = is_volatile<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr bool is_volatile_v = is_volatile<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #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 cd01236f9ce..5122b567fa0 100644 --- a/libcudacxx/include/cuda/std/__type_traits/negation.h +++ b/libcudacxx/include/cuda/std/__type_traits/negation.h @@ -33,7 +33,7 @@ struct negation : _Not<_Tp> {}; #if _CCCL_STD_VER >= 2014 template -_LIBCUDACXX_INLINE_VAR constexpr bool negation_v = !_Tp::value; +_CCCL_INLINE_VAR constexpr bool negation_v = !_Tp::value; #endif // _CCCL_STD_VER >= 2014 _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 8c8c9a26be6..2d950bd99b8 100644 --- a/libcudacxx/include/cuda/std/__type_traits/rank.h +++ b/libcudacxx/include/cuda/std/__type_traits/rank.h @@ -31,10 +31,10 @@ template struct rank : integral_constant {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr size_t rank_v = _CCCL_BUILTIN_ARRAY_RANK(_Tp); -# endif +_CCCL_INLINE_VAR constexpr size_t rank_v = _CCCL_BUILTIN_ARRAY_RANK(_Tp); +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #else @@ -48,10 +48,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT rank<_Tp[_Np]> : public integral_constant::value + 1> {}; -# if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +# if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr size_t rank_v = rank<_Tp>::value; -# endif +_CCCL_INLINE_VAR constexpr size_t rank_v = rank<_Tp>::value; +# endif // !_CCCL_NO_VARIABLE_TEMPALTES #endif // defined(_CCCL_BUILTIN_ARRAY_RANK) && !defined(_LIBCUDACXX_USE_ARRAY_RANK_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/type_list.h b/libcudacxx/include/cuda/std/__type_traits/type_list.h index 96357ff2674..f5396232ab7 100644 --- a/libcudacxx/include/cuda/std/__type_traits/type_list.h +++ b/libcudacxx/include/cuda/std/__type_traits/type_list.h @@ -190,10 +190,10 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT __type_list // Before the addition of inline variables, it was necessary to // provide a definition for constexpr class static data members. -# if _CCCL_STD_VER >= 2017 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +# ifndef _CCCL_NO_INLINE_VARIABLES template constexpr size_t const __type_list<_Ts...>::__size; -# endif +# endif // !_CCCL_NO_INLINE_VARIABLES //! \brief A pointer to a type list, often used as a function argument. template diff --git a/libcudacxx/include/cuda/std/__type_traits/type_set.h b/libcudacxx/include/cuda/std/__type_traits/type_set.h index 85d52db04c4..10eeb6f5056 100644 --- a/libcudacxx/include/cuda/std/__type_traits/type_set.h +++ b/libcudacxx/include/cuda/std/__type_traits/type_set.h @@ -31,7 +31,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_LIBCUDACXX_INLINE_VAR constexpr bool __type_set_contains = +_CCCL_INLINE_VAR constexpr bool __type_set_contains = _CUDA_VSTD::__fold_and<_CCCL_TRAIT(_CUDA_VSTD::is_base_of, __type_identity<_Ty>, _Set)...>; namespace __set @@ -71,7 +71,7 @@ struct __bulk_insert } // namespace __set template -_LIBCUDACXX_INLINE_VAR constexpr bool __type_set_eq = // +_CCCL_INLINE_VAR constexpr bool __type_set_eq = // (sizeof...(_Ts) == _ExpectedSet::__size()) && __type_set_contains<_ExpectedSet, _Ts...>; template @@ -84,7 +84,7 @@ template using __make_type_set = __type_set_insert<__type_set<>, _Ts...>; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_included_in = __fold_or<_CCCL_TRAIT(is_same, _Ty, _Ts)...>; +_CCCL_INLINE_VAR constexpr bool __is_included_in = __fold_or<_CCCL_TRAIT(is_same, _Ty, _Ts)...>; _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 4b68a95ad06..a1f0cc98596 100644 --- a/libcudacxx/include/cuda/std/__utility/in_place.h +++ b/libcudacxx/include/cuda/std/__utility/in_place.h @@ -40,7 +40,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT in_place_type_t _CCCL_HIDE_FROM_ABI explicit in_place_type_t() = default; }; template -_LIBCUDACXX_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; +_CCCL_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT in_place_index_t @@ -48,7 +48,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT in_place_index_t _CCCL_HIDE_FROM_ABI explicit in_place_index_t() = default; }; template -_LIBCUDACXX_INLINE_VAR constexpr in_place_index_t<_Idx> in_place_index{}; +_CCCL_INLINE_VAR 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/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/__config index ee90af58e63..17423fcefb9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__config +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__config @@ -382,10 +382,6 @@ typedef __char32_t char32_t; # define _LIBCUDACXX_HAS_NO_GENERALIZED_INITIALIZERS # endif -# if !(_CCCL_HAS_FEATURE(cxx_variable_templates)) -# define _LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES -# endif - # if !(_CCCL_HAS_FEATURE(cxx_noexcept)) # define _LIBCUDACXX_HAS_NO_NOEXCEPT # endif @@ -400,11 +396,6 @@ typedef __char32_t char32_t; # elif defined(_CCCL_COMPILER_GCC) -// GCC 5 supports variable templates -# if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L -# define _LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES -# endif - # if _GNUC_VER < 600 # define _LIBCUDACXX_GCC_MATH_IN_STD # endif @@ -442,10 +433,6 @@ typedef __char32_t char32_t; # define _LIBCUDACXX_MSVC_HAS_NO_ISO_INTRIN # endif -# if _CCCL_STD_VER < 2014 -# define _LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES -# endif - # define _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION # define _LIBCUDACXX_DISABLE_EXTENSION_WARNING @@ -454,10 +441,6 @@ typedef __char32_t char32_t; # elif defined(_CCCL_COMPILER_NVRTC) || defined(_CCCL_COMPILER_NVHPC) -# if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L -# define _LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES -# endif - # define _LIBCUDACXX_DISABLE_EXTENSION_WARNING # endif // _CCCL_COMPILER_[CLANG|GCC|MSVC|NVRTC] @@ -723,12 +706,6 @@ typedef unsigned int char32_t; # define _LIBCUDACXX_DEPRECATED_IN_CXX20 # endif -# if _CCCL_STD_VER > 2014 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) -# define _LIBCUDACXX_INLINE_VAR inline -# else -# define _LIBCUDACXX_INLINE_VAR -# endif - # ifdef _LIBCUDACXX_HAS_NO_RVALUE_REFERENCES # define _LIBCUDACXX_EXPLICIT_MOVE(x) _CUDA_VSTD::move(x) # else diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono index 54e7a021c2c..6d5a378f7d1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono @@ -976,10 +976,10 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT treat_as_floating_point : is_floating_point<_Rep> {}; -#if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; -#endif // _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +_CCCL_INLINE_VAR constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; +#endif // !_CCCL_NO_VARIABLE_TEMPALTES template struct _CCCL_TYPE_VISIBILITY_DEFAULT duration_values @@ -2208,27 +2208,27 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr weekday_last weekday::operator[](last_spec) return weekday_last{*this}; } -_LIBCUDACXX_INLINE_VAR constexpr last_spec last{}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Sunday{0}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Monday{1}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Tuesday{2}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Wednesday{3}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Thursday{4}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Friday{5}; -_LIBCUDACXX_INLINE_VAR constexpr weekday Saturday{6}; - -_LIBCUDACXX_INLINE_VAR constexpr month January{1}; -_LIBCUDACXX_INLINE_VAR constexpr month February{2}; -_LIBCUDACXX_INLINE_VAR constexpr month March{3}; -_LIBCUDACXX_INLINE_VAR constexpr month April{4}; -_LIBCUDACXX_INLINE_VAR constexpr month May{5}; -_LIBCUDACXX_INLINE_VAR constexpr month June{6}; -_LIBCUDACXX_INLINE_VAR constexpr month July{7}; -_LIBCUDACXX_INLINE_VAR constexpr month August{8}; -_LIBCUDACXX_INLINE_VAR constexpr month September{9}; -_LIBCUDACXX_INLINE_VAR constexpr month October{10}; -_LIBCUDACXX_INLINE_VAR constexpr month November{11}; -_LIBCUDACXX_INLINE_VAR constexpr month December{12}; +_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}; class month_day { diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/optional b/libcudacxx/include/cuda/std/detail/libcxx/include/optional index b7cd3260d9f..7a3984da5a7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/optional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/optional @@ -435,7 +435,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp> }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __optional_can_copy_construct = +_CCCL_INLINE_VAR 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 @@ -477,7 +477,7 @@ struct __optional_copy_base<_Tp, __smf_availability::__deleted> : __optional_sto }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __optional_can_move_construct = +_CCCL_INLINE_VAR 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 @@ -518,7 +518,7 @@ struct __optional_move_base<_Tp, __smf_availability::__deleted> : __optional_cop }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __optional_can_copy_assign = +_CCCL_INLINE_VAR 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 @@ -561,7 +561,7 @@ struct __optional_copy_assign_base<_Tp, __smf_availability::__deleted> : __optio }; template -_LIBCUDACXX_INLINE_VAR constexpr __smf_availability __optional_can_move_assign = +_CCCL_INLINE_VAR 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 @@ -633,33 +633,33 @@ using __opt_check_assignable_from_opt = is_assignable<_Tp&, _Opt const&&>>; template -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_implictly_constructible = +_CCCL_INLINE_VAR constexpr bool __opt_is_implictly_constructible = _CCCL_TRAIT(is_constructible, _Tp, _Up) && _CCCL_TRAIT(is_convertible, _Up, _Tp); template -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_explictly_constructible = +_CCCL_INLINE_VAR constexpr bool __opt_is_explictly_constructible = _CCCL_TRAIT(is_constructible, _Tp, _Up) && !_CCCL_TRAIT(is_convertible, _Up, _Tp); template -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_constructible_from_U = +_CCCL_INLINE_VAR 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 -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_constructible_from_opt = +_CCCL_INLINE_VAR constexpr bool __opt_is_constructible_from_opt = !_CCCL_TRAIT(is_same, _Up, _Tp) && !__opt_check_constructible_from_opt<_Tp, _Up>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_assignable = +_CCCL_INLINE_VAR constexpr bool __opt_is_assignable = _CCCL_TRAIT(is_constructible, _Tp, _Up) && _CCCL_TRAIT(is_assignable, _Tp&, _Up); template -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_assignable_from_U = +_CCCL_INLINE_VAR 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 -_LIBCUDACXX_INLINE_VAR constexpr bool __opt_is_assignable_from_opt = +_CCCL_INLINE_VAR 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 5af60b1b2b8..f9622a3e206 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ratio +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ratio @@ -459,25 +459,25 @@ struct __ratio_gcd typedef ratio<__static_gcd<_R1::num, _R2::num>::value, __static_lcm<_R1::den, _R2::den>::value> type; }; -#if _CCCL_STD_VER > 2014 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) template -_LIBCUDACXX_INLINE_VAR constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; +_CCCL_INLINE_VAR constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; +_CCCL_INLINE_VAR constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; +_CCCL_INLINE_VAR constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; +_CCCL_INLINE_VAR constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; +_CCCL_INLINE_VAR constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; template -_LIBCUDACXX_INLINE_VAR constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; -#endif +_CCCL_INLINE_VAR constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; +#endif // _CCCL_NO_VARIABLE_TEMPALTES _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 65848fe3bd6..6a314620d6b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/span +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/span @@ -187,16 +187,16 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if _CCCL_STD_VER >= 2014 template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_array = false; +_CCCL_INLINE_VAR constexpr bool __is_std_array = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_array> = true; +_CCCL_INLINE_VAR constexpr bool __is_std_array> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_span = false; +_CCCL_INLINE_VAR constexpr bool __is_std_span = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_std_span> = true; +_CCCL_INLINE_VAR constexpr bool __is_std_span> = true; template _LIBCUDACXX_CONCEPT __span_array_convertible = _CCCL_TRAIT(is_convertible, _From (*)[], _To (*)[]); @@ -247,10 +247,10 @@ _LIBCUDACXX_CONCEPT __span_compatible_sentinel_for = # else // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER_MSVC_2017 template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_span_compatible_container = false; +_CCCL_INLINE_VAR constexpr bool __is_span_compatible_container = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool __is_span_compatible_container< +_CCCL_INLINE_VAR constexpr bool __is_span_compatible_container< _Tp, _ElementType, void_t< @@ -295,10 +295,10 @@ _LIBCUDACXX_CONCEPT __integral_constant_like = _LIBCUDACXX_FRAGMENT(__integral_c # endif // _CCCL_STD_VER <= 2017 template > -_LIBCUDACXX_INLINE_VAR constexpr size_t __maybe_static_ext = dynamic_extent; +_CCCL_INLINE_VAR constexpr size_t __maybe_static_ext = dynamic_extent; template -_LIBCUDACXX_INLINE_VAR constexpr size_t __maybe_static_ext<_Tp, true> = {_Tp::value}; +_CCCL_INLINE_VAR constexpr size_t __maybe_static_ext<_Tp, true> = {_Tp::value}; template class _CCCL_TYPE_VISIBILITY_DEFAULT span @@ -832,10 +832,10 @@ _LIBCUDACXX_END_NAMESPACE_STD #if _CCCL_STD_VER >= 2017 && !defined(_CCCL_COMPILER_MSVC_2017) _LIBCUDACXX_BEGIN_NAMESPACE_RANGES template -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range> = true; +_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; template -_LIBCUDACXX_INLINE_VAR constexpr bool enable_view> = true; +_CCCL_INLINE_VAR constexpr bool enable_view> = true; _LIBCUDACXX_END_NAMESPACE_RANGES #endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER_MSVC_2017 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/variant b/libcudacxx/include/cuda/std/detail/libcxx/include/variant index 2bd65219887..be46e0f8dd8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -314,7 +314,7 @@ template struct _CCCL_TYPE_VISIBILITY_DEFAULT variant_size; template -_LIBCUDACXX_INLINE_VAR constexpr size_t variant_size_v = variant_size<_Tp>::value; +_CCCL_INLINE_VAR constexpr size_t variant_size_v = variant_size<_Tp>::value; template struct _CCCL_TYPE_VISIBILITY_DEFAULT variant_size : variant_size<_Tp> @@ -359,7 +359,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT variant_alternative<_Ip, variant<_Types...> using type = __type_index_c<_Ip, _Types...>; }; -_LIBCUDACXX_INLINE_VAR constexpr size_t variant_npos = static_cast(-1); +_CCCL_INLINE_VAR constexpr size_t variant_npos = static_cast(-1); _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 int __choose_index_type(unsigned int __num_elem) { 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 ca679c96359..b554505b2c2 100644 --- a/libcudacxx/test/libcudacxx/std/ranges/range.access/size.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/ranges/range.access/size.pass.cpp @@ -271,7 +271,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool disable_sized_range = true; +_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -292,7 +292,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool disable_sized_range = true; +_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -312,7 +312,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool disable_sized_range = true; +_CCCL_INLINE_VAR constexpr bool disable_sized_range = true; } } // namespace std } // namespace cuda @@ -332,7 +332,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool disable_sized_range = true; +_CCCL_INLINE_VAR 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 f46f673362c..9def7c97daf 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 @@ -46,7 +46,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range = true; +_CCCL_INLINE_VAR 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 51b7020dd3f..894b93f83fa 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 <> -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range = true; +_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -286,7 +286,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range = true; +_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -333,7 +333,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range = true; +_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; } } // namespace std } // namespace cuda @@ -387,7 +387,7 @@ namespace std namespace ranges { template <> -_LIBCUDACXX_INLINE_VAR constexpr bool enable_borrowed_range = true; +_CCCL_INLINE_VAR 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 7bda9746f3a..9f19af918d3 100644 --- a/libcudacxx/test/support/test_iterators.h +++ b/libcudacxx/test/support/test_iterators.h @@ -1637,10 +1637,10 @@ template struct Proxy; template -_LIBCUDACXX_INLINE_VAR constexpr bool IsProxy = false; +_CCCL_INLINE_VAR constexpr bool IsProxy = false; template -_LIBCUDACXX_INLINE_VAR constexpr bool IsProxy> = true; +_CCCL_INLINE_VAR constexpr bool IsProxy> = true; template struct Proxy diff --git a/thrust/thrust/type_traits/logical_metafunctions.h b/thrust/thrust/type_traits/logical_metafunctions.h index 1be7bbd06a2..59893b8b170 100644 --- a/thrust/thrust/type_traits/logical_metafunctions.h +++ b/thrust/thrust/type_traits/logical_metafunctions.h @@ -40,11 +40,11 @@ THRUST_NAMESPACE_BEGIN using ::cuda::std::conjunction; using ::cuda::std::disjunction; using ::cuda::std::negation; -#if _CCCL_STD_VER >= 2014 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) +#if !defined(_CCCL_NO_VARIABLE_TEMPALTES) using ::cuda::std::conjunction_v; using ::cuda::std::disjunction_v; using ::cuda::std::negation_v; -#endif +#endif // !_CCCL_NO_VARIABLE_TEMPALTES //! \brief std::integral_constant //! whose value is (... && Bs).