From d7e4c4c393fa16963ab3119fb9c15580ee6b5802 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Mon, 1 Apr 2024 00:42:50 +0800 Subject: [PATCH] Drop `inline`/`_INLINE_VAR` from templated `constexpr` variables --- stl/inc/__msvc_bit_utils.hpp | 4 +- stl/inc/__msvc_chrono.hpp | 15 +- stl/inc/__msvc_filebuf.hpp | 2 +- stl/inc/__msvc_iter_core.hpp | 8 +- stl/inc/algorithm | 12 +- stl/inc/any | 11 +- stl/inc/atomic | 13 +- stl/inc/chrono | 16 +- stl/inc/compare | 2 +- stl/inc/complex | 6 +- stl/inc/execution | 2 +- stl/inc/filesystem | 10 +- stl/inc/format | 18 +- stl/inc/functional | 16 +- stl/inc/mdspan | 10 +- stl/inc/numbers | 52 ++-- stl/inc/numeric | 8 +- stl/inc/ranges | 176 ++++++------- stl/inc/ratio | 16 +- stl/inc/regex | 2 +- stl/inc/span | 8 +- stl/inc/system_error | 4 +- stl/inc/tuple | 43 ++-- stl/inc/type_traits | 241 +++++++++--------- stl/inc/utility | 24 +- stl/inc/variant | 38 +-- stl/inc/vector | 4 +- stl/inc/xcharconv_ryu_tables.h | 2 +- stl/inc/xhash | 2 +- stl/inc/xlocale | 4 +- stl/inc/xmemory | 52 ++-- stl/inc/xstring | 8 +- stl/inc/xtr1common | 17 +- stl/inc/xutility | 147 ++++++----- tests/std/include/is_permissive.hpp | 2 +- tests/std/include/range_algorithm_support.hpp | 8 +- tests/std/include/test_mdspan_support.hpp | 6 +- .../test.compile.pass.cpp | 4 +- .../floating_point_utils.hpp | 14 +- .../test.compile.pass.cpp | 6 +- tests/std/tests/P0088R3_variant/test.cpp | 6 +- tests/std/tests/P0122R7_span/test.cpp | 6 +- tests/std/tests/P0220R1_optional/test.cpp | 2 +- tests/std/tests/P0448R4_spanstream/test.cpp | 6 +- .../std/tests/P0768R1_spaceship_cpos/test.cpp | 2 +- .../test.cpp | 2 +- .../tests/P0896R4_counted_iterator/test.cpp | 4 +- .../test.compile.pass.cpp | 4 +- .../test.cpp | 2 +- .../test.compile.pass.cpp | 8 +- .../tests/P0896R4_ranges_to_address/test.cpp | 4 +- tests/std/tests/P0896R4_views_drop/test.cpp | 4 +- tests/std/tests/P0896R4_views_take/test.cpp | 4 +- tests/std/tests/P1614R2_spaceship/test.cpp | 4 +- .../test.compile.pass.cpp | 3 +- 55 files changed, 536 insertions(+), 558 deletions(-) diff --git a/stl/inc/__msvc_bit_utils.hpp b/stl/inc/__msvc_bit_utils.hpp index b5772b86cb..2b910d69ab 100644 --- a/stl/inc/__msvc_bit_utils.hpp +++ b/stl/inc/__msvc_bit_utils.hpp @@ -41,7 +41,7 @@ _INLINE_VAR constexpr int _Stl_isa_available_sse42 = 2; // equal to __ISA_AVAILA _INLINE_VAR constexpr int _Stl_isa_available_avx2 = 5; // equal to __ISA_AVAILABLE_AVX2 template -_INLINE_VAR constexpr int _Unsigned_integer_digits = sizeof(_UInt) * CHAR_BIT; +constexpr int _Unsigned_integer_digits = sizeof(_UInt) * CHAR_BIT; // Implementation of countl_zero without using specialized CPU instructions. // Used at compile time and when said instructions are not supported. @@ -356,7 +356,7 @@ _NODISCARD inline int _Arm64_popcount(const unsigned long long _Val) noexcept { #endif // _HAS_NEON_INTRINSICS template -_INLINE_VAR constexpr bool _Is_standard_unsigned_integer = +constexpr bool _Is_standard_unsigned_integer = _Is_any_of_v, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long>; template , int> = 0> diff --git a/stl/inc/__msvc_chrono.hpp b/stl/inc/__msvc_chrono.hpp index c29e3459ea..f6857a6130 100644 --- a/stl/inc/__msvc_chrono.hpp +++ b/stl/inc/__msvc_chrono.hpp @@ -31,7 +31,7 @@ namespace chrono { struct treat_as_floating_point : is_floating_point<_Rep> {}; // tests for floating-point type _EXPORT_STD template - _INLINE_VAR constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; + constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; _EXPORT_STD template struct duration_values { // gets arithmetic properties of a type @@ -53,10 +53,10 @@ namespace chrono { #if _HAS_CXX20 template - inline constexpr bool _Is_clock_v = false; + constexpr bool _Is_clock_v = false; template - inline constexpr bool + constexpr bool _Is_clock_v<_Clock, void_t> = true; // TRANSITION, GH-602 @@ -64,14 +64,14 @@ namespace chrono { _EXPORT_STD template struct is_clock : bool_constant<_Is_clock_v<_Clock>> {}; _EXPORT_STD template - inline constexpr bool is_clock_v = _Is_clock_v<_Clock>; + constexpr bool is_clock_v = _Is_clock_v<_Clock>; #endif // _HAS_CXX20 _EXPORT_STD template > class duration; template - _INLINE_VAR constexpr bool _Is_duration_v = _Is_specialization_v<_Ty, duration>; + constexpr bool _Is_duration_v = _Is_specialization_v<_Ty, duration>; _EXPORT_STD template , int> = 0> constexpr _To duration_cast(const duration<_Rep, _Period>&) noexcept( @@ -252,11 +252,10 @@ namespace chrono { } // namespace chrono template -_INLINE_VAR constexpr bool _Is_trivially_swappable_v> = _Is_trivially_swappable_v<_Rep>; +constexpr bool _Is_trivially_swappable_v> = _Is_trivially_swappable_v<_Rep>; template -_INLINE_VAR constexpr bool _Is_trivially_swappable_v> = - _Is_trivially_swappable_v<_Duration>; +constexpr bool _Is_trivially_swappable_v> = _Is_trivially_swappable_v<_Duration>; _NODISCARD constexpr intmax_t _Lcm(const intmax_t _Ax, const intmax_t _Bx) noexcept { return (_Ax / _Gcd(_Ax, _Bx)) * _Bx; diff --git a/stl/inc/__msvc_filebuf.hpp b/stl/inc/__msvc_filebuf.hpp index 9f6738be1b..4d8e76dbc1 100644 --- a/stl/inc/__msvc_filebuf.hpp +++ b/stl/inc/__msvc_filebuf.hpp @@ -51,7 +51,7 @@ namespace experimental { // clang-format off template -_INLINE_VAR constexpr bool _Is_any_path = _Is_any_of_v<_Ty +constexpr bool _Is_any_path = _Is_any_of_v<_Ty #if _FSTREAM_SUPPORTS_EXPERIMENTAL_FILESYSTEM , experimental::filesystem::path #endif // _FSTREAM_SUPPORTS_EXPERIMENTAL_FILESYSTEM diff --git a/stl/inc/__msvc_iter_core.hpp b/stl/inc/__msvc_iter_core.hpp index b3fce60040..0595c87184 100644 --- a/stl/inc/__msvc_iter_core.hpp +++ b/stl/inc/__msvc_iter_core.hpp @@ -34,7 +34,7 @@ _EXPORT_STD template struct uses_allocator : _Has_allocator_type<_Ty, _Alloc>::type {}; _EXPORT_STD template -_INLINE_VAR constexpr bool uses_allocator_v = uses_allocator<_Ty, _Alloc>::value; +constexpr bool uses_allocator_v = uses_allocator<_Ty, _Alloc>::value; // from _EXPORT_STD struct input_iterator_tag {}; @@ -386,7 +386,7 @@ struct iterator_traits<_Ty*> { }; template -inline constexpr bool _Integer_class = requires { +constexpr bool _Integer_class = requires { typename _Ty::_Signed_type; typename _Ty::_Unsigned_type; }; @@ -418,7 +418,7 @@ concept sentinel_for = semiregular<_Se> // clang-format on _EXPORT_STD template -inline constexpr bool disable_sized_sentinel_for = false; +constexpr bool disable_sized_sentinel_for = false; // clang-format off _EXPORT_STD template @@ -454,7 +454,7 @@ namespace ranges { _EXPORT_STD using ranges::get; template -inline constexpr bool _Is_subrange_v> = true; +constexpr bool _Is_subrange_v> = true; template struct tuple_size> : integral_constant {}; diff --git a/stl/inc/algorithm b/stl/inc/algorithm index ff1f8b65e3..fc31539d64 100644 --- a/stl/inc/algorithm +++ b/stl/inc/algorithm @@ -185,7 +185,7 @@ _INLINE_VAR constexpr ptrdiff_t _Threshold_find_first_of = 16; // Can we activate the vector algorithms for find_first_of? template -_INLINE_VAR constexpr bool _Vector_alg_in_find_first_of_is_safe = +constexpr bool _Vector_alg_in_find_first_of_is_safe = _Equal_memcmp_is_safe<_It1, _It2, _Pr> // can replace value comparison with bitwise comparison && sizeof(_Iter_value_t<_It1>) <= 2; // pcmpestri compatible size _STD_END @@ -202,7 +202,7 @@ _STD_BEGIN _INLINE_VAR constexpr int _ISORT_MAX = 32; // maximum size for insertion sort template -_INLINE_VAR constexpr _Iter_diff_t<_It> _Isort_max{_ISORT_MAX}; +constexpr _Iter_diff_t<_It> _Isort_max{_ISORT_MAX}; template constexpr ptrdiff_t _Temporary_buffer_size(const _Diff _Value) noexcept { @@ -3516,11 +3516,11 @@ namespace ranges { _EXPORT_STD inline constexpr _Find_first_of_fn find_first_of; template - inline constexpr bool _Is_trivially_ranges_swappable_v = + constexpr bool _Is_trivially_ranges_swappable_v = disjunction_v, negation>>, _Is_trivially_swappable<_Ty>>; template - inline constexpr bool _Is_trivially_ranges_swappable_v<_Ty[_Len]> = _Is_trivially_ranges_swappable_v<_Ty>; + constexpr bool _Is_trivially_ranges_swappable_v<_Ty[_Len]> = _Is_trivially_ranges_swappable_v<_Ty>; template struct _Is_trivially_ranges_swappable : bool_constant<_Is_trivially_ranges_swappable_v<_Ty>> {}; @@ -3948,7 +3948,7 @@ namespace ranges { // TRANSITION, DevCom-10606350: help the compiler auto-vectorize for simple types template > -_INLINE_VAR constexpr bool _Can_vectorize_replace_copy = conjunction_v, is_same<_InTy, _NewTy>, +constexpr bool _Can_vectorize_replace_copy = conjunction_v, is_same<_InTy, _NewTy>, disjunction< #ifdef __cpp_lib_byte conjunction, is_same<_OutTy, byte>>, @@ -4718,7 +4718,7 @@ template #if _HAS_CXX20 concept #else -_INLINE_VAR constexpr bool +constexpr bool #endif _Can_reread_dest = _Is_cpp17_fwd_iter_v<_OutIt> && is_same_v<_Iter_value_t<_InIt>, _Iter_value_t<_OutIt>>; diff --git a/stl/inc/any b/stl/inc/any index 4986245dc3..933a463e60 100644 --- a/stl/inc/any +++ b/stl/inc/any @@ -42,14 +42,14 @@ public: inline constexpr size_t _Any_trivial_space_size = (_Small_object_num_ptrs - 1) * sizeof(void*); template -inline constexpr bool _Any_is_trivial = +constexpr bool _Any_is_trivial = alignof(_Ty) <= alignof(max_align_t) && is_trivially_copyable_v<_Ty> && sizeof(_Ty) <= _Any_trivial_space_size; inline constexpr size_t _Any_small_space_size = (_Small_object_num_ptrs - 2) * sizeof(void*); template -inline constexpr bool _Any_is_small = alignof(_Ty) <= alignof(max_align_t) - && is_nothrow_move_constructible_v<_Ty> && sizeof(_Ty) <= _Any_small_space_size; +constexpr bool _Any_is_small = alignof(_Ty) <= alignof(max_align_t) + && is_nothrow_move_constructible_v<_Ty> && sizeof(_Ty) <= _Any_small_space_size; enum class _Any_representation : uintptr_t { _Trivial, _Big, _Small }; @@ -97,11 +97,10 @@ struct _Any_small_RTTI { // Hand-rolled vtable for nontrivial types that can be }; template -inline constexpr _Any_big_RTTI _Any_big_RTTI_obj = { - &_Any_big_RTTI::_Destroy_impl<_Ty>, &_Any_big_RTTI::_Copy_impl<_Ty>}; +constexpr _Any_big_RTTI _Any_big_RTTI_obj = {&_Any_big_RTTI::_Destroy_impl<_Ty>, &_Any_big_RTTI::_Copy_impl<_Ty>}; template -inline constexpr _Any_small_RTTI _Any_small_RTTI_obj = { +constexpr _Any_small_RTTI _Any_small_RTTI_obj = { &_Any_small_RTTI::_Destroy_impl<_Ty>, &_Any_small_RTTI::_Copy_impl<_Ty>, &_Any_small_RTTI::_Move_impl<_Ty>}; _EXPORT_STD class any { // storage for any (CopyConstructible) type diff --git a/stl/inc/atomic b/stl/inc/atomic index 18d1b3de57..5944c9e5aa 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -330,8 +330,7 @@ struct _Storage_for { #if _CMPXCHG_MASK_OUT_PADDING_BITS template -inline constexpr bool _Might_have_non_value_bits = - !has_unique_object_representations_v<_Ty> && !is_floating_point_v<_Ty>; +constexpr bool _Might_have_non_value_bits = !has_unique_object_representations_v<_Ty> && !is_floating_point_v<_Ty>; #endif // _CMPXCHG_MASK_OUT_PADDING_BITS _EXPORT_STD extern "C" inline void atomic_thread_fence(const memory_order _Order) noexcept { @@ -1648,22 +1647,22 @@ struct _Atomic_integral<_Ty, 8> : _Atomic_storage<_Ty> { // atomic integral oper #if 1 // TRANSITION, ABI template -_INLINE_VAR constexpr bool _Is_always_lock_free = _TypeSize <= 8 && (_TypeSize & (_TypeSize - 1)) == 0; +constexpr bool _Is_always_lock_free = _TypeSize <= 8 && (_TypeSize & (_TypeSize - 1)) == 0; #else // ^^^ don't break ABI / break ABI vvv #if _ATOMIC_HAS_DCAS template -_INLINE_VAR constexpr bool _Is_always_lock_free = _TypeSize <= 2 * sizeof(void*); +constexpr bool _Is_always_lock_free = _TypeSize <= 2 * sizeof(void*); #else // ^^^ _ATOMIC_HAS_DCAS / !_ATOMIC_HAS_DCAS vvv template -_INLINE_VAR constexpr bool _Is_always_lock_free = _TypeSize <= sizeof(void*); +constexpr bool _Is_always_lock_free = _TypeSize <= sizeof(void*); #endif // ^^^ !_ATOMIC_HAS_DCAS ^^^ #endif // ^^^ break ABI ^^^ template > -_INLINE_VAR constexpr bool _Deprecate_non_lock_free_volatile = true; +constexpr bool _Deprecate_non_lock_free_volatile = true; template -_CXX20_DEPRECATE_VOLATILE _INLINE_VAR constexpr bool _Deprecate_non_lock_free_volatile<_Ty, false> = true; +_CXX20_DEPRECATE_VOLATILE constexpr bool _Deprecate_non_lock_free_volatile<_Ty, false> = true; template struct _Atomic_integral_facade : _Atomic_integral<_Ty> { diff --git a/stl/inc/chrono b/stl/inc/chrono index 0b55b90c39..3a94bdeca6 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -1543,7 +1543,7 @@ namespace chrono { } template - inline constexpr bool + constexpr bool _Duration_underflows_with = !treat_as_floating_point_v && _From::period::den / _Gcd(_From::period::den, _To::period::den) > INTMAX_MAX / (_To::period::num / _Gcd(_From::period::num, _To::period::num)); @@ -2872,10 +2872,10 @@ namespace chrono { // [time.clock.cast.sys] template - inline constexpr bool _Is_time_point_for_clock = false; + constexpr bool _Is_time_point_for_clock = false; template - inline constexpr bool _Is_time_point_for_clock, _Clock> = true; + constexpr bool _Is_time_point_for_clock, _Clock> = true; template struct clock_time_conversion { @@ -2947,17 +2947,17 @@ namespace chrono { }; template - inline constexpr bool _Has_two_step_conversion = false; + constexpr bool _Has_two_step_conversion = false; template - inline constexpr bool + constexpr bool _Has_two_step_conversion<_Conv1, _Conv2, _Tp, void_t())))>> = true; template - inline constexpr bool _Has_three_step_conversion = false; + constexpr bool _Has_three_step_conversion = false; template - inline constexpr bool _Has_three_step_conversion<_Conv1, _Conv2, _Conv3, _Tp, + constexpr bool _Has_three_step_conversion<_Conv1, _Conv2, _Conv3, _Tp, void_t()))))>> = true; template @@ -3004,7 +3004,7 @@ namespace chrono { } template - inline constexpr auto _Clock_cast_choice = _Choose_clock_cast<_DestClock, _SourceClock, _Duration>(); + constexpr auto _Clock_cast_choice = _Choose_clock_cast<_DestClock, _SourceClock, _Duration>(); _EXPORT_STD template != _Clock_cast_strategy::_None, int> = 0> diff --git a/stl/inc/compare b/stl/inc/compare index fb4a2aadb7..59fe0561f4 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -268,7 +268,7 @@ enum _Comparison_category : unsigned char { }; template -inline constexpr unsigned char _Classify_category = +constexpr unsigned char _Classify_category = _Comparison_category{(_Classify_category<_Types> | ... | _Comparison_category_strong)}; template inline constexpr unsigned char _Classify_category<_Ty> = _Comparison_category_none; diff --git a/stl/inc/complex b/stl/inc/complex index dfae9d8f5c..28c14468ca 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -213,7 +213,7 @@ namespace _Math_algorithms { static constexpr float value{9.2233715e+18f}; }; template - _INLINE_VAR constexpr _Ty _Hypot_leg_huge = _Hypot_leg_huge_helper<_Ty>::value; + constexpr _Ty _Hypot_leg_huge = _Hypot_leg_huge_helper<_Ty>::value; template struct _Hypot_leg_tiny_helper { @@ -224,7 +224,7 @@ namespace _Math_algorithms { static constexpr float value{4.440892e-16f}; }; template - _INLINE_VAR constexpr _Ty _Hypot_leg_tiny = _Hypot_leg_tiny_helper<_Ty>::value; + constexpr _Ty _Hypot_leg_tiny = _Hypot_leg_tiny_helper<_Ty>::value; template _NODISCARD _Ty _Norm_minus_one(const _Ty _Xval, const _Ty _Yval) noexcept { @@ -912,7 +912,7 @@ public: }; template -_INLINE_VAR constexpr bool _Is_unqual_fp = _Is_any_of_v<_Ty, float, double, long double>; +constexpr bool _Is_unqual_fp = _Is_any_of_v<_Ty, float, double, long double>; template struct _Complex_value { diff --git a/stl/inc/execution b/stl/inc/execution index b55ad69e93..28bd701154 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -384,7 +384,7 @@ struct _Atomic_is_usually_lock_free : bool_constant::is_always_lock_ }; template -inline constexpr bool _Use_atomic_iterator = conjunction_v>, +constexpr bool _Use_atomic_iterator = conjunction_v>, is_trivially_copyable<_FwdIt>, _Atomic_is_usually_lock_free<_FwdIt>>; template diff --git a/stl/inc/filesystem b/stl/inc/filesystem index 2be3868304..c223967fc3 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -162,14 +162,14 @@ namespace filesystem { } template - inline constexpr bool _Is_Source_impl = false; + constexpr bool _Is_Source_impl = false; template - inline constexpr bool _Is_Source_impl<_Ty, void_t::value_type>> = + constexpr bool _Is_Source_impl<_Ty, void_t::value_type>> = _Is_EcharT::value_type>; template - inline constexpr bool _Is_Source = _Is_Source_impl>; + constexpr bool _Is_Source = _Is_Source_impl>; _EXPORT_STD class path; @@ -178,10 +178,10 @@ namespace filesystem { // iterator_traits when determining if path is copyable. template - inline constexpr bool _Is_Source> = _Is_EcharT<_Elem>; + constexpr bool _Is_Source> = _Is_EcharT<_Elem>; template - inline constexpr bool _Is_Source> = _Is_EcharT<_Elem>; + constexpr bool _Is_Source> = _Is_EcharT<_Elem>; struct _Normal_conversion {}; diff --git a/stl/inc/format b/stl/inc/format index 9e5d6cdc05..00c0aa1e2f 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -667,13 +667,13 @@ concept _Formattable_with_non_const = semiregular<_Formatter> }; template -inline constexpr bool _Is_basic_string_like_for = false; +constexpr bool _Is_basic_string_like_for = false; template -inline constexpr bool _Is_basic_string_like_for, _CharT> = true; +constexpr bool _Is_basic_string_like_for, _CharT> = true; template -inline constexpr bool _Is_basic_string_like_for, _CharT> = true; +constexpr bool _Is_basic_string_like_for, _CharT> = true; template struct _Format_arg_traits { @@ -1612,7 +1612,7 @@ _NODISCARD constexpr basic_format_arg<_Context> _Get_arg(const _Context& _Ctx, c } template -inline constexpr bool _Is_signed_or_unsigned_large_integer_t = +constexpr bool _Is_signed_or_unsigned_large_integer_t = _Is_any_of_v, int, unsigned int, long, unsigned long, long long, unsigned long long>; // Checks that the type and value of an argument associated with a dynamic @@ -2464,20 +2464,20 @@ struct _Invalid_format_kind { }; _EXPORT_STD template -inline constexpr _Invalid_format_kind<_Ty> format_kind; +constexpr _Invalid_format_kind<_Ty> format_kind; template -inline constexpr bool _Is_two_tuple = false; +constexpr bool _Is_two_tuple = false; template -inline constexpr bool _Is_two_tuple> = true; +constexpr bool _Is_two_tuple> = true; template -inline constexpr bool _Is_two_tuple> = true; +constexpr bool _Is_two_tuple> = true; template <_RANGES input_range _Rng> requires same_as<_Rng, remove_cvref_t<_Rng>> -inline constexpr range_format format_kind<_Rng> = []() consteval { +constexpr range_format format_kind<_Rng> = []() consteval { using _Ref_value_t = remove_cvref_t<_RANGES range_reference_t<_Rng>>; if constexpr (same_as<_Ref_value_t, _Rng>) { return range_format::disabled; diff --git a/stl/inc/functional b/stl/inc/functional index f34e81d36e..a9b23ab633 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -706,7 +706,7 @@ _EXPORT_STD template class function; template -_INLINE_VAR constexpr bool _Testable_callable_v = +constexpr bool _Testable_callable_v = disjunction_v, _Is_specialization<_Ty, function>, is_member_pointer<_Ty>>; template @@ -745,8 +745,8 @@ private: _INLINE_VAR constexpr size_t _Space_size = (_Small_object_num_ptrs - 1) * sizeof(void*); template // determine whether _Impl must be dynamically allocated -_INLINE_VAR constexpr bool _Is_large = sizeof(_Impl) > _Space_size || alignof(_Impl) > alignof(max_align_t) - || !_Impl::_Nothrow_move::value; +constexpr bool _Is_large = sizeof(_Impl) > _Space_size || alignof(_Impl) > alignof(max_align_t) + || !_Impl::_Nothrow_move::value; #if _HAS_FUNCTION_ALLOCATOR_SUPPORT template @@ -1391,7 +1391,7 @@ void __stdcall _Function_destroy_large(_Move_only_function_data& _Self) noexcept } template -inline constexpr size_t _Function_small_copy_size = // We copy Impl* and the functor data at once +constexpr size_t _Function_small_copy_size = // We copy Impl* and the functor data at once _Move_only_function_data::_Buf_offset<_Vt> // Impl* plus possible alignment + (size_t{sizeof(_Vt) + sizeof(void*) - 1} & ~size_t{sizeof(void*) - 1}); // size in whole pointers @@ -1972,7 +1972,7 @@ template struct is_placeholder : is_placeholder<_Tx>::type {}; // ignore cv-qualifiers _EXPORT_STD template -_INLINE_VAR constexpr int is_placeholder_v = is_placeholder<_Ty>::value; +constexpr int is_placeholder_v = is_placeholder<_Ty>::value; template class _Binder; @@ -1993,7 +1993,7 @@ template struct is_bind_expression : is_bind_expression<_Tx>::type {}; // ignore cv-qualifiers _EXPORT_STD template -_INLINE_VAR constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value; +constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value; template , reference_wrapper>, bool = is_bind_expression_v<_Cv_TiD>, int = is_placeholder_v<_Cv_TiD>> @@ -2102,10 +2102,10 @@ concept _Can_call_binder = requires(_CvFD& _Fx, _CvBoundTuple& _Bound_tuple, _Un }; #else // ^^^ concept available / concept unavailable vvv template -_INLINE_VAR constexpr bool _Can_call_binder = false; +constexpr bool _Can_call_binder = false; template -_INLINE_VAR constexpr bool _Can_call_binder<_Ret, _CvFD, _IntSeq, _CvBoundTuple, _UnboundTuple, +constexpr bool _Can_call_binder<_Ret, _CvFD, _IntSeq, _CvBoundTuple, _UnboundTuple, void_t{}, _IntSeq{}, _STD declval<_CvFD&>(), _STD declval<_CvBoundTuple&>(), _STD declval<_UnboundTuple>()))>> = true; #endif // ^^^ concept unavailable ^^^ diff --git a/stl/inc/mdspan b/stl/inc/mdspan index 601c0b3874..551f60b493 100644 --- a/stl/inc/mdspan +++ b/stl/inc/mdspan @@ -37,7 +37,7 @@ template struct _Maybe_empty_array<_IndexType, 0> {}; template -inline constexpr size_t _Calculate_rank_dynamic = (static_cast(_Extents == dynamic_extent) + ... + 0); +constexpr size_t _Calculate_rank_dynamic = (static_cast(_Extents == dynamic_extent) + ... + 0); struct _Extents_from_tuple { explicit _Extents_from_tuple() = default; @@ -315,7 +315,7 @@ public: }; template -inline constexpr size_t _Repeat_dynamic_extent = dynamic_extent; +constexpr size_t _Repeat_dynamic_extent = dynamic_extent; template requires (is_convertible_v<_Integrals, size_t> && ...) @@ -333,10 +333,10 @@ _EXPORT_STD template using dextents = _Dextents_impl<_IndexType, make_index_sequence<_Rank>>::type; template -inline constexpr bool _Is_extents = false; +constexpr bool _Is_extents = false; template -inline constexpr bool _Is_extents> = true; +constexpr bool _Is_extents> = true; template class _Fwd_prod_of_extents { @@ -425,7 +425,7 @@ public: }; template -inline constexpr bool _Is_mapping_of = +constexpr bool _Is_mapping_of = is_same_v, _Mapping>; _EXPORT_STD struct layout_left { diff --git a/stl/inc/numbers b/stl/inc/numbers index db2ec33f79..e82ab5f8a7 100644 --- a/stl/inc/numbers +++ b/stl/inc/numbers @@ -28,58 +28,58 @@ namespace numbers { }; _EXPORT_STD template - inline constexpr _Ty e_v = _Invalid<_Ty>{}; + constexpr _Ty e_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty log2e_v = _Invalid<_Ty>{}; + constexpr _Ty log2e_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty log10e_v = _Invalid<_Ty>{}; + constexpr _Ty log10e_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty pi_v = _Invalid<_Ty>{}; + constexpr _Ty pi_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty inv_pi_v = _Invalid<_Ty>{}; + constexpr _Ty inv_pi_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty inv_sqrtpi_v = _Invalid<_Ty>{}; + constexpr _Ty inv_sqrtpi_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty ln2_v = _Invalid<_Ty>{}; + constexpr _Ty ln2_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty ln10_v = _Invalid<_Ty>{}; + constexpr _Ty ln10_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty sqrt2_v = _Invalid<_Ty>{}; + constexpr _Ty sqrt2_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty sqrt3_v = _Invalid<_Ty>{}; + constexpr _Ty sqrt3_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty inv_sqrt3_v = _Invalid<_Ty>{}; + constexpr _Ty inv_sqrt3_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty egamma_v = _Invalid<_Ty>{}; + constexpr _Ty egamma_v = _Invalid<_Ty>{}; _EXPORT_STD template - inline constexpr _Ty phi_v = _Invalid<_Ty>{}; + constexpr _Ty phi_v = _Invalid<_Ty>{}; template - inline constexpr _Floating e_v<_Floating> = static_cast<_Floating>(2.718281828459045); + constexpr _Floating e_v<_Floating> = static_cast<_Floating>(2.718281828459045); template - inline constexpr _Floating log2e_v<_Floating> = static_cast<_Floating>(1.4426950408889634); + constexpr _Floating log2e_v<_Floating> = static_cast<_Floating>(1.4426950408889634); template - inline constexpr _Floating log10e_v<_Floating> = static_cast<_Floating>(0.4342944819032518); + constexpr _Floating log10e_v<_Floating> = static_cast<_Floating>(0.4342944819032518); template - inline constexpr _Floating pi_v<_Floating> = static_cast<_Floating>(3.141592653589793); + constexpr _Floating pi_v<_Floating> = static_cast<_Floating>(3.141592653589793); template - inline constexpr _Floating inv_pi_v<_Floating> = static_cast<_Floating>(0.3183098861837907); + constexpr _Floating inv_pi_v<_Floating> = static_cast<_Floating>(0.3183098861837907); template - inline constexpr _Floating inv_sqrtpi_v<_Floating> = static_cast<_Floating>(0.5641895835477563); + constexpr _Floating inv_sqrtpi_v<_Floating> = static_cast<_Floating>(0.5641895835477563); template - inline constexpr _Floating ln2_v<_Floating> = static_cast<_Floating>(0.6931471805599453); + constexpr _Floating ln2_v<_Floating> = static_cast<_Floating>(0.6931471805599453); template - inline constexpr _Floating ln10_v<_Floating> = static_cast<_Floating>(2.302585092994046); + constexpr _Floating ln10_v<_Floating> = static_cast<_Floating>(2.302585092994046); template - inline constexpr _Floating sqrt2_v<_Floating> = static_cast<_Floating>(1.4142135623730951); + constexpr _Floating sqrt2_v<_Floating> = static_cast<_Floating>(1.4142135623730951); template - inline constexpr _Floating sqrt3_v<_Floating> = static_cast<_Floating>(1.7320508075688772); + constexpr _Floating sqrt3_v<_Floating> = static_cast<_Floating>(1.7320508075688772); template - inline constexpr _Floating inv_sqrt3_v<_Floating> = static_cast<_Floating>(0.5773502691896257); + constexpr _Floating inv_sqrt3_v<_Floating> = static_cast<_Floating>(0.5773502691896257); template - inline constexpr _Floating egamma_v<_Floating> = static_cast<_Floating>(0.5772156649015329); + constexpr _Floating egamma_v<_Floating> = static_cast<_Floating>(0.5772156649015329); template - inline constexpr _Floating phi_v<_Floating> = static_cast<_Floating>(1.618033988749895); + constexpr _Floating phi_v<_Floating> = static_cast<_Floating>(1.618033988749895); _EXPORT_STD inline constexpr double e = e_v; _EXPORT_STD inline constexpr double log2e = log2e_v; diff --git a/stl/inc/numeric b/stl/inc/numeric index ffe819a36e..6bad9695f3 100644 --- a/stl/inc/numeric +++ b/stl/inc/numeric @@ -49,7 +49,7 @@ _NODISCARD _CONSTEXPR20 _Ty accumulate(const _InIt _First, const _InIt _Last, _T #if _HAS_CXX17 #if _STD_VECTORIZE_WITH_FLOAT_CONTROL template -inline constexpr bool _Plus_on_arithmetic_ranges_reduction_v = +constexpr bool _Plus_on_arithmetic_ranges_reduction_v = conjunction_v, is_arithmetic>, is_same, _BinOp>>; #pragma float_control(precise, off, push) @@ -150,7 +150,7 @@ _NODISCARD _CONSTEXPR20 _Ty inner_product(const _InIt1 _First1, const _InIt1 _La #if _HAS_CXX17 #if _STD_VECTORIZE_WITH_FLOAT_CONTROL template -inline constexpr bool _Default_ops_transform_reduce_v = +constexpr bool _Default_ops_transform_reduce_v = conjunction_v, is_arithmetic>, is_arithmetic>, is_same, _BinOp1>, is_same, _BinOp2>>; @@ -646,7 +646,7 @@ _NODISCARD constexpr common_type_t<_Mt, _Nt> lcm(const _Mt _Mx, const _Nt _Nx) n #if _HAS_CXX20 template -inline constexpr _Flt _Floating_max{}; +constexpr _Flt _Floating_max{}; template <> inline constexpr float _Floating_max = FLT_MAX; template <> @@ -655,7 +655,7 @@ template <> inline constexpr long double _Floating_max = LDBL_MAX; template -inline constexpr _Flt _Floating_min{}; +constexpr _Flt _Floating_min{}; template <> inline constexpr float _Floating_min = FLT_MIN; template <> diff --git a/stl/inc/ranges b/stl/inc/ranges index 37e9db9282..674475422b 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -35,7 +35,7 @@ namespace ranges { // MUCH machinery defined in template - inline constexpr bool _Is_initializer_list = _Is_specialization_v, initializer_list>; + constexpr bool _Is_initializer_list = _Is_specialization_v, initializer_list>; template // _Require_constant is a valid template-id iff E is a constant expression of structural type struct _Require_constant; @@ -51,40 +51,39 @@ namespace ranges { using range_const_reference_t = iter_const_reference_t>; template - inline constexpr auto _Compile_time_max_size = - (numeric_limits<_Make_unsigned_like_t>>::max)(); + constexpr auto _Compile_time_max_size = (numeric_limits<_Make_unsigned_like_t>>::max)(); template - inline constexpr auto _Compile_time_max_size<_Ty> = (numeric_limits>::max)(); + constexpr auto _Compile_time_max_size<_Ty> = (numeric_limits>::max)(); #ifdef __EDG__ // TRANSITION, VSO-1898880 template concept _Constant_sized_range = sized_range<_Ty> && requires { typename _Require_constant<_Ty::size()>; }; template <_Constant_sized_range _Ty> - inline constexpr auto _Compile_time_max_size<_Ty> = _Ty::size(); + constexpr auto _Compile_time_max_size<_Ty> = _Ty::size(); #else // ^^^ workaround / no workaround vvv template requires requires { typename _Require_constant<_Ty::size()>; } - inline constexpr auto _Compile_time_max_size<_Ty> = _Ty::size(); + constexpr auto _Compile_time_max_size<_Ty> = _Ty::size(); #endif // ^^^ no workaround ^^^ template - inline constexpr auto _Compile_time_max_size<_Ty[_Size]> = _Size; + constexpr auto _Compile_time_max_size<_Ty[_Size]> = _Size; template - inline constexpr auto _Compile_time_max_size> = _Size; + constexpr auto _Compile_time_max_size> = _Size; template - inline constexpr auto _Compile_time_max_size> = _Size; + constexpr auto _Compile_time_max_size> = _Size; template requires (_Extent != dynamic_extent) - inline constexpr auto _Compile_time_max_size> = _Extent; + constexpr auto _Compile_time_max_size> = _Extent; template requires (_Extent != dynamic_extent) - inline constexpr auto _Compile_time_max_size> = _Extent; + constexpr auto _Compile_time_max_size> = _Extent; #endif // _HAS_CXX23 // clang-format off @@ -991,11 +990,11 @@ namespace ranges { }; template - inline constexpr bool enable_borrowed_range> = true; + constexpr bool enable_borrowed_range> = true; namespace views { _EXPORT_STD template - inline constexpr empty_view<_Ty> empty; + constexpr empty_view<_Ty> empty; } // namespace views _EXPORT_STD template <_Valid_movable_box_object _Ty> @@ -1444,7 +1443,7 @@ namespace ranges { // clang-format on template - inline constexpr bool enable_borrowed_range> = true; + constexpr bool enable_borrowed_range> = true; namespace views { struct _Iota_fn { @@ -1825,7 +1824,7 @@ namespace ranges { }; _EXPORT_STD template - inline constexpr _Istream_fn<_Ty> istream; + constexpr _Istream_fn<_Ty> istream; } // namespace views _EXPORT_STD template @@ -1883,14 +1882,14 @@ namespace ranges { ref_view(_Rng&) -> ref_view<_Rng>; template - inline constexpr bool enable_borrowed_range> = true; + constexpr bool enable_borrowed_range> = true; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; #endif // _HAS_CXX23 _EXPORT_STD template @@ -1978,14 +1977,14 @@ namespace ranges { }; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -2122,14 +2121,14 @@ namespace ranges { as_rvalue_view(_Rng&&) -> as_rvalue_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -2411,7 +2410,7 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; #endif // _HAS_CXX23 namespace views { @@ -2837,10 +2836,10 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -3048,14 +3047,14 @@ namespace ranges { take_view(_Rng&&, range_difference_t<_Rng>) -> take_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -3297,10 +3296,10 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -3448,14 +3447,14 @@ namespace ranges { drop_view(_Rng&&, range_difference_t<_Rng>) -> drop_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -3621,11 +3620,11 @@ namespace ranges { drop_while_view(_Rng&&, _Pr) -> drop_while_view, _Pr>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; #endif // _HAS_CXX23 namespace views { @@ -4052,11 +4051,10 @@ namespace ranges { } template - inline constexpr auto _Compile_time_max_size> = _Join_view_compile_time_max_size<_Rng>(); + constexpr auto _Compile_time_max_size> = _Join_view_compile_time_max_size<_Rng>(); template - inline constexpr auto _Compile_time_max_size> = - _Join_view_compile_time_max_size(); + constexpr auto _Compile_time_max_size> = _Join_view_compile_time_max_size(); #endif // _HAS_CXX23 namespace views { @@ -4585,11 +4583,11 @@ namespace ranges { } template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Join_with_view_compile_time_max_size<_Rng, _Pat>(); template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Join_with_view_compile_time_max_size(); #endif // _HAS_CXX23 @@ -5005,11 +5003,10 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = - _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -5195,7 +5192,7 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; #endif // _HAS_CXX23 namespace views { @@ -5347,14 +5344,14 @@ namespace ranges { common_view(_Rng&&) -> common_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -5475,14 +5472,14 @@ namespace ranges { reverse_view(_Rng&&) -> reverse_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -5621,14 +5618,14 @@ namespace ranges { as_const_view(_Rng&&) -> as_const_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -6088,15 +6085,14 @@ namespace ranges { }; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = - _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 _EXPORT_STD template @@ -6118,7 +6114,7 @@ namespace ranges { }; _EXPORT_STD template - inline constexpr _Elements_fn<_Index> elements; + constexpr _Elements_fn<_Index> elements; _EXPORT_STD inline constexpr auto keys = elements<0>; _EXPORT_STD inline constexpr auto values = elements<1>; } // namespace views @@ -6439,14 +6435,14 @@ namespace ranges { enumerate_view(_Rng&&) -> enumerate_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -7038,15 +7034,15 @@ namespace ranges { chunk_view(_Rng&&, range_difference_t<_Rng>) -> chunk_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Vw> && forward_range<_Vw>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Vw> && forward_range<_Vw>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template requires forward_range<_Rng> - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -7438,14 +7434,14 @@ namespace ranges { slide_view(_Rng&&, range_difference_t<_Rng>) -> slide_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Vw>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Vw>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -7648,7 +7644,7 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; #endif // _HAS_CXX23 namespace views { @@ -8036,14 +8032,14 @@ namespace ranges { stride_view(_Rng&&, range_difference_t<_Rng>) -> stride_view>; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Vw>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Vw>; #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size<_Rng>; template - inline constexpr auto _Compile_time_max_size> = _Compile_time_max_size; + constexpr auto _Compile_time_max_size> = _Compile_time_max_size; #endif // _HAS_CXX23 namespace views { @@ -8542,7 +8538,7 @@ namespace ranges { zip_view(_RangeTypes&&...) -> zip_view...>; template - inline constexpr bool enable_borrowed_range> = (enable_borrowed_range<_ViewTypes> && ...); + constexpr bool enable_borrowed_range> = (enable_borrowed_range<_ViewTypes> && ...); #if _HAS_CXX23 template @@ -8552,11 +8548,10 @@ namespace ranges { } template - inline constexpr auto _Compile_time_max_size> = _Zip_view_compile_time_max_size<_Rngs...>(); + constexpr auto _Compile_time_max_size> = _Zip_view_compile_time_max_size<_Rngs...>(); template - inline constexpr auto _Compile_time_max_size> = - _Zip_view_compile_time_max_size(); + constexpr auto _Compile_time_max_size> = _Zip_view_compile_time_max_size(); #endif // _HAS_CXX23 namespace views { @@ -8899,11 +8894,11 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Compile_time_max_size>; template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Compile_time_max_size>; #endif // _HAS_CXX23 @@ -8970,10 +8965,10 @@ namespace ranges { using _Repeated_tuple = _Repeated_tuple_impl<_Ty, make_index_sequence<_Nx>>::type; template - inline constexpr bool _Regular_invocable_with_repeated_type_impl = false; + constexpr bool _Regular_invocable_with_repeated_type_impl = false; template - inline constexpr bool _Regular_invocable_with_repeated_type_impl<_Fn, _Ty, index_sequence<_Indices...>> = + constexpr bool _Regular_invocable_with_repeated_type_impl<_Fn, _Ty, index_sequence<_Indices...>> = regular_invocable<_Fn, _Repeat_type<_Ty, _Indices>...>; template @@ -9373,7 +9368,7 @@ namespace ranges { }; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; + constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; #if _HAS_CXX23 template @@ -9385,11 +9380,10 @@ namespace ranges { } template - inline constexpr auto _Compile_time_max_size> = - _Adjacent_view_compile_time_max_size<_Rng, _Nx>(); + constexpr auto _Compile_time_max_size> = _Adjacent_view_compile_time_max_size<_Rng, _Nx>(); template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Adjacent_view_compile_time_max_size(); #endif // _HAS_CXX23 @@ -9414,7 +9408,7 @@ namespace ranges { }; _EXPORT_STD template - inline constexpr _Adjacent_fn<_Nx> adjacent; + constexpr _Adjacent_fn<_Nx> adjacent; _EXPORT_STD inline constexpr _Adjacent_fn<2> pairwise; } // namespace views @@ -9730,11 +9724,11 @@ namespace ranges { #if _HAS_CXX23 template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Compile_time_max_size>; template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Compile_time_max_size>; #endif // _HAS_CXX23 @@ -9772,7 +9766,7 @@ namespace ranges { }; _EXPORT_STD template - inline constexpr _Adjacent_transform_fn<_Nx> adjacent_transform; + constexpr _Adjacent_transform_fn<_Nx> adjacent_transform; _EXPORT_STD inline constexpr _Adjacent_transform_fn<2> pairwise_transform; } // namespace views @@ -10273,11 +10267,11 @@ namespace ranges { } template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Cartesian_product_view_compile_time_max_size<_Rngs...>(); template - inline constexpr auto _Compile_time_max_size> = + constexpr auto _Compile_time_max_size> = _Cartesian_product_view_compile_time_max_size(); #endif // _HAS_CXX23 diff --git a/stl/inc/ratio b/stl/inc/ratio index 429a2b9f3e..ea8ecdf749 100644 --- a/stl/inc/ratio +++ b/stl/inc/ratio @@ -76,10 +76,10 @@ struct ratio { // holds the ratio of _Nx to _Dx }; template -_INLINE_VAR constexpr bool _Is_ratio_v = false; // test for ratio type +constexpr bool _Is_ratio_v = false; // test for ratio type template -_INLINE_VAR constexpr bool _Is_ratio_v> = true; +constexpr bool _Is_ratio_v> = true; template struct _Ratio_add { // add two ratios @@ -167,7 +167,7 @@ struct ratio_equal : bool_constant<_Rx1::num == _Rx2::num && _Rx1::den == _Rx2:: }; _EXPORT_STD template -_INLINE_VAR constexpr bool ratio_equal_v = ratio_equal<_Rx1, _Rx2>::value; +constexpr bool ratio_equal_v = ratio_equal<_Rx1, _Rx2>::value; _EXPORT_STD template struct ratio_not_equal : bool_constant> { // tests if ratio != ratio @@ -175,7 +175,7 @@ struct ratio_not_equal : bool_constant> { // tests if }; _EXPORT_STD template -_INLINE_VAR constexpr bool ratio_not_equal_v = ratio_not_equal<_Rx1, _Rx2>::value; +constexpr bool ratio_not_equal_v = ratio_not_equal<_Rx1, _Rx2>::value; struct _Big_uint128 { uint64_t _Upper; @@ -231,7 +231,7 @@ struct ratio_less : bool_constant<_Ratio_less(_Rx1::num, _Rx1::den, _Rx2::num, _ }; _EXPORT_STD template -_INLINE_VAR constexpr bool ratio_less_v = ratio_less<_Rx1, _Rx2>::value; +constexpr bool ratio_less_v = ratio_less<_Rx1, _Rx2>::value; _EXPORT_STD template struct ratio_less_equal : bool_constant> { // tests if ratio <= ratio @@ -240,7 +240,7 @@ struct ratio_less_equal : bool_constant> { // tests if }; _EXPORT_STD template -_INLINE_VAR constexpr bool ratio_less_equal_v = ratio_less_equal<_Rx1, _Rx2>::value; +constexpr bool ratio_less_equal_v = ratio_less_equal<_Rx1, _Rx2>::value; _EXPORT_STD template struct ratio_greater : ratio_less<_Rx2, _Rx1>::type { // tests if ratio > ratio @@ -248,7 +248,7 @@ struct ratio_greater : ratio_less<_Rx2, _Rx1>::type { // tests if ratio > ratio }; _EXPORT_STD template -_INLINE_VAR constexpr bool ratio_greater_v = ratio_greater<_Rx1, _Rx2>::value; +constexpr bool ratio_greater_v = ratio_greater<_Rx1, _Rx2>::value; _EXPORT_STD template struct ratio_greater_equal : bool_constant> { // tests if ratio >= ratio @@ -257,7 +257,7 @@ struct ratio_greater_equal : bool_constant> { // tests }; _EXPORT_STD template -_INLINE_VAR constexpr bool ratio_greater_equal_v = ratio_greater_equal<_Rx1, _Rx2>::value; +constexpr bool ratio_greater_equal_v = ratio_greater_equal<_Rx1, _Rx2>::value; _EXPORT_STD using atto = ratio<1, 1000000000000000000LL>; _EXPORT_STD using femto = ratio<1, 1000000000000000LL>; diff --git a/stl/inc/regex b/stl/inc/regex index b9956592e0..426b4a9946 100644 --- a/stl/inc/regex +++ b/stl/inc/regex @@ -196,7 +196,7 @@ struct _Char_traits_lt { // library-provided char_traits::eq behaves like equal_to<_Elem> // TRANSITION: This should not be activated for user-defined specializations of char_traits template -_INLINE_VAR constexpr bool _Can_memcmp_elements_with_pred<_Elem, _Elem, _Char_traits_eq>> = +constexpr bool _Can_memcmp_elements_with_pred<_Elem, _Elem, _Char_traits_eq>> = _Can_memcmp_elements<_Elem, _Elem>; // library-provided char_traits::lt behaves like less> diff --git a/stl/inc/span b/stl/inc/span index fe47c3e2d7..fe1e98744b 100644 --- a/stl/inc/span +++ b/stl/inc/span @@ -224,16 +224,16 @@ class span; namespace ranges { template - inline constexpr bool enable_view> = true; + constexpr bool enable_view> = true; template - inline constexpr bool enable_borrowed_range> = true; + constexpr bool enable_borrowed_range> = true; } // namespace ranges template -inline constexpr bool _Is_span_v = false; +constexpr bool _Is_span_v = false; template -inline constexpr bool _Is_span_v> = true; +constexpr bool _Is_span_v> = true; // clang-format off template diff --git a/stl/inc/system_error b/stl/inc/system_error index e422b47356..b8697d328c 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -46,7 +46,7 @@ template <> struct is_error_code_enum : true_type {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_error_code_enum_v = is_error_code_enum<_Ty>::value; +constexpr bool is_error_code_enum_v = is_error_code_enum<_Ty>::value; _EXPORT_STD template struct is_error_condition_enum : false_type {}; @@ -55,7 +55,7 @@ template <> struct is_error_condition_enum : true_type {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Ty>::value; +constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Ty>::value; _EXPORT_STD class error_code; _EXPORT_STD class error_condition; diff --git a/stl/inc/tuple b/stl/inc/tuple index 66edcc2087..0d0cdb8f70 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -22,76 +22,75 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN template -_INLINE_VAR constexpr bool _Tuple_conditional_explicit_v0 = false; +constexpr bool _Tuple_conditional_explicit_v0 = false; template -_INLINE_VAR constexpr bool _Tuple_conditional_explicit_v0, _Srcs...> = +constexpr bool _Tuple_conditional_explicit_v0, _Srcs...> = !conjunction_v...>; template -_INLINE_VAR constexpr bool _Tuple_conditional_explicit_v = +constexpr bool _Tuple_conditional_explicit_v = _Tuple_conditional_explicit_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; template -_INLINE_VAR constexpr bool _Tuple_constructible_v0 = false; +constexpr bool _Tuple_constructible_v0 = false; template -_INLINE_VAR constexpr bool _Tuple_constructible_v0, _Srcs...> = +constexpr bool _Tuple_constructible_v0, _Srcs...> = conjunction_v...>; template -_INLINE_VAR constexpr bool _Tuple_constructible_v = +constexpr bool _Tuple_constructible_v = _Tuple_constructible_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; template struct _Tuple_constructible_val : bool_constant<_Tuple_constructible_v<_Dest, _Srcs...>> {}; template -_INLINE_VAR constexpr bool _Tuple_nothrow_constructible_v0 = false; +constexpr bool _Tuple_nothrow_constructible_v0 = false; template -_INLINE_VAR constexpr bool _Tuple_nothrow_constructible_v0, _Srcs...> = +constexpr bool _Tuple_nothrow_constructible_v0, _Srcs...> = conjunction_v...>; template -_INLINE_VAR constexpr bool _Tuple_nothrow_constructible_v = +constexpr bool _Tuple_nothrow_constructible_v = _Tuple_nothrow_constructible_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; template -_INLINE_VAR constexpr bool _Tuple_assignable_v0 = false; +constexpr bool _Tuple_assignable_v0 = false; template -_INLINE_VAR constexpr bool _Tuple_assignable_v0, _Srcs...> = +constexpr bool _Tuple_assignable_v0, _Srcs...> = conjunction_v...>; // note _Dests& instead of _Dests #if _HAS_CXX23 template -inline constexpr bool _Tuple_assignable_v0, _Srcs...> = +constexpr bool _Tuple_assignable_v0, _Srcs...> = conjunction_v...>; #endif // _HAS_CXX23 template -_INLINE_VAR constexpr bool _Tuple_assignable_v = - _Tuple_assignable_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; +constexpr bool _Tuple_assignable_v = _Tuple_assignable_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; template struct _Tuple_assignable_val : bool_constant<_Tuple_assignable_v<_Dest, _Srcs...>> {}; template -_INLINE_VAR constexpr bool _Tuple_nothrow_assignable_v0 = false; +constexpr bool _Tuple_nothrow_assignable_v0 = false; template -_INLINE_VAR constexpr bool _Tuple_nothrow_assignable_v0, _Srcs...> = +constexpr bool _Tuple_nothrow_assignable_v0, _Srcs...> = conjunction_v...>; // note _Dests& instead of _Dests #if _HAS_CXX23 template -inline constexpr bool _Tuple_nothrow_assignable_v0, _Srcs...> = +constexpr bool _Tuple_nothrow_assignable_v0, _Srcs...> = conjunction_v...>; #endif // _HAS_CXX23 template -_INLINE_VAR constexpr bool _Tuple_nothrow_assignable_v = +constexpr bool _Tuple_nothrow_assignable_v = _Tuple_nothrow_assignable_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; // Constrain tuple's converting constructors @@ -180,10 +179,10 @@ struct _Alloc_unpack_tuple_t { #if _HAS_CXX23 template >> -inline constexpr bool _Can_construct_values_from_tuple_like_v = false; +constexpr bool _Can_construct_values_from_tuple_like_v = false; template -inline constexpr bool _Can_construct_values_from_tuple_like_v, _Other, index_sequence<_Indices...>> = +constexpr bool _Can_construct_values_from_tuple_like_v, _Other, index_sequence<_Indices...>> = conjunction_v(_STD declval<_Other>()))>...>; #if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-59827 and VSO-1900279 @@ -1080,9 +1079,9 @@ constexpr decltype(auto) apply(_Callable&& _Obj, _Tuple&& _Tpl) noexcept( } template >>> -inline constexpr bool _Can_make_from_tuple = false; +constexpr bool _Can_make_from_tuple = false; template -inline constexpr bool _Can_make_from_tuple<_Ty, _Tuple, index_sequence<_Indices...>> = +constexpr bool _Can_make_from_tuple<_Ty, _Tuple, index_sequence<_Indices...>> = is_constructible_v<_Ty, decltype(_STD get<_Indices>(_STD declval<_Tuple>()))...>; template diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 9649fdde40..4a93f007b2 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -29,7 +29,7 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN template // TRANSITION, CWG-2518: false value attached to a dependent name (for static_assert) -_INLINE_VAR constexpr bool _Always_false = false; +constexpr bool _Always_false = false; template struct _Conjunction { // handle false trait or last trait @@ -50,16 +50,16 @@ struct conjunction<_First, _Rest...> : _Conjunction<_First::value, _First, _Rest }; _EXPORT_STD template -_INLINE_VAR constexpr bool conjunction_v = conjunction<_Traits...>::value; +constexpr bool conjunction_v = conjunction<_Traits...>::value; _EXPORT_STD template struct negation : bool_constant(_Trait::value)> {}; // The negated result of _Trait _EXPORT_STD template -_INLINE_VAR constexpr bool negation_v = negation<_Trait>::value; +constexpr bool negation_v = negation<_Trait>::value; _EXPORT_STD template -_INLINE_VAR constexpr bool is_void_v = is_same_v, void>; +constexpr bool is_void_v = is_same_v, void>; _EXPORT_STD template struct is_void : bool_constant> {}; @@ -215,87 +215,87 @@ _EXPORT_STD template using add_pointer_t = typename _Add_pointer<_Ty>::type; _EXPORT_STD template -_INLINE_VAR constexpr bool is_array_v = false; // determine whether type argument is an array +constexpr bool is_array_v = false; // determine whether type argument is an array template -_INLINE_VAR constexpr bool is_array_v<_Ty[_Nx]> = true; +constexpr bool is_array_v<_Ty[_Nx]> = true; template -_INLINE_VAR constexpr bool is_array_v<_Ty[]> = true; +constexpr bool is_array_v<_Ty[]> = true; _EXPORT_STD template struct is_array : bool_constant> {}; #if _HAS_CXX20 _EXPORT_STD template -inline constexpr bool is_bounded_array_v = false; +constexpr bool is_bounded_array_v = false; template -inline constexpr bool is_bounded_array_v<_Ty[_Nx]> = true; +constexpr bool is_bounded_array_v<_Ty[_Nx]> = true; _EXPORT_STD template struct is_bounded_array : bool_constant> {}; _EXPORT_STD template -inline constexpr bool is_unbounded_array_v = false; +constexpr bool is_unbounded_array_v = false; template -inline constexpr bool is_unbounded_array_v<_Ty[]> = true; +constexpr bool is_unbounded_array_v<_Ty[]> = true; _EXPORT_STD template struct is_unbounded_array : bool_constant> {}; #endif // _HAS_CXX20 _EXPORT_STD template -_INLINE_VAR constexpr bool is_lvalue_reference_v = false; // determine whether type argument is an lvalue reference +constexpr bool is_lvalue_reference_v = false; // determine whether type argument is an lvalue reference template -_INLINE_VAR constexpr bool is_lvalue_reference_v<_Ty&> = true; +constexpr bool is_lvalue_reference_v<_Ty&> = true; _EXPORT_STD template struct is_lvalue_reference : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_rvalue_reference_v = false; // determine whether type argument is an rvalue reference +constexpr bool is_rvalue_reference_v = false; // determine whether type argument is an rvalue reference template -_INLINE_VAR constexpr bool is_rvalue_reference_v<_Ty&&> = true; +constexpr bool is_rvalue_reference_v<_Ty&&> = true; _EXPORT_STD template struct is_rvalue_reference : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_reference_v = false; // determine whether type argument is a reference +constexpr bool is_reference_v = false; // determine whether type argument is a reference template -_INLINE_VAR constexpr bool is_reference_v<_Ty&> = true; +constexpr bool is_reference_v<_Ty&> = true; template -_INLINE_VAR constexpr bool is_reference_v<_Ty&&> = true; +constexpr bool is_reference_v<_Ty&&> = true; _EXPORT_STD template struct is_reference : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_pointer_v = false; // determine whether _Ty is a pointer +constexpr bool is_pointer_v = false; // determine whether _Ty is a pointer template -_INLINE_VAR constexpr bool is_pointer_v<_Ty*> = true; +constexpr bool is_pointer_v<_Ty*> = true; template -_INLINE_VAR constexpr bool is_pointer_v<_Ty* const> = true; +constexpr bool is_pointer_v<_Ty* const> = true; template -_INLINE_VAR constexpr bool is_pointer_v<_Ty* volatile> = true; +constexpr bool is_pointer_v<_Ty* volatile> = true; template -_INLINE_VAR constexpr bool is_pointer_v<_Ty* const volatile> = true; +constexpr bool is_pointer_v<_Ty* const volatile> = true; _EXPORT_STD template struct is_pointer : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_null_pointer_v = +constexpr bool is_null_pointer_v = is_same_v, nullptr_t>; // determine whether _Ty is cv-qualified nullptr_t _EXPORT_STD template @@ -305,16 +305,16 @@ _EXPORT_STD template struct is_union : bool_constant<__is_union(_Ty)> {}; // determine whether _Ty is a union _EXPORT_STD template -_INLINE_VAR constexpr bool is_union_v = __is_union(_Ty); +constexpr bool is_union_v = __is_union(_Ty); _EXPORT_STD template struct is_class : bool_constant<__is_class(_Ty)> {}; // determine whether _Ty is a class _EXPORT_STD template -_INLINE_VAR constexpr bool is_class_v = __is_class(_Ty); +constexpr bool is_class_v = __is_class(_Ty); _EXPORT_STD template -_INLINE_VAR constexpr bool is_fundamental_v = is_arithmetic_v<_Ty> || is_void_v<_Ty> || is_null_pointer_v<_Ty>; +constexpr bool is_fundamental_v = is_arithmetic_v<_Ty> || is_void_v<_Ty> || is_null_pointer_v<_Ty>; _EXPORT_STD template struct is_fundamental : bool_constant> {}; // determine whether _Ty is a fundamental type @@ -325,7 +325,7 @@ struct is_convertible : bool_constant<__is_convertible_to(_From, _To)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_convertible_v = __is_convertible_to(_From, _To); +constexpr bool is_convertible_v = __is_convertible_to(_From, _To); #if !defined(__clang__) && !defined(__EDG__) // TRANSITION, DevCom-1627396 template @@ -341,27 +341,27 @@ template struct is_convertible : true_type {}; template -_INLINE_VAR constexpr bool is_convertible_v<_Ty&, volatile _Ty&> = true; +constexpr bool is_convertible_v<_Ty&, volatile _Ty&> = true; template -_INLINE_VAR constexpr bool is_convertible_v = true; +constexpr bool is_convertible_v = true; template -_INLINE_VAR constexpr bool is_convertible_v<_Ty&, const volatile _Ty&> = true; +constexpr bool is_convertible_v<_Ty&, const volatile _Ty&> = true; template -_INLINE_VAR constexpr bool is_convertible_v = true; +constexpr bool is_convertible_v = true; #endif // ^^^ workaround ^^^ _EXPORT_STD template struct is_enum : bool_constant<__is_enum(_Ty)> {}; // determine whether _Ty is an enumerated type _EXPORT_STD template -_INLINE_VAR constexpr bool is_enum_v = __is_enum(_Ty); +constexpr bool is_enum_v = __is_enum(_Ty); #if _HAS_CXX23 _EXPORT_STD template -inline constexpr bool is_scoped_enum_v = conjunction_v, negation>>; +constexpr bool is_scoped_enum_v = conjunction_v, negation>>; _EXPORT_STD template struct is_scoped_enum : bool_constant> {}; @@ -371,7 +371,7 @@ _EXPORT_STD template struct is_compound : bool_constant> {}; // determine whether _Ty is a compound type _EXPORT_STD template -_INLINE_VAR constexpr bool is_compound_v = !is_fundamental_v<_Ty>; +constexpr bool is_compound_v = !is_fundamental_v<_Ty>; #define _EMIT_CDECL(FUNC, OPT1, OPT2, OPT3) FUNC(__cdecl, OPT1, OPT2, OPT3) @@ -559,42 +559,42 @@ _NON_MEMBER_CALL(_IS_MEMFUNPTR_EXPLICIT_THIS_GUIDES, , , noexcept) #ifdef __clang__ _EXPORT_STD template -_INLINE_VAR constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Ty); +constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Ty); #else // ^^^ Clang / Other vvv _EXPORT_STD template -_INLINE_VAR constexpr bool is_member_function_pointer_v = _Is_memfunptr>::_Bool_type::value; +constexpr bool is_member_function_pointer_v = _Is_memfunptr>::_Bool_type::value; #endif // ^^^ Other ^^^ _EXPORT_STD template struct is_member_function_pointer : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_const_v = false; // determine whether type argument is const qualified +constexpr bool is_const_v = false; // determine whether type argument is const qualified template -_INLINE_VAR constexpr bool is_const_v = true; +constexpr bool is_const_v = true; _EXPORT_STD template struct is_const : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_volatile_v = false; // determine whether type argument is volatile qualified +constexpr bool is_volatile_v = false; // determine whether type argument is volatile qualified template -_INLINE_VAR constexpr bool is_volatile_v = true; +constexpr bool is_volatile_v = true; _EXPORT_STD template struct is_volatile : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_function_v = // only function types and reference types can't be const qualified +constexpr bool is_function_v = // only function types and reference types can't be const qualified !is_const_v && !is_reference_v<_Ty>; _EXPORT_STD template struct is_function : bool_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_object_v = // only function types and reference types can't be const qualified +constexpr bool is_object_v = // only function types and reference types can't be const qualified is_const_v && !is_void_v<_Ty>; _EXPORT_STD template @@ -613,10 +613,10 @@ struct _Is_member_object_pointer<_Ty1 _Ty2::*> { #ifdef __clang__ _EXPORT_STD template -_INLINE_VAR constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Ty); +constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Ty); #else // ^^^ Clang / Other vvv _EXPORT_STD template -_INLINE_VAR constexpr bool is_member_object_pointer_v = _Is_member_object_pointer>::value; +constexpr bool is_member_object_pointer_v = _Is_member_object_pointer>::value; #endif // ^^^ Other ^^^ _EXPORT_STD template @@ -624,17 +624,17 @@ struct is_member_object_pointer : bool_constant> #ifdef __clang__ _EXPORT_STD template -_INLINE_VAR constexpr bool is_member_pointer_v = __is_member_pointer(_Ty); +constexpr bool is_member_pointer_v = __is_member_pointer(_Ty); #else // ^^^ Clang / Other vvv _EXPORT_STD template -_INLINE_VAR constexpr bool is_member_pointer_v = is_member_object_pointer_v<_Ty> || is_member_function_pointer_v<_Ty>; +constexpr bool is_member_pointer_v = is_member_object_pointer_v<_Ty> || is_member_function_pointer_v<_Ty>; #endif // ^^^ Other ^^^ _EXPORT_STD template struct is_member_pointer : bool_constant> {}; // determine whether _Ty is a pointer to member _EXPORT_STD template -_INLINE_VAR constexpr bool is_scalar_v = // determine whether _Ty is a scalar type +constexpr bool is_scalar_v = // determine whether _Ty is a scalar type is_arithmetic_v<_Ty> || is_enum_v<_Ty> || is_pointer_v<_Ty> || is_member_pointer_v<_Ty> || is_null_pointer_v<_Ty>; _EXPORT_STD template @@ -644,37 +644,37 @@ _EXPORT_STD template struct _CXX20_DEPRECATE_IS_POD is_pod : bool_constant<__is_pod(_Ty)> {}; // determine whether _Ty is a POD type _EXPORT_STD template -_CXX20_DEPRECATE_IS_POD _INLINE_VAR constexpr bool is_pod_v = __is_pod(_Ty); +_CXX20_DEPRECATE_IS_POD constexpr bool is_pod_v = __is_pod(_Ty); _EXPORT_STD template struct is_empty : bool_constant<__is_empty(_Ty)> {}; // determine whether _Ty is an empty class _EXPORT_STD template -_INLINE_VAR constexpr bool is_empty_v = __is_empty(_Ty); +constexpr bool is_empty_v = __is_empty(_Ty); _EXPORT_STD template struct is_polymorphic : bool_constant<__is_polymorphic(_Ty)> {}; // determine whether _Ty is a polymorphic type _EXPORT_STD template -_INLINE_VAR constexpr bool is_polymorphic_v = __is_polymorphic(_Ty); +constexpr bool is_polymorphic_v = __is_polymorphic(_Ty); _EXPORT_STD template struct is_abstract : bool_constant<__is_abstract(_Ty)> {}; // determine whether _Ty is an abstract class _EXPORT_STD template -_INLINE_VAR constexpr bool is_abstract_v = __is_abstract(_Ty); +constexpr bool is_abstract_v = __is_abstract(_Ty); _EXPORT_STD template struct is_final : bool_constant<__is_final(_Ty)> {}; // determine whether _Ty is a final class _EXPORT_STD template -_INLINE_VAR constexpr bool is_final_v = __is_final(_Ty); +constexpr bool is_final_v = __is_final(_Ty); _EXPORT_STD template struct is_standard_layout : bool_constant<__is_standard_layout(_Ty)> {}; // determine whether _Ty is standard layout _EXPORT_STD template -_INLINE_VAR constexpr bool is_standard_layout_v = __is_standard_layout(_Ty); +constexpr bool is_standard_layout_v = __is_standard_layout(_Ty); #if _HAS_DEPRECATED_IS_LITERAL_TYPE _EXPORT_STD template @@ -683,7 +683,7 @@ struct _CXX17_DEPRECATE_IS_LITERAL_TYPE is_literal_type : bool_constant<__is_lit }; _EXPORT_STD template -_CXX17_DEPRECATE_IS_LITERAL_TYPE _INLINE_VAR constexpr bool is_literal_type_v = __is_literal_type(_Ty); +_CXX17_DEPRECATE_IS_LITERAL_TYPE constexpr bool is_literal_type_v = __is_literal_type(_Ty); #endif // _HAS_DEPRECATED_IS_LITERAL_TYPE #if 1 // TRANSITION, VSO-119526 and LLVM-41915 @@ -693,13 +693,13 @@ struct is_trivial : bool_constant<__is_trivially_constructible(_Ty) && __is_triv }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivial_v = __is_trivially_constructible(_Ty) && __is_trivially_copyable(_Ty); +constexpr bool is_trivial_v = __is_trivially_constructible(_Ty) && __is_trivially_copyable(_Ty); #else // ^^^ workaround / no workaround vvv _EXPORT_STD template struct is_trivial : bool_constant<__is_trivial(_Ty)> {}; // determine whether _Ty is a trivial type _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivial_v = __is_trivial(_Ty); +constexpr bool is_trivial_v = __is_trivial(_Ty); #endif // ^^^ no workaround ^^^ _EXPORT_STD template @@ -708,7 +708,7 @@ struct is_trivially_copyable : bool_constant<__is_trivially_copyable(_Ty)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_copyable_v = __is_trivially_copyable(_Ty); +constexpr bool is_trivially_copyable_v = __is_trivially_copyable(_Ty); _EXPORT_STD template struct has_virtual_destructor : bool_constant<__has_virtual_destructor(_Ty)> { @@ -716,7 +716,7 @@ struct has_virtual_destructor : bool_constant<__has_virtual_destructor(_Ty)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool has_virtual_destructor_v = __has_virtual_destructor(_Ty); +constexpr bool has_virtual_destructor_v = __has_virtual_destructor(_Ty); #if _HAS_CXX17 _EXPORT_STD template @@ -725,14 +725,14 @@ struct has_unique_object_representations : bool_constant<__has_unique_object_rep }; _EXPORT_STD template -_INLINE_VAR constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Ty); +constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Ty); #ifdef __EDG__ // TRANSITION, VSO-1690654 template struct _Is_aggregate_impl : bool_constant<__is_aggregate(_Ty)> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_aggregate_v = disjunction_v, _Is_aggregate_impl<_Ty>>; +constexpr bool is_aggregate_v = disjunction_v, _Is_aggregate_impl<_Ty>>; _EXPORT_STD template struct is_aggregate : bool_constant> {}; @@ -741,7 +741,7 @@ _EXPORT_STD template struct is_aggregate : bool_constant<__is_aggregate(_Ty)> {}; _EXPORT_STD template -_INLINE_VAR constexpr bool is_aggregate_v = __is_aggregate(_Ty); +constexpr bool is_aggregate_v = __is_aggregate(_Ty); #endif // ^^^ no workaround ^^^ #endif // _HAS_CXX17 @@ -751,7 +751,7 @@ struct is_constructible : bool_constant<__is_constructible(_Ty, _Args...)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_constructible_v = __is_constructible(_Ty, _Args...); +constexpr bool is_constructible_v = __is_constructible(_Ty, _Args...); _EXPORT_STD template struct is_copy_constructible : bool_constant<__is_constructible(_Ty, add_lvalue_reference_t)> { @@ -759,7 +759,7 @@ struct is_copy_constructible : bool_constant<__is_constructible(_Ty, add_lvalue_ }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_copy_constructible_v = __is_constructible(_Ty, add_lvalue_reference_t); +constexpr bool is_copy_constructible_v = __is_constructible(_Ty, add_lvalue_reference_t); _EXPORT_STD template struct is_default_constructible : bool_constant<__is_constructible(_Ty)> { @@ -767,7 +767,7 @@ struct is_default_constructible : bool_constant<__is_constructible(_Ty)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_default_constructible_v = __is_constructible(_Ty); +constexpr bool is_default_constructible_v = __is_constructible(_Ty); template struct _Is_implicitly_default_constructible : false_type { @@ -787,13 +787,13 @@ struct is_move_constructible : bool_constant<__is_constructible(_Ty, _Ty)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_move_constructible_v = __is_constructible(_Ty, _Ty); +constexpr bool is_move_constructible_v = __is_constructible(_Ty, _Ty); _EXPORT_STD template struct is_assignable : bool_constant<__is_assignable(_To, _From)> {}; // determine whether _From can be assigned to _To _EXPORT_STD template -_INLINE_VAR constexpr bool is_assignable_v = __is_assignable(_To, _From); +constexpr bool is_assignable_v = __is_assignable(_To, _From); #if defined(_IS_ASSIGNABLE_NOCHECK_SUPPORTED) && !defined(__CUDACC__) template @@ -810,8 +810,7 @@ struct is_copy_assignable }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_copy_assignable_v = - __is_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); +constexpr bool is_copy_assignable_v = __is_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); #if defined(_IS_ASSIGNABLE_NOCHECK_SUPPORTED) && !defined(__CUDACC__) template @@ -820,14 +819,14 @@ struct _Is_copy_assignable_no_precondition_check add_lvalue_reference_t<_Ty>, add_lvalue_reference_t)> {}; template -_INLINE_VAR constexpr bool _Is_copy_assignable_unchecked_v = +constexpr bool _Is_copy_assignable_unchecked_v = __is_assignable_no_precondition_check(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); #else // ^^^ Use intrinsic / intrinsic not supported vvv template using _Is_copy_assignable_no_precondition_check = is_copy_assignable<_Ty>; template -_INLINE_VAR constexpr bool _Is_copy_assignable_unchecked_v = is_copy_assignable_v<_Ty>; +constexpr bool _Is_copy_assignable_unchecked_v = is_copy_assignable_v<_Ty>; #endif // ^^^ intrinsic not supported ^^^ _EXPORT_STD template @@ -836,7 +835,7 @@ struct is_move_assignable : bool_constant<__is_assignable(add_lvalue_reference_t }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_move_assignable_v = __is_assignable(add_lvalue_reference_t<_Ty>, _Ty); +constexpr bool is_move_assignable_v = __is_assignable(add_lvalue_reference_t<_Ty>, _Ty); #if defined(_IS_ASSIGNABLE_NOCHECK_SUPPORTED) && !defined(__CUDACC__) template @@ -844,14 +843,14 @@ struct _Is_move_assignable_no_precondition_check : bool_constant<__is_assignable_no_precondition_check(add_lvalue_reference_t<_Ty>, _Ty)> {}; template -_INLINE_VAR constexpr bool _Is_move_assignable_unchecked_v = +constexpr bool _Is_move_assignable_unchecked_v = __is_assignable_no_precondition_check(add_lvalue_reference_t<_Ty>, _Ty); #else // ^^^ Use intrinsic / intrinsic not supported vvv template using _Is_move_assignable_no_precondition_check = is_move_assignable<_Ty>; template -_INLINE_VAR constexpr bool _Is_move_assignable_unchecked_v = is_move_assignable_v<_Ty>; +constexpr bool _Is_move_assignable_unchecked_v = is_move_assignable_v<_Ty>; #endif // ^^^ intrinsic not supported ^^^ _EXPORT_STD template @@ -860,7 +859,7 @@ struct is_destructible : bool_constant<__is_destructible(_Ty)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_destructible_v = __is_destructible(_Ty); +constexpr bool is_destructible_v = __is_destructible(_Ty); _EXPORT_STD template struct is_trivially_constructible : bool_constant<__is_trivially_constructible(_Ty, _Args...)> { @@ -868,7 +867,7 @@ struct is_trivially_constructible : bool_constant<__is_trivially_constructible(_ }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_constructible_v = __is_trivially_constructible(_Ty, _Args...); +constexpr bool is_trivially_constructible_v = __is_trivially_constructible(_Ty, _Args...); _EXPORT_STD template struct is_trivially_copy_constructible @@ -877,8 +876,7 @@ struct is_trivially_copy_constructible }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_copy_constructible_v = - __is_trivially_constructible(_Ty, add_lvalue_reference_t); +constexpr bool is_trivially_copy_constructible_v = __is_trivially_constructible(_Ty, add_lvalue_reference_t); _EXPORT_STD template struct is_trivially_default_constructible : bool_constant<__is_trivially_constructible(_Ty)> { @@ -886,7 +884,7 @@ struct is_trivially_default_constructible : bool_constant<__is_trivially_constru }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(_Ty); +constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(_Ty); _EXPORT_STD template struct is_trivially_move_constructible : bool_constant<__is_trivially_constructible(_Ty, _Ty)> { @@ -894,7 +892,7 @@ struct is_trivially_move_constructible : bool_constant<__is_trivially_constructi }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_move_constructible_v = __is_trivially_constructible(_Ty, _Ty); +constexpr bool is_trivially_move_constructible_v = __is_trivially_constructible(_Ty, _Ty); _EXPORT_STD template struct is_trivially_assignable : bool_constant<__is_trivially_assignable(_To, _From)> { @@ -902,7 +900,7 @@ struct is_trivially_assignable : bool_constant<__is_trivially_assignable(_To, _F }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_assignable_v = __is_trivially_assignable(_To, _From); +constexpr bool is_trivially_assignable_v = __is_trivially_assignable(_To, _From); _EXPORT_STD template struct is_trivially_copy_assignable @@ -911,7 +909,7 @@ struct is_trivially_copy_assignable }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_copy_assignable_v = +constexpr bool is_trivially_copy_assignable_v = __is_trivially_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); _EXPORT_STD template @@ -920,7 +918,7 @@ struct is_trivially_move_assignable : bool_constant<__is_trivially_assignable(ad }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_move_assignable_v = __is_trivially_assignable(add_lvalue_reference_t<_Ty>, _Ty); +constexpr bool is_trivially_move_assignable_v = __is_trivially_assignable(add_lvalue_reference_t<_Ty>, _Ty); _EXPORT_STD template struct is_trivially_destructible : bool_constant<__is_trivially_destructible(_Ty)> { @@ -928,7 +926,7 @@ struct is_trivially_destructible : bool_constant<__is_trivially_destructible(_Ty }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_trivially_destructible_v = __is_trivially_destructible(_Ty); +constexpr bool is_trivially_destructible_v = __is_trivially_destructible(_Ty); _EXPORT_STD template struct is_nothrow_constructible : bool_constant<__is_nothrow_constructible(_Ty, _Args...)> { @@ -936,7 +934,7 @@ struct is_nothrow_constructible : bool_constant<__is_nothrow_constructible(_Ty, }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_constructible_v = __is_nothrow_constructible(_Ty, _Args...); +constexpr bool is_nothrow_constructible_v = __is_nothrow_constructible(_Ty, _Args...); _EXPORT_STD template struct is_nothrow_copy_constructible @@ -946,8 +944,7 @@ struct is_nothrow_copy_constructible }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_copy_constructible_v = - __is_nothrow_constructible(_Ty, add_lvalue_reference_t); +constexpr bool is_nothrow_copy_constructible_v = __is_nothrow_constructible(_Ty, add_lvalue_reference_t); _EXPORT_STD template struct is_nothrow_default_constructible : bool_constant<__is_nothrow_constructible(_Ty)> { @@ -955,7 +952,7 @@ struct is_nothrow_default_constructible : bool_constant<__is_nothrow_constructib }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_default_constructible_v = __is_nothrow_constructible(_Ty); +constexpr bool is_nothrow_default_constructible_v = __is_nothrow_constructible(_Ty); _EXPORT_STD template struct is_nothrow_move_constructible : bool_constant<__is_nothrow_constructible(_Ty, _Ty)> { @@ -963,7 +960,7 @@ struct is_nothrow_move_constructible : bool_constant<__is_nothrow_constructible( }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_move_constructible_v = __is_nothrow_constructible(_Ty, _Ty); +constexpr bool is_nothrow_move_constructible_v = __is_nothrow_constructible(_Ty, _Ty); _EXPORT_STD template struct is_nothrow_assignable : bool_constant<__is_nothrow_assignable(_To, _From)> { @@ -971,7 +968,7 @@ struct is_nothrow_assignable : bool_constant<__is_nothrow_assignable(_To, _From) }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_assignable_v = __is_nothrow_assignable(_To, _From); +constexpr bool is_nothrow_assignable_v = __is_nothrow_assignable(_To, _From); _EXPORT_STD template struct is_nothrow_copy_assignable @@ -980,7 +977,7 @@ struct is_nothrow_copy_assignable }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = +constexpr bool is_nothrow_copy_assignable_v = __is_nothrow_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); _EXPORT_STD template @@ -989,7 +986,7 @@ struct is_nothrow_move_assignable : bool_constant<__is_nothrow_assignable(add_lv }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_move_assignable_v = __is_nothrow_assignable(add_lvalue_reference_t<_Ty>, _Ty); +constexpr bool is_nothrow_move_assignable_v = __is_nothrow_assignable(add_lvalue_reference_t<_Ty>, _Ty); _EXPORT_STD template struct is_nothrow_destructible : bool_constant<__is_nothrow_destructible(_Ty)> { @@ -998,7 +995,7 @@ struct is_nothrow_destructible : bool_constant<__is_nothrow_destructible(_Ty)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_nothrow_destructible_v = __is_nothrow_destructible(_Ty); +constexpr bool is_nothrow_destructible_v = __is_nothrow_destructible(_Ty); template > struct _Sign_base { // determine whether integral type _Ty is signed or unsigned @@ -1019,16 +1016,16 @@ _EXPORT_STD template struct is_signed : bool_constant<_Sign_base<_Ty>::_Signed> {}; // determine whether _Ty is a signed type _EXPORT_STD template -_INLINE_VAR constexpr bool is_signed_v = _Sign_base<_Ty>::_Signed; +constexpr bool is_signed_v = _Sign_base<_Ty>::_Signed; _EXPORT_STD template struct is_unsigned : bool_constant<_Sign_base<_Ty>::_Unsigned> {}; // determine whether _Ty is an unsigned type _EXPORT_STD template -_INLINE_VAR constexpr bool is_unsigned_v = _Sign_base<_Ty>::_Unsigned; +constexpr bool is_unsigned_v = _Sign_base<_Ty>::_Unsigned; template -_INLINE_VAR constexpr bool _Is_nonbool_integral = is_integral_v<_Ty> && !is_same_v, bool>; +constexpr bool _Is_nonbool_integral = is_integral_v<_Ty> && !is_same_v, bool>; template struct _Select { // Select between aliases that extract either their first or second parameter @@ -1140,7 +1137,7 @@ _EXPORT_STD template struct alignment_of : integral_constant {}; // determine alignment of _Ty _EXPORT_STD template -_INLINE_VAR constexpr size_t alignment_of_v = alignof(_Ty); +constexpr size_t alignment_of_v = alignof(_Ty); template union _Align_type { // union with size _Len bytes and alignment of _Ty @@ -1261,28 +1258,28 @@ _EXPORT_STD template using underlying_type_t = typename _Underlying_type<_Ty>::type; _EXPORT_STD template -_INLINE_VAR constexpr size_t rank_v = 0; // determine number of dimensions of array _Ty +constexpr size_t rank_v = 0; // determine number of dimensions of array _Ty template -_INLINE_VAR constexpr size_t rank_v<_Ty[_Nx]> = rank_v<_Ty> + 1; +constexpr size_t rank_v<_Ty[_Nx]> = rank_v<_Ty> + 1; template -_INLINE_VAR constexpr size_t rank_v<_Ty[]> = rank_v<_Ty> + 1; +constexpr size_t rank_v<_Ty[]> = rank_v<_Ty> + 1; _EXPORT_STD template struct rank : integral_constant> {}; _EXPORT_STD template -_INLINE_VAR constexpr size_t extent_v = 0; // determine extent of dimension _Ix of array _Ty +constexpr size_t extent_v = 0; // determine extent of dimension _Ix of array _Ty template -_INLINE_VAR constexpr size_t extent_v<_Ty[_Nx], 0> = _Nx; +constexpr size_t extent_v<_Ty[_Nx], 0> = _Nx; template -_INLINE_VAR constexpr size_t extent_v<_Ty[_Nx], _Ix> = extent_v<_Ty, _Ix - 1>; +constexpr size_t extent_v<_Ty[_Nx], _Ix> = extent_v<_Ty, _Ix - 1>; template -_INLINE_VAR constexpr size_t extent_v<_Ty[], _Ix> = extent_v<_Ty, _Ix - 1>; +constexpr size_t extent_v<_Ty[], _Ix> = extent_v<_Ty, _Ix - 1>; _EXPORT_STD template struct extent : integral_constant> {}; @@ -1293,7 +1290,7 @@ struct is_base_of : bool_constant<__is_base_of(_Base, _Derived)> { }; _EXPORT_STD template -_INLINE_VAR constexpr bool is_base_of_v = __is_base_of(_Base, _Derived); +constexpr bool is_base_of_v = __is_base_of(_Base, _Derived); _EXPORT_STD template struct decay { // determines decayed version of _Ty @@ -1525,9 +1522,9 @@ using type_identity_t = type_identity<_Ty>::type; #endif // _HAS_CXX20 template class _Template> -_INLINE_VAR constexpr bool _Is_specialization_v = false; // true if and only if _Type is a specialization of _Template +constexpr bool _Is_specialization_v = false; // true if and only if _Type is a specialization of _Template template