[libcxx-commits] [libcxx] cb793e1 - [libc++][NFCI] Remove uses of _LIBCPP_INLINE_VAR

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 22 13:03:29 PDT 2021


Author: Louis Dionne
Date: 2021-09-22T16:03:00-04:00
New Revision: cb793e1a3655b8a571cb621db9d221c46f32ba9f

URL: https://github.com/llvm/llvm-project/commit/cb793e1a3655b8a571cb621db9d221c46f32ba9f
DIFF: https://github.com/llvm/llvm-project/commit/cb793e1a3655b8a571cb621db9d221c46f32ba9f.diff

LOG: [libc++][NFCI] Remove uses of _LIBCPP_INLINE_VAR

All supported compilers provide support for inline variables in C++17 now.
Also, as a fly-by fix, replace some uses of _LIBCPP_CONSTEXPR by just
constexpr.

The only exception in this patch is `std::ignore`, which is provided
prior to C++17. Since it is defined in an anonymous namespace, it always
has internal linkage anyway, so using an inline variable there doesn't
provide any benefit. Instead, `inline` was removed entirely on `std::ignore`.

Differential Revision: https://reviews.llvm.org/D110243

Added: 
    

Modified: 
    libcxx/include/__config
    libcxx/include/__functional/bind.h
    libcxx/include/__memory/allocator_arg_t.h
    libcxx/include/__memory/uses_allocator.h
    libcxx/include/__mutex_base
    libcxx/include/__utility/in_place.h
    libcxx/include/__utility/piecewise_construct.h
    libcxx/include/chrono
    libcxx/include/experimental/simd
    libcxx/include/new
    libcxx/include/optional
    libcxx/include/ratio
    libcxx/include/system_error
    libcxx/include/tuple
    libcxx/include/type_traits
    libcxx/include/variant

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index f959c6b1f383..ae5d277b92fd 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -1045,12 +1045,6 @@ typedef unsigned int   char32_t;
 #  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
index 730aad0e29a9..0b74d91b7746 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -29,7 +29,7 @@ template<class _Tp> struct _LIBCPP_TEMPLATE_VIS is_bind_expression
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-_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<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
@@ -38,7 +38,7 @@ template<class _Tp> struct _LIBCPP_TEMPLATE_VIS is_placeholder
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-_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<8>   _8;
 _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
index fb98c5bfa00c..053af24b9fd6 100644
--- a/libcxx/include/__memory/allocator_arg_t.h
+++ b/libcxx/include/__memory/allocator_arg_t.h
@@ -26,7 +26,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = defau
 #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
index 36e752057545..2e186207408b 100644
--- a/libcxx/include/__memory/uses_allocator.h
+++ b/libcxx/include/__memory/uses_allocator.h
@@ -52,7 +52,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp, class _Alloc>
-_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
index 936633e0dd7b..da2967164a68 100644
--- a/libcxx/include/__mutex_base
+++ b/libcxx/include/__mutex_base
@@ -68,9 +68,9 @@ extern _LIBCPP_EXPORTED_FROM_ABI const adopt_lock_t  adopt_lock;
 
 #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
index 75a52762c8f7..846b4a6d4dfb 100644
--- a/libcxx/include/__utility/in_place.h
+++ b/libcxx/include/__utility/in_place.h
@@ -23,21 +23,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 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 <class _Tp>
 struct _LIBCPP_TEMPLATE_VIS in_place_type_t {
     explicit in_place_type_t() = default;
 };
 template <class _Tp>
-_LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{};
+inline constexpr in_place_type_t<_Tp> in_place_type{};
 
 template <size_t _Idx>
 struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
     explicit in_place_index_t() = default;
 };
 template <size_t _Idx>
-_LIBCPP_INLINE_VAR constexpr in_place_index_t<_Idx> in_place_index{};
+inline constexpr in_place_index_t<_Idx> in_place_index{};
 
 template <class _Tp> struct __is_inplace_type_imp : false_type {};
 template <class _Tp> struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};

diff  --git a/libcxx/include/__utility/piecewise_construct.h b/libcxx/include/__utility/piecewise_construct.h
index ecc5b34c869c..4dc44b38fe99 100644
--- a/libcxx/include/__utility/piecewise_construct.h
+++ b/libcxx/include/__utility/piecewise_construct.h
@@ -21,7 +21,7 @@ struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct
 #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
