diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1045,12 +1045,6 @@ # define _LIBCPP_NODISCARD_AFTER_CXX17 #endif -#if _LIBCPP_STD_VER > 14 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) -# define _LIBCPP_INLINE_VAR inline -#else -# define _LIBCPP_INLINE_VAR -#endif - #if !defined(_LIBCPP_DEBUG) && _LIBCPP_STD_VER > 11 # define _LIBCPP_CONSTEXPR_IF_NODEBUG constexpr #else diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h --- a/libcxx/include/__functional/bind.h +++ b/libcxx/include/__functional/bind.h @@ -29,7 +29,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; +inline constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; #endif template struct __is_placeholder : public integral_constant {}; @@ -38,7 +38,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; +inline constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; #endif namespace placeholders @@ -58,16 +58,16 @@ _LIBCPP_FUNC_VIS extern const __ph<9> _9; _LIBCPP_FUNC_VIS extern const __ph<10> _10; #else -/* _LIBCPP_INLINE_VAR */ constexpr __ph<1> _1{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<2> _2{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<3> _3{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<4> _4{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<5> _5{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<6> _6{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<7> _7{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<8> _8{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<9> _9{}; -/* _LIBCPP_INLINE_VAR */ constexpr __ph<10> _10{}; +/* inline */ constexpr __ph<1> _1{}; +/* inline */ constexpr __ph<2> _2{}; +/* inline */ constexpr __ph<3> _3{}; +/* inline */ constexpr __ph<4> _4{}; +/* inline */ constexpr __ph<5> _5{}; +/* inline */ constexpr __ph<6> _6{}; +/* inline */ constexpr __ph<7> _7{}; +/* inline */ constexpr __ph<8> _8{}; +/* inline */ constexpr __ph<9> _9{}; +/* inline */ constexpr __ph<10> _10{}; #endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) } // placeholders diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -26,7 +26,7 @@ #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) extern _LIBCPP_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg; #else -/* _LIBCPP_INLINE_VAR */ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +/* inline */ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); #endif #ifndef _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__memory/uses_allocator.h b/libcxx/include/__memory/uses_allocator.h --- a/libcxx/include/__memory/uses_allocator.h +++ b/libcxx/include/__memory/uses_allocator.h @@ -52,7 +52,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; +inline constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base --- a/libcxx/include/__mutex_base +++ b/libcxx/include/__mutex_base @@ -68,9 +68,9 @@ #else -/* _LIBCPP_INLINE_VAR */ constexpr defer_lock_t defer_lock = defer_lock_t(); -/* _LIBCPP_INLINE_VAR */ constexpr try_to_lock_t try_to_lock = try_to_lock_t(); -/* _LIBCPP_INLINE_VAR */ constexpr adopt_lock_t adopt_lock = adopt_lock_t(); +/* inline */ constexpr defer_lock_t defer_lock = defer_lock_t(); +/* inline */ constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +/* inline */ constexpr adopt_lock_t adopt_lock = adopt_lock_t(); #endif diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h --- a/libcxx/include/__utility/in_place.h +++ b/libcxx/include/__utility/in_place.h @@ -23,21 +23,21 @@ struct _LIBCPP_TYPE_VIS in_place_t { explicit in_place_t() = default; }; -_LIBCPP_INLINE_VAR constexpr in_place_t in_place{}; +inline constexpr in_place_t in_place{}; template struct _LIBCPP_TEMPLATE_VIS in_place_type_t { explicit in_place_type_t() = default; }; template -_LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; +inline constexpr in_place_type_t<_Tp> in_place_type{}; template struct _LIBCPP_TEMPLATE_VIS in_place_index_t { explicit in_place_index_t() = default; }; template -_LIBCPP_INLINE_VAR constexpr in_place_index_t<_Idx> in_place_index{}; +inline constexpr in_place_index_t<_Idx> in_place_index{}; template struct __is_inplace_type_imp : false_type {}; template struct __is_inplace_type_imp> : true_type {}; diff --git a/libcxx/include/__utility/piecewise_construct.h b/libcxx/include/__utility/piecewise_construct.h --- a/libcxx/include/__utility/piecewise_construct.h +++ b/libcxx/include/__utility/piecewise_construct.h @@ -21,7 +21,7 @@ #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) extern _LIBCPP_EXPORTED_FROM_ABI const piecewise_construct_t piecewise_construct;// = piecewise_construct_t(); #else -/* _LIBCPP_INLINE_VAR */ constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); +/* inline */ constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/chrono b/libcxx/include/chrono --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -952,8 +952,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool treat_as_floating_point_v - = treat_as_floating_point<_Rep>::value; +inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; #endif template diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd --- a/libcxx/include/experimental/simd +++ b/libcxx/include/experimental/simd @@ -963,7 +963,7 @@ using fixed_size = __simd_abi<_StorageKind::_Array, _Np>; template -_LIBCPP_INLINE_VAR constexpr size_t max_fixed_size = 32; +inline constexpr size_t max_fixed_size = 32; template using compatible = fixed_size<16 / sizeof(_Tp)>; @@ -990,10 +990,10 @@ struct vector_aligned_tag {}; template struct overaligned_tag {}; -_LIBCPP_INLINE_VAR constexpr element_aligned_tag element_aligned{}; -_LIBCPP_INLINE_VAR constexpr vector_aligned_tag vector_aligned{}; +inline constexpr element_aligned_tag element_aligned{}; +inline constexpr vector_aligned_tag vector_aligned{}; template -_LIBCPP_INLINE_VAR constexpr overaligned_tag<_Np> overaligned{}; +inline constexpr overaligned_tag<_Np> overaligned{}; // traits [simd.traits] template @@ -1032,14 +1032,13 @@ : std::integral_constant {}; template -_LIBCPP_INLINE_VAR constexpr bool is_abi_tag_v = is_abi_tag<_Tp>::value; +inline constexpr bool is_abi_tag_v = is_abi_tag<_Tp>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_simd_v = is_simd<_Tp>::value; +inline constexpr bool is_simd_v = is_simd<_Tp>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_simd_mask_v = is_simd_mask<_Tp>::value; +inline constexpr bool is_simd_mask_v = is_simd_mask<_Tp>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_simd_flag_type_v = - is_simd_flag_type<_Tp>::value; +inline constexpr bool is_simd_flag_type_v = is_simd_flag_type<_Tp>::value; template struct abi_for_size { using type = simd_abi::fixed_size<_Np>; @@ -1064,11 +1063,10 @@ struct memory_alignment; template > -_LIBCPP_INLINE_VAR constexpr size_t simd_size_v = simd_size<_Tp, _Abi>::value; +inline constexpr size_t simd_size_v = simd_size<_Tp, _Abi>::value; template -_LIBCPP_INLINE_VAR constexpr size_t memory_alignment_v = - memory_alignment<_Tp, _Up>::value; +inline constexpr size_t memory_alignment_v = memory_alignment<_Tp, _Up>::value; // class template simd [simd.class] template diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -164,7 +164,7 @@ struct destroying_delete_t { explicit destroying_delete_t() = default; }; -_LIBCPP_INLINE_VAR constexpr destroying_delete_t destroying_delete{}; +inline constexpr destroying_delete_t destroying_delete{}; #endif // _LIBCPP_STD_VER > 17 } // std diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -198,7 +198,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {} }; -_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}}; +inline constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}}; template ::value> struct __optional_destruct_base; diff --git a/libcxx/include/ratio b/libcxx/include/ratio --- a/libcxx/include/ratio +++ b/libcxx/include/ratio @@ -501,28 +501,22 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_equal_v - = ratio_equal<_R1, _R2>::value; +inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_not_equal_v - = ratio_not_equal<_R1, _R2>::value; +inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_v - = ratio_less<_R1, _R2>::value; +inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_equal_v - = ratio_less_equal<_R1, _R2>::value; +inline constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_v - = ratio_greater<_R1, _R2>::value; +inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_equal_v - = ratio_greater_equal<_R1, _R2>::value; +inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/system_error b/libcxx/include/system_error --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -165,7 +165,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; +inline constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; #endif // is_error_condition_enum @@ -176,7 +176,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; +inline constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; #endif template <> diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -1250,7 +1250,7 @@ }; namespace { - _LIBCPP_INLINE_VAR constexpr __ignore_t ignore = __ignore_t(); + constexpr __ignore_t ignore = __ignore_t(); } template @@ -1525,7 +1525,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value; +inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; #define _LIBCPP_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; } diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -557,7 +557,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_same_v = __is_same(_Tp, _Up); +inline constexpr bool is_same_v = __is_same(_Tp, _Up); #endif #else @@ -567,8 +567,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_same_v - = is_same<_Tp, _Up>::value; +inline constexpr bool is_same_v = is_same<_Tp, _Up>::value; #endif #endif // __is_same @@ -614,7 +613,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_const_v = __is_const(_Tp); +inline constexpr bool is_const_v = __is_const(_Tp); #endif #else @@ -624,8 +623,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_const_v - = is_const<_Tp>::value; +inline constexpr bool is_const_v = is_const<_Tp>::value; #endif #endif // __has_keyword(__is_const) @@ -639,7 +637,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_volatile_v = __is_volatile(_Tp); +inline constexpr bool is_volatile_v = __is_volatile(_Tp); #endif #else @@ -649,8 +647,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_volatile_v - = is_volatile<_Tp>::value; +inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; #endif #endif // __has_keyword(__is_volatile) @@ -727,7 +724,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_void_v = __is_void(_Tp); +inline constexpr bool is_void_v = __is_void(_Tp); #endif #else @@ -737,8 +734,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_void_v - = is_void<_Tp>::value; +inline constexpr bool is_void_v = is_void<_Tp>::value; #endif #endif // __has_keyword(__is_void) @@ -757,8 +753,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_null_pointer_v - = is_null_pointer<_Tp>::value; +inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; #endif #endif // _LIBCPP_STD_VER > 11 @@ -771,7 +766,7 @@ #if _LIBCPP_STD_VER > 14 template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_integral_v = __is_integral(_Tp); +inline constexpr bool is_integral_v = __is_integral(_Tp); #endif #else @@ -781,8 +776,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_integral_v - = is_integral<_Tp>::value; +inline constexpr bool is_integral_v = is_integral<_Tp>::value; #endif #endif // __has_keyword(__is_integral) @@ -825,8 +819,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_floating_point_v - = is_floating_point<_Tp>::value; +inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; #endif // is_array @@ -838,7 +831,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_array_v = __is_array(_Tp); +inline constexpr bool is_array_v = __is_array(_Tp); #endif #else @@ -852,8 +845,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_array_v - = is_array<_Tp>::value; +inline constexpr bool is_array_v = is_array<_Tp>::value; #endif #endif // __has_keyword(__is_array) @@ -870,7 +862,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pointer_v = __is_pointer(_Tp); +inline constexpr bool is_pointer_v = __is_pointer(_Tp); #endif #else // __has_keyword(__is_pointer) @@ -891,8 +883,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pointer_v - = is_pointer<_Tp>::value; +inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; #endif #endif // __has_keyword(__is_pointer) @@ -914,13 +905,11 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v = __is_reference(_Tp); - +inline constexpr bool is_reference_v = __is_reference(_Tp); template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_lvalue_reference_v = __is_lvalue_reference(_Tp); - +inline constexpr bool is_lvalue_reference_v = __is_lvalue_reference(_Tp); template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_rvalue_reference_v = __is_rvalue_reference(_Tp); +inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp); #endif #else // __has_keyword(__is_lvalue_reference) && etc... @@ -937,16 +926,13 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v - = is_reference<_Tp>::value; +inline constexpr bool is_reference_v = is_reference<_Tp>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_lvalue_reference_v - = is_lvalue_reference<_Tp>::value; +inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_rvalue_reference_v - = is_rvalue_reference<_Tp>::value; +inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; #endif #endif // __has_keyword(__is_lvalue_reference) && etc... @@ -968,8 +954,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_union_v - = is_union<_Tp>::value; +inline constexpr bool is_union_v = is_union<_Tp>::value; #endif // is_class @@ -994,8 +979,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_class_v - = is_class<_Tp>::value; +inline constexpr bool is_class_v = is_class<_Tp>::value; #endif // is_function @@ -1012,8 +996,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_function_v - = is_function<_Tp>::value; +inline constexpr bool is_function_v = is_function<_Tp>::value; #endif template struct __libcpp_is_member_pointer { @@ -1039,8 +1022,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_function_pointer_v - = __is_member_function_pointer(_Tp); +inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); #endif #else // __has_keyword(__is_member_function_pointer) @@ -1050,8 +1032,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_function_pointer_v - = is_member_function_pointer<_Tp>::value; +inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; #endif #endif // __has_keyword(__is_member_function_pointer) @@ -1065,7 +1046,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_pointer_v = __is_member_pointer(_Tp); +inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); #endif #else // __has_keyword(__is_member_pointer) @@ -1075,8 +1056,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_pointer_v - = is_member_pointer<_Tp>::value; +inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; #endif #endif // __has_keyword(__is_member_pointer) @@ -1091,8 +1071,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_object_pointer_v - = __is_member_object_pointer(_Tp); +inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); #endif #else // __has_keyword(__is_member_object_pointer) @@ -1102,8 +1081,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_object_pointer_v - = is_member_object_pointer<_Tp>::value; +inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; #endif #endif // __has_keyword(__is_member_object_pointer) @@ -1117,7 +1095,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_enum_v = __is_enum(_Tp); +inline constexpr bool is_enum_v = __is_enum(_Tp); #endif #else @@ -1136,8 +1114,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_enum_v - = is_enum<_Tp>::value; +inline constexpr bool is_enum_v = is_enum<_Tp>::value; #endif #endif // __has_feature(is_enum) || defined(_LIBCPP_COMPILER_GCC) @@ -1151,8 +1128,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_arithmetic_v - = is_arithmetic<_Tp>::value; +inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; #endif // is_fundamental @@ -1168,7 +1144,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_fundamental_v = __is_fundamental(_Tp); +inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); #endif #else // __has_keyword(__is_fundamental) @@ -1180,8 +1156,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_fundamental_v - = is_fundamental<_Tp>::value; +inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; #endif #endif // __has_keyword(__is_fundamental) @@ -1196,7 +1171,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scalar_v = __is_scalar(_Tp); +inline constexpr bool is_scalar_v = __is_scalar(_Tp); #endif #else // __has_keyword(__is_scalar) @@ -1218,8 +1193,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scalar_v - = is_scalar<_Tp>::value; +inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; #endif #endif // __has_keyword(__is_scalar) @@ -1233,7 +1207,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_object_v = __is_object(_Tp); +inline constexpr bool is_object_v = __is_object(_Tp); #endif #else // __has_keyword(__is_object) @@ -1246,8 +1220,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_object_v - = is_object<_Tp>::value; +inline constexpr bool is_object_v = is_object<_Tp>::value; #endif #endif // __has_keyword(__is_object) @@ -1262,7 +1235,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_compound_v = __is_compound(_Tp); +inline constexpr bool is_compound_v = __is_compound(_Tp); #endif #else // __has_keyword(__is_compound) @@ -1272,8 +1245,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_compound_v - = is_compound<_Tp>::value; +inline constexpr bool is_compound_v = is_compound<_Tp>::value; #endif #endif // __has_keyword(__is_compound) @@ -1454,7 +1426,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_signed_v = __is_signed(_Tp); +inline constexpr bool is_signed_v = __is_signed(_Tp); #endif #else // __has_keyword(__is_signed) @@ -1474,8 +1446,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_signed_v - = is_signed<_Tp>::value; +inline constexpr bool is_signed_v = is_signed<_Tp>::value; #endif #endif // __has_keyword(__is_signed) @@ -1493,7 +1464,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v = __is_unsigned(_Tp); +inline constexpr bool is_unsigned_v = __is_unsigned(_Tp); #endif #else // __has_keyword(__is_unsigned) @@ -1513,8 +1484,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v - = is_unsigned<_Tp>::value; +inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; #endif #endif // __has_keyword(__is_unsigned) @@ -1530,8 +1500,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t rank_v - = rank<_Tp>::value; +inline constexpr size_t rank_v = rank<_Tp>::value; #endif // extent @@ -1544,7 +1513,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t extent_v = __array_extent(_Tp, _Ip); +inline constexpr size_t extent_v = __array_extent(_Tp, _Ip); #endif #else // __has_keyword(__array_extent) @@ -1562,8 +1531,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t extent_v - = extent<_Tp, _Ip>::value; +inline constexpr size_t extent_v = extent<_Tp, _Ip>::value; #endif #endif // __has_keyword(__array_extent) @@ -1601,7 +1569,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {}; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR +inline constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value; // is_unbounded_array @@ -1610,7 +1578,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {}; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR +inline constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; #endif @@ -1657,8 +1625,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_abstract_v - = is_abstract<_Tp>::value; +inline constexpr bool is_abstract_v = is_abstract<_Tp>::value; #endif // is_final @@ -1673,8 +1640,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_final_v - = is_final<_Tp>::value; +inline constexpr bool is_final_v = is_final<_Tp>::value; #endif // is_aggregate @@ -1685,8 +1651,7 @@ #if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR constexpr bool is_aggregate_v - = is_aggregate<_Tp>::value; +inline constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; #endif #endif // _LIBCPP_STD_VER > 14 @@ -1699,8 +1664,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_base_of_v - = is_base_of<_Bp, _Dp>::value; +inline constexpr bool is_base_of_v = is_base_of<_Bp, _Dp>::value; #endif // __is_core_convertible @@ -1796,8 +1760,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_convertible_v - = is_convertible<_From, _To>::value; +inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; #endif // is_nothrow_convertible @@ -1859,8 +1822,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_empty_v - = is_empty<_Tp>::value; +inline constexpr bool is_empty_v = is_empty<_Tp>::value; #endif // is_polymorphic @@ -1885,8 +1847,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_polymorphic_v - = is_polymorphic<_Tp>::value; +inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; #endif // has_virtual_destructor @@ -1905,8 +1866,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_virtual_destructor_v - = has_virtual_destructor<_Tp>::value; +inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; #endif // has_unique_object_representations @@ -1919,8 +1879,7 @@ #if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_unique_object_representations_v - = has_unique_object_representations<_Tp>::value; +inline constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value; #endif #endif @@ -1932,8 +1891,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t alignment_of_v - = alignment_of<_Tp>::value; +inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; #endif // aligned_storage @@ -2678,7 +2636,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_assignable_v = __is_assignable(_Tp, _Arg); +inline constexpr bool is_assignable_v = __is_assignable(_Tp, _Arg); #endif #else // __has_keyword(__is_assignable) @@ -2707,8 +2665,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_assignable_v - = is_assignable<_Tp, _Arg>::value; +inline constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value; #endif #endif // __has_keyword(__is_assignable) @@ -2721,8 +2678,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_copy_assignable_v - = is_copy_assignable<_Tp>::value; +inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; #endif // is_move_assignable @@ -2733,8 +2689,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_assignable_v - = is_move_assignable<_Tp>::value; +inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; #endif // is_destructible @@ -2746,7 +2701,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_destructible_v = __is_destructible(_Tp); +inline constexpr bool is_destructible_v = __is_destructible(_Tp); #endif #else // __has_keyword(__is_destructible) @@ -2809,8 +2764,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_destructible_v - = is_destructible<_Tp>::value; +inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; #endif #endif // __has_keyword(__is_destructible) @@ -3053,8 +3007,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_constructible_v - = is_constructible<_Tp, _Args...>::value; +inline constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value; #endif // is_default_constructible @@ -3066,8 +3019,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_default_constructible_v - = is_default_constructible<_Tp>::value; +inline constexpr bool is_default_constructible_v = is_default_constructible<_Tp>::value; #endif #ifndef _LIBCPP_CXX03_LANG @@ -3103,8 +3055,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_copy_constructible_v - = is_copy_constructible<_Tp>::value; +inline constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; #endif // is_move_constructible @@ -3116,8 +3067,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_constructible_v - = is_move_constructible<_Tp>::value; +inline constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value; #endif // is_trivially_constructible @@ -3130,8 +3080,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_constructible_v - = is_trivially_constructible<_Tp, _Args...>::value; +inline constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; #endif // is_trivially_default_constructible @@ -3142,8 +3091,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v - = is_trivially_default_constructible<_Tp>::value; +inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; #endif // is_trivially_copy_constructible @@ -3154,8 +3102,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v - = is_trivially_copy_constructible<_Tp>::value; +inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; #endif // is_trivially_move_constructible @@ -3166,8 +3113,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v - = is_trivially_move_constructible<_Tp>::value; +inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; #endif // is_trivially_assignable @@ -3179,8 +3125,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_assignable_v - = is_trivially_assignable<_Tp, _Arg>::value; +inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value; #endif // is_trivially_copy_assignable @@ -3191,8 +3136,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v - = is_trivially_copy_assignable<_Tp>::value; +inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; #endif // is_trivially_move_assignable @@ -3204,8 +3148,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v - = is_trivially_move_assignable<_Tp>::value; +inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; #endif // is_trivially_destructible @@ -3236,8 +3179,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_destructible_v - = is_trivially_destructible<_Tp>::value; +inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; #endif // is_nothrow_constructible @@ -3290,8 +3232,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v - = is_nothrow_constructible<_Tp, _Args...>::value; +inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; #endif // is_nothrow_default_constructible @@ -3302,8 +3243,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v - = is_nothrow_default_constructible<_Tp>::value; +inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible<_Tp>::value; #endif // is_nothrow_copy_constructible @@ -3314,8 +3254,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v - = is_nothrow_copy_constructible<_Tp>::value; +inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; #endif // is_nothrow_move_constructible @@ -3326,8 +3265,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v - = is_nothrow_move_constructible<_Tp>::value; +inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; #endif // is_nothrow_assignable @@ -3364,8 +3302,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v - = is_nothrow_assignable<_Tp, _Arg>::value; +inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; #endif // is_nothrow_copy_assignable @@ -3376,8 +3313,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v - = is_nothrow_copy_assignable<_Tp>::value; +inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; #endif // is_nothrow_move_assignable @@ -3389,8 +3325,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v - = is_nothrow_move_assignable<_Tp>::value; +inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; #endif // is_nothrow_destructible @@ -3452,8 +3387,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v - = is_nothrow_destructible<_Tp>::value; +inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; #endif // is_pod @@ -3475,8 +3409,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pod_v - = is_pod<_Tp>::value; +inline constexpr bool is_pod_v = is_pod<_Tp>::value; #endif // is_literal_type; @@ -3488,8 +3421,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_literal_type_v - = is_literal_type<_Tp>::value; +_LIBCPP_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; #endif // _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) #endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS) @@ -3505,8 +3437,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_standard_layout_v - = is_standard_layout<_Tp>::value; +inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; #endif // is_trivially_copyable; @@ -3517,8 +3448,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copyable_v - = is_trivially_copyable<_Tp>::value; +inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; #endif // is_trivial; @@ -3534,8 +3464,7 @@ #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivial_v - = is_trivial<_Tp>::value; +inline constexpr bool is_trivial_v = is_trivial<_Tp>::value; #endif template struct __is_reference_wrapper_impl : public false_type {}; @@ -3942,12 +3871,10 @@ : integral_constant::value> {}; template -_LIBCPP_INLINE_VAR constexpr bool is_invocable_v - = is_invocable<_Fn, _Args...>::value; +inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_invocable_r_v - = is_invocable_r<_Ret, _Fn, _Args...>::value; +inline constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; // is_nothrow_invocable @@ -3960,12 +3887,10 @@ : integral_constant::value> {}; template -_LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_v - = is_nothrow_invocable<_Fn, _Args...>::value; +inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_r_v - = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; +inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; #endif // _LIBCPP_STD_VER > 14 @@ -4088,20 +4013,16 @@ }; template -_LIBCPP_INLINE_VAR constexpr bool is_swappable_with_v - = is_swappable_with<_Tp, _Up>::value; +inline constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_swappable_v - = is_swappable<_Tp>::value; +inline constexpr bool is_swappable_v = is_swappable<_Tp>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_nothrow_swappable_with_v - = is_nothrow_swappable_with<_Tp, _Up>::value; +inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; template -_LIBCPP_INLINE_VAR constexpr bool is_nothrow_swappable_v - = is_nothrow_swappable<_Tp>::value; +inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; #endif // _LIBCPP_STD_VER > 14 @@ -4184,8 +4105,7 @@ : public __is_scoped_enum_helper<_Tp> {}; template -_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scoped_enum_v = - is_scoped_enum<_Tp>::value; +inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; #endif #if _LIBCPP_STD_VER > 14 @@ -4193,20 +4113,17 @@ template struct conjunction : _And<_Args...> {}; template -_LIBCPP_INLINE_VAR constexpr bool conjunction_v - = conjunction<_Args...>::value; +inline constexpr bool conjunction_v = conjunction<_Args...>::value; template struct disjunction : _Or<_Args...> {}; template -_LIBCPP_INLINE_VAR constexpr bool disjunction_v - = disjunction<_Args...>::value; +inline constexpr bool disjunction_v = disjunction<_Args...>::value; template struct negation : _Not<_Tp> {}; template -_LIBCPP_INLINE_VAR constexpr bool negation_v - = negation<_Tp>::value; +inline constexpr bool negation_v = negation<_Tp>::value; #endif // _LIBCPP_STD_VER > 14 // These traits are used in __tree and __hash_table diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -266,7 +266,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_size; template -_LIBCPP_INLINE_VAR constexpr size_t variant_size_v = variant_size<_Tp>::value; +inline constexpr size_t variant_size_v = variant_size<_Tp>::value; template struct _LIBCPP_TEMPLATE_VIS variant_size : variant_size<_Tp> {}; @@ -306,7 +306,7 @@ using type = __type_pack_element<_Ip, _Types...>; }; -_LIBCPP_INLINE_VAR constexpr size_t variant_npos = static_cast(-1); +inline constexpr size_t variant_npos = static_cast(-1); constexpr int __choose_index_type(unsigned int __num_elem) { if (__num_elem < numeric_limits::max())