index ec90ee2243a4..6877291ec56e 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -952,8 +952,7 @@ struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {}
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Rep>
-_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 <class _Rep>

diff  --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd
index d1aaf5504488..59a71395858d 100644
--- a/libcxx/include/experimental/simd
+++ b/libcxx/include/experimental/simd
@@ -963,7 +963,7 @@ template <int _Np>
 using fixed_size = __simd_abi<_StorageKind::_Array, _Np>;
 
 template <class _Tp>
-_LIBCPP_INLINE_VAR constexpr size_t max_fixed_size = 32;
+inline constexpr size_t max_fixed_size = 32;
 
 template <class _Tp>
 using compatible = fixed_size<16 / sizeof(_Tp)>;
@@ -990,10 +990,10 @@ struct element_aligned_tag {};
 struct vector_aligned_tag {};
 template <size_t>
 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 <size_t _Np>
-_LIBCPP_INLINE_VAR constexpr overaligned_tag<_Np> overaligned{};
+inline constexpr overaligned_tag<_Np> overaligned{};
 
 // traits [simd.traits]
 template <class _Tp>
@@ -1032,14 +1032,13 @@ struct is_simd_flag_type<overaligned_tag<_Align>>
     : std::integral_constant<bool, true> {};
 
 template <class _Tp>
-_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 <class _Tp>
-_LIBCPP_INLINE_VAR constexpr bool is_simd_v = is_simd<_Tp>::value;
+inline constexpr bool is_simd_v = is_simd<_Tp>::value;
 template <class _Tp>
-_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 <class _Tp>
-_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 <class _Tp, size_t _Np>
 struct abi_for_size {
   using type = simd_abi::fixed_size<_Np>;
@@ -1064,11 +1063,10 @@ template <class _Tp, class _Up = typename _Tp::value_type>
 struct memory_alignment;
 
 template <class _Tp, class _Abi = simd_abi::compatible<_Tp>>
-_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 <class _Tp, class _Up = typename _Tp::value_type>
-_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 <class _Tp>

diff  --git a/libcxx/include/new b/libcxx/include/new
index e9c002a0e39b..2d1417a97586 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -164,7 +164,7 @@ enum align_val_t { __zero = 0, __max = (size_t)-1 };
 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
index ea43856dc7ff..b9ac71b04e2c 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -198,7 +198,7 @@ struct nullopt_t
     _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 <class _Tp, bool = is_trivially_destructible<_Tp>::value>
 struct __optional_destruct_base;

diff  --git a/libcxx/include/ratio b/libcxx/include/ratio
index 091ea53accce..622b7a05ef80 100644
--- a/libcxx/include/ratio
+++ b/libcxx/include/ratio
@@ -501,28 +501,22 @@ struct __ratio_gcd
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _R1, class _R2>
-_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 <class _R1, class _R2>
-_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 <class _R1, class _R2>
-_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 <class _R1, class _R2>
-_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 <class _R1, class _R2>
-_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 <class _R1, class _R2>
-_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
index aab97681156c..db87c98ec877 100644
--- a/libcxx/include/system_error
+++ b/libcxx/include/system_error
@@ -165,7 +165,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_code_enum
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-_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
index 01073e6fc562..93b6e6049895 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -1250,7 +1250,7 @@ struct __ignore_t
 };
 
 namespace {
-  _LIBCPP_INLINE_VAR constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
+  constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
 }
 
 template <class... _Tp>
@@ -1525,7 +1525,7 @@ pair<_T1, _T2>::pair(piecewise_construct_t,
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-_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
index 15cff1f9fd00..eac0466e5311 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -557,7 +557,7 @@ struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class _Up>
-_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 @@ template <class _Tp>            struct _LIBCPP_TEMPLATE_VIS is_same<_Tp, _Tp> :
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class _Up>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_const : _BoolConstant<__is_const(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public tr
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_volatile : _BoolConstant<__is_volatile(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : pub
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_void
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_null_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_integral
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_floating_point
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]>
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v = __is_reference(_Tp);
-
+inline constexpr bool is_reference_v = __is_reference(_Tp);
 template <class _Tp>
-_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 <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public tr
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v
-    = is_reference<_Tp>::value;
+inline constexpr bool is_reference_v = is_reference<_Tp>::value;
 
 template <class _Tp>
-_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 <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_function
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 <class _Tp> struct __libcpp_is_member_pointer {
@@ -1039,8 +1022,7 @@ struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointe
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_arithmetic
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_fundamental
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <> struct _LIBCPP_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_object
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_compound : _BoolConstant<__is_compound(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_compound
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_signed : _BoolConstant<__is_signed(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_i
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]>
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS extent
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, unsigned _Ip = 0>
-_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 @@ template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS exten
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, unsigned _Ip = 0>
-_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 <class>                 struct _LIBCPP_TEMPLATE_VIS is_bounded_array
 template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {};
 
 template <class _Tp>
-_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 <class>     struct _LIBCPP_TEMPLATE_VIS is_unbounded_array        : fal
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {};
 
 template <class _Tp>
-_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR
+inline constexpr
 bool is_unbounded_array_v  = is_unbounded_array<_Tp>::value;
 #endif
 
@@ -1657,8 +1625,7 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ is_final : public integral_constant<bool, __is_final(_Tp)> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {};
 
 #if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_base_of
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Bp, class _Dp>
-_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 @@ template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _From, class _To>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_empty : public __libcpp_empt
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_polymorphic
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_unique_object_representatio
 
 #if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS alignment_of
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class _Arg>
-_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 @@ struct is_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class _Arg>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_move_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_destructible : _BoolConstant<__is_destructible(_T
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct is_destructible<void>
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class ..._Args>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_default_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_move_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class... _Args>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructi
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct is_trivially_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class _Arg>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]>
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class ..._Args>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructibl
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp, class _Arg>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]>
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_standard_layout
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-_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 <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
@@ -3942,12 +3871,10 @@ struct _LIBCPP_TEMPLATE_VIS is_invocable_r
     : integral_constant<bool, __invokable_r<_Ret, _Fn, _Args...>::value> {};
 
 template <class _Fn, class ..._Args>
-_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 <class _Ret, class _Fn, class ..._Args>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r
     : integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};
 
 template <class _Fn, class ..._Args>
-_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 <class _Ret, class _Fn, class ..._Args>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
 };
 
 template <class _Tp, class _Up>
-_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 <class _Tp>
-_LIBCPP_INLINE_VAR constexpr bool is_swappable_v
-    = is_swappable<_Tp>::value;
+inline constexpr bool is_swappable_v = is_swappable<_Tp>::value;
 
 template <class _Tp, class _Up>
-_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 <class _Tp>
-_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 @@ struct _LIBCPP_TEMPLATE_VIS is_scoped_enum
     : public __is_scoped_enum_helper<_Tp> {};
 
 template <class _Tp>
-_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 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scoped_enum_v =
 template <class... _Args>
 struct conjunction : _And<_Args...> {};
 template<class... _Args>
-_LIBCPP_INLINE_VAR constexpr bool conjunction_v
-    = conjunction<_Args...>::value;
+inline constexpr bool conjunction_v = conjunction<_Args...>::value;
 
 template <class... _Args>
 struct disjunction : _Or<_Args...> {};
 template<class... _Args>
-_LIBCPP_INLINE_VAR constexpr bool disjunction_v
-    = disjunction<_Args...>::value;
+inline constexpr bool disjunction_v = disjunction<_Args...>::value;
 
 template <class _Tp>
 struct negation : _Not<_Tp> {};
 template<class _Tp>
-_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
index b69b697ce1c2..ea120d49f079 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -266,7 +266,7 @@ template <class _Tp>
 struct _LIBCPP_TEMPLATE_VIS variant_size;
 
 template <class _Tp>
-_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 <class _Tp>
 struct _LIBCPP_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};
@@ -306,7 +306,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
   using type = __type_pack_element<_Ip, _Types...>;
 };
 
-_LIBCPP_INLINE_VAR constexpr size_t variant_npos = static_cast<size_t>(-1);
+inline constexpr size_t variant_npos = static_cast<size_t>(-1);
 
 constexpr int __choose_index_type(unsigned int __num_elem) {
   if (__num_elem < numeric_limits<unsigned char>::max())


        


More information about the libcxx-commits mailing list