[libcxx] r321658 - Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 09:17:02 PST 2018


Author: marshall
Date: Tue Jan  2 09:17:01 2018
New Revision: 321658

URL: http://llvm.org/viewvc/llvm-project?rev=321658&view=rev
Log:
Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).

Modified:
    libcxx/trunk/include/__config
    libcxx/trunk/include/__functional_base
    libcxx/trunk/include/__mutex_base
    libcxx/trunk/include/chrono
    libcxx/trunk/include/functional
    libcxx/trunk/include/memory
    libcxx/trunk/include/mutex
    libcxx/trunk/include/optional
    libcxx/trunk/include/ratio
    libcxx/trunk/include/system_error
    libcxx/trunk/include/tuple
    libcxx/trunk/include/type_traits
    libcxx/trunk/include/utility
    libcxx/trunk/include/variant
    libcxx/trunk/www/cxx1z_status.html

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Jan  2 09:17:01 2018
@@ -980,9 +980,10 @@ template <unsigned> struct __static_asse
 #define _LIBCPP_NODISCARD_AFTER_CXX17
 #endif
 
-// FIXME: Remove all usages of this macro once compilers catch up.
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606L)
-# define _LIBCPP_HAS_NO_INLINE_VARIABLES
+#if _LIBCPP_STD_VER > 14 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L)
+# define _LIBCPP_INLINE_VAR  inline
+#else
+# define _LIBCPP_INLINE_VAR  
 #endif
 
 #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES

Modified: libcxx/trunk/include/__functional_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base (original)
+++ libcxx/trunk/include/__functional_base Tue Jan  2 09:17:01 2018
@@ -564,7 +564,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_ar
 #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_MEMORY)
 extern const allocator_arg_t allocator_arg;
 #else
-constexpr allocator_arg_t allocator_arg = allocator_arg_t();
+_LIBCPP_INLINE_VAR constexpr allocator_arg_t allocator_arg = allocator_arg_t();
 #endif
 
 // uses_allocator
@@ -601,7 +601,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocat
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp, class _Alloc>
-constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
+_LIBCPP_INLINE_VAR constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
 #endif
 
 #ifndef _LIBCPP_CXX03_LANG

Modified: libcxx/trunk/include/__mutex_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__mutex_base?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/__mutex_base (original)
+++ libcxx/trunk/include/__mutex_base Tue Jan  2 09:17:01 2018
@@ -82,9 +82,9 @@ extern const adopt_lock_t  adopt_lock;
 
 #else
 
-constexpr defer_lock_t  defer_lock  = defer_lock_t();
-constexpr try_to_lock_t try_to_lock = try_to_lock_t();
-constexpr adopt_lock_t  adopt_lock  = adopt_lock_t();
+_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();
 
 #endif
 

Modified: libcxx/trunk/include/chrono
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/chrono (original)
+++ libcxx/trunk/include/chrono Tue Jan  2 09:17:01 2018
@@ -26,7 +26,7 @@ duration_cast(const duration<Rep, Period
 
 template <class Rep> struct treat_as_floating_point : is_floating_point<Rep> {};
 
-template <class Rep> constexpr bool treat_as_floating_point_v
+template <class Rep> inline constexpr bool treat_as_floating_point_v
     = treat_as_floating_point<Rep>::value;                       // C++17
 
 template <class Rep>
@@ -419,7 +419,8 @@ template <class _Rep>
 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_CONSTEXPR bool treat_as_floating_point_v
+template <class _Rep>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
     = treat_as_floating_point<_Rep>::value;
 #endif
 

Modified: libcxx/trunk/include/functional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/functional?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/functional (original)
+++ libcxx/trunk/include/functional Tue Jan  2 09:17:01 2018
@@ -213,9 +213,9 @@ template<class T> struct is_bind_express
 template<class T> struct is_placeholder;
 
     // See C++14 20.9.9, Function object binders
-template <class T> constexpr bool is_bind_expression_v
+template <class T> inline constexpr bool is_bind_expression_v
   = is_bind_expression<T>::value; // C++17
-template <class T> constexpr int is_placeholder_v
+template <class T> inline constexpr int is_placeholder_v
   = is_placeholder<T>::value; // C++17
 
 
@@ -1991,7 +1991,7 @@ template<class _Tp> struct _LIBCPP_TEMPL
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
 #endif
 
 template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
@@ -2000,7 +2000,7 @@ template<class _Tp> struct _LIBCPP_TEMPL
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value;
 #endif
 
 namespace placeholders
@@ -2020,16 +2020,16 @@ _LIBCPP_FUNC_VIS extern const __ph<8>
 _LIBCPP_FUNC_VIS extern const __ph<9>   _9;
 _LIBCPP_FUNC_VIS extern const __ph<10> _10;
 #else
-constexpr __ph<1>   _1{};
-constexpr __ph<2>   _2{};
-constexpr __ph<3>   _3{};
-constexpr __ph<4>   _4{};
-constexpr __ph<5>   _5{};
-constexpr __ph<6>   _6{};
-constexpr __ph<7>   _7{};
-constexpr __ph<8>   _8{};
-constexpr __ph<9>   _9{};
-constexpr __ph<10> _10{};
+_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{};
 #endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_BIND)
 
 }  // placeholders

Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Tue Jan  2 09:17:01 2018
@@ -18,7 +18,7 @@ namespace std
 {
 
 struct allocator_arg_t { };
-constexpr allocator_arg_t allocator_arg = allocator_arg_t();
+inline constexpr allocator_arg_t allocator_arg = allocator_arg_t();
 
 template <class T, class Alloc> struct uses_allocator;
 
@@ -631,6 +631,9 @@ template <class T> struct hash;
 template <class T, class D> struct hash<unique_ptr<T, D> >;
 template <class T> struct hash<shared_ptr<T> >;
 
+template <class T, class Alloc>
+  inline constexpr bool uses_allocator_v = uses_allocator<T, Alloc>::value;
+
 // Pointer safety
 enum class pointer_safety { relaxed, preferred, strict };
 void declare_reachable(void *p);

Modified: libcxx/trunk/include/mutex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/mutex?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/mutex (original)
+++ libcxx/trunk/include/mutex Tue Jan  2 09:17:01 2018
@@ -91,9 +91,9 @@ struct defer_lock_t {};
 struct try_to_lock_t {};
 struct adopt_lock_t {};
 
-constexpr defer_lock_t  defer_lock{};
-constexpr try_to_lock_t try_to_lock{};
-constexpr adopt_lock_t  adopt_lock{};
+inline constexpr defer_lock_t  defer_lock{};
+inline constexpr try_to_lock_t try_to_lock{};
+inline constexpr adopt_lock_t  adopt_lock{};
 
 template <class Mutex>
 class lock_guard

Modified: libcxx/trunk/include/optional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/optional?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/optional (original)
+++ libcxx/trunk/include/optional Tue Jan  2 09:17:01 2018
@@ -22,7 +22,7 @@ namespace std {
 
   // 23.6.4, no-value state indicator
   struct nullopt_t{see below };
-  constexpr nullopt_t nullopt(unspecified );
+  inline constexpr nullopt_t nullopt(unspecified );
 
   // 23.6.5, class bad_optional_access
   class bad_optional_access;
@@ -195,7 +195,7 @@ struct nullopt_t
     _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {}
 };
 
-/* inline */ constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
+_LIBCPP_INLINE_VAR 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;

Modified: libcxx/trunk/include/ratio
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/ratio?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/ratio (original)
+++ libcxx/trunk/include/ratio Tue Jan  2 09:17:01 2018
@@ -63,17 +63,17 @@ typedef ratio<   1000000000000000000000,
 typedef ratio<1000000000000000000000000, 1> yotta;  // not supported
 
   // 20.11.5, ratio comparison
-  template <class R1, class R2> constexpr bool ratio_equal_v
+  template <class R1, class R2> inline constexpr bool ratio_equal_v
     = ratio_equal<R1, R2>::value;                                       // C++17
-  template <class R1, class R2> constexpr bool ratio_not_equal_v
+  template <class R1, class R2> inline constexpr bool ratio_not_equal_v
     = ratio_not_equal<R1, R2>::value;                                   // C++17
-  template <class R1, class R2> constexpr bool ratio_less_v
+  template <class R1, class R2> inline constexpr bool ratio_less_v
     = ratio_less<R1, R2>::value;                                        // C++17
-  template <class R1, class R2> constexpr bool ratio_less_equal_v
+  template <class R1, class R2> inline constexpr bool ratio_less_equal_v
     = ratio_less_equal<R1, R2>::value;                                  // C++17
-  template <class R1, class R2> constexpr bool ratio_greater_v
+  template <class R1, class R2> inline constexpr bool ratio_greater_v
     = ratio_greater<R1, R2>::value;                                     // C++17
-  template <class R1, class R2> constexpr bool ratio_greater_equal_v
+  template <class R1, class R2> inline constexpr bool ratio_greater_equal_v
     = ratio_greater_equal<R1, R2>::value;                               // C++17
 }
 */
@@ -501,22 +501,28 @@ struct __ratio_gcd
 };
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_equal_v
+template <class _R1, class _R2>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_equal_v
     = ratio_equal<_R1, _R2>::value;
 
-template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_not_equal_v
+template <class _R1, class _R2>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_not_equal_v
     = ratio_not_equal<_R1, _R2>::value;
 
-template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_v
+template <class _R1, class _R2>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_v
     = ratio_less<_R1, _R2>::value;
 
-template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_equal_v
+template <class _R1, class _R2>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_equal_v
     = ratio_less_equal<_R1, _R2>::value;
 
-template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_v
+template <class _R1, class _R2>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_v
     = ratio_greater<_R1, _R2>::value;
 
-template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_equal_v
+template <class _R1, class _R2>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_equal_v
     = ratio_greater_equal<_R1, _R2>::value;
 #endif
 

Modified: libcxx/trunk/include/system_error
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/system_error?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/system_error (original)
+++ libcxx/trunk/include/system_error Tue Jan  2 09:17:01 2018
@@ -47,10 +47,10 @@ template <class T> struct is_error_condi
     : public false_type {};
 
 template <class _Tp>
-constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17
+inline constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17
 
 template <class _Tp>
-constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17
+inline constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17
 
 class error_code
 {
@@ -246,7 +246,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_cod
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value;
 #endif
 
 // is_error_condition_enum
@@ -257,7 +257,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_con
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
 #endif
 
 // Some error codes are not present on all platforms, so we provide equivalents

Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Tue Jan  2 09:17:01 2018
@@ -70,7 +70,7 @@ public:
     void swap(tuple&) noexcept(AND(swap(declval<T&>(), declval<T&>())...));
 };
 
-const unspecified ignore;
+inline constexpr unspecified ignore;
 
 template <class... T> tuple<V...>  make_tuple(T&&...); // constexpr in C++14
 template <class... T> tuple<ATypes...> forward_as_tuple(T&&...) noexcept; // constexpr in C++14
@@ -87,7 +87,7 @@ template <class T, class Tuple>
 template <class T> class tuple_size; // undefined
 template <class... T> class tuple_size<tuple<T...>>;
 template <class T>
- constexpr size_t tuple_size_v = tuple_size<T>::value; // C++17
+ inline constexpr size_t tuple_size_v = tuple_size<T>::value; // C++17
 template <size_t I, class T> class tuple_element; // undefined
 template <size_t I, class... T> class tuple_element<I, tuple<T...>>;
 template <size_t I, class T>
@@ -1079,7 +1079,7 @@ struct __ignore_t
 };
 
 namespace {
-  constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
+  _LIBCPP_INLINE_VAR constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
 }
 
 template <class _Tp>
@@ -1368,7 +1368,7 @@ pair<_T1, _T2>::pair(piecewise_construct
 
 #if _LIBCPP_STD_VER > 14
 template <class _Tp>
-constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
 
 #define _LIBCPP_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; }
 

Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Tue Jan  2 09:17:01 2018
@@ -223,173 +223,173 @@ namespace std
       using void_t = void;   // C++17
       
       // See C++14 20.10.4.1, primary type categories
-      template <class T> constexpr bool is_void_v
+      template <class T> inline constexpr bool is_void_v
         = is_void<T>::value;                                             // C++17
-      template <class T> constexpr bool is_null_pointer_v
+      template <class T> inline constexpr bool is_null_pointer_v
         = is_null_pointer<T>::value;                                     // C++17
-      template <class T> constexpr bool is_integral_v
+      template <class T> inline constexpr bool is_integral_v
         = is_integral<T>::value;                                         // C++17
-      template <class T> constexpr bool is_floating_point_v
+      template <class T> inline constexpr bool is_floating_point_v
         = is_floating_point<T>::value;                                   // C++17
-      template <class T> constexpr bool is_array_v
+      template <class T> inline constexpr bool is_array_v
         = is_array<T>::value;                                            // C++17
-      template <class T> constexpr bool is_pointer_v
+      template <class T> inline constexpr bool is_pointer_v
         = is_pointer<T>::value;                                          // C++17
-      template <class T> constexpr bool is_lvalue_reference_v
+      template <class T> inline constexpr bool is_lvalue_reference_v
         = is_lvalue_reference<T>::value;                                 // C++17
-      template <class T> constexpr bool is_rvalue_reference_v
+      template <class T> inline constexpr bool is_rvalue_reference_v
         = is_rvalue_reference<T>::value;                                 // C++17
-      template <class T> constexpr bool is_member_object_pointer_v
+      template <class T> inline constexpr bool is_member_object_pointer_v
         = is_member_object_pointer<T>::value;                            // C++17
-      template <class T> constexpr bool is_member_function_pointer_v
+      template <class T> inline constexpr bool is_member_function_pointer_v
         = is_member_function_pointer<T>::value;                          // C++17
-      template <class T> constexpr bool is_enum_v
+      template <class T> inline constexpr bool is_enum_v
         = is_enum<T>::value;                                             // C++17
-      template <class T> constexpr bool is_union_v
+      template <class T> inline constexpr bool is_union_v
         = is_union<T>::value;                                            // C++17
-      template <class T> constexpr bool is_class_v
+      template <class T> inline constexpr bool is_class_v
         = is_class<T>::value;                                            // C++17
-      template <class T> constexpr bool is_function_v
+      template <class T> inline constexpr bool is_function_v
         = is_function<T>::value;                                         // C++17
 
       // See C++14 20.10.4.2, composite type categories
-      template <class T> constexpr bool is_reference_v
+      template <class T> inline constexpr bool is_reference_v
         = is_reference<T>::value;                                        // C++17
-      template <class T> constexpr bool is_arithmetic_v
+      template <class T> inline constexpr bool is_arithmetic_v
         = is_arithmetic<T>::value;                                       // C++17
-      template <class T> constexpr bool is_fundamental_v
+      template <class T> inline constexpr bool is_fundamental_v
         = is_fundamental<T>::value;                                      // C++17
-      template <class T> constexpr bool is_object_v
+      template <class T> inline constexpr bool is_object_v
         = is_object<T>::value;                                           // C++17
-      template <class T> constexpr bool is_scalar_v
+      template <class T> inline constexpr bool is_scalar_v
         = is_scalar<T>::value;                                           // C++17
-      template <class T> constexpr bool is_compound_v
+      template <class T> inline constexpr bool is_compound_v
         = is_compound<T>::value;                                         // C++17
-      template <class T> constexpr bool is_member_pointer_v
+      template <class T> inline constexpr bool is_member_pointer_v
         = is_member_pointer<T>::value;                                   // C++17
 
       // See C++14 20.10.4.3, type properties
-      template <class T> constexpr bool is_const_v
+      template <class T> inline constexpr bool is_const_v
         = is_const<T>::value;                                            // C++17
-      template <class T> constexpr bool is_volatile_v
+      template <class T> inline constexpr bool is_volatile_v
         = is_volatile<T>::value;                                         // C++17
-      template <class T> constexpr bool is_trivial_v
+      template <class T> inline constexpr bool is_trivial_v
         = is_trivial<T>::value;                                          // C++17
-      template <class T> constexpr bool is_trivially_copyable_v
+      template <class T> inline constexpr bool is_trivially_copyable_v
         = is_trivially_copyable<T>::value;                               // C++17
-      template <class T> constexpr bool is_standard_layout_v
+      template <class T> inline constexpr bool is_standard_layout_v
         = is_standard_layout<T>::value;                                  // C++17
-      template <class T> constexpr bool is_pod_v
+      template <class T> inline constexpr bool is_pod_v
         = is_pod<T>::value;                                              // C++17
-      template <class T> constexpr bool is_literal_type_v
+      template <class T> inline constexpr bool is_literal_type_v
         = is_literal_type<T>::value;                                     // C++17
-      template <class T> constexpr bool is_empty_v
+      template <class T> inline constexpr bool is_empty_v
         = is_empty<T>::value;                                            // C++17
-      template <class T> constexpr bool is_polymorphic_v
+      template <class T> inline constexpr bool is_polymorphic_v
         = is_polymorphic<T>::value;                                      // C++17
-      template <class T> constexpr bool is_abstract_v
+      template <class T> inline constexpr bool is_abstract_v
         = is_abstract<T>::value;                                         // C++17
-      template <class T> constexpr bool is_final_v
+      template <class T> inline constexpr bool is_final_v
         = is_final<T>::value;                                            // C++17
-      template <class T> constexpr bool is_aggregate_v
+      template <class T> inline constexpr bool is_aggregate_v
         = is_aggregate<T>::value;                                        // C++17
-      template <class T> constexpr bool is_signed_v
+      template <class T> inline constexpr bool is_signed_v
         = is_signed<T>::value;                                           // C++17
-      template <class T> constexpr bool is_unsigned_v
+      template <class T> inline constexpr bool is_unsigned_v
         = is_unsigned<T>::value;                                         // C++17
-      template <class T, class... Args> constexpr bool is_constructible_v
+      template <class T, class... Args> inline constexpr bool is_constructible_v
         = is_constructible<T, Args...>::value;                           // C++17
-      template <class T> constexpr bool is_default_constructible_v
+      template <class T> inline constexpr bool is_default_constructible_v
         = is_default_constructible<T>::value;                            // C++17
-      template <class T> constexpr bool is_copy_constructible_v
+      template <class T> inline constexpr bool is_copy_constructible_v
         = is_copy_constructible<T>::value;                               // C++17
-      template <class T> constexpr bool is_move_constructible_v
+      template <class T> inline constexpr bool is_move_constructible_v
         = is_move_constructible<T>::value;                               // C++17
-      template <class T, class U> constexpr bool is_assignable_v
+      template <class T, class U> inline constexpr bool is_assignable_v
         = is_assignable<T, U>::value;                                    // C++17
-      template <class T> constexpr bool is_copy_assignable_v
+      template <class T> inline constexpr bool is_copy_assignable_v
         = is_copy_assignable<T>::value;                                  // C++17
-      template <class T> constexpr bool is_move_assignable_v
+      template <class T> inline constexpr bool is_move_assignable_v
         = is_move_assignable<T>::value;                                  // C++17
-      template <class T, class U> constexpr bool is_swappable_with_v
+      template <class T, class U> inline constexpr bool is_swappable_with_v
         = is_swappable_with<T, U>::value;                                // C++17
-      template <class T> constexpr bool is_swappable_v
+      template <class T> inline constexpr bool is_swappable_v
         = is_swappable<T>::value;                                        // C++17
-      template <class T> constexpr bool is_destructible_v
+      template <class T> inline constexpr bool is_destructible_v
         = is_destructible<T>::value;                                     // C++17
-      template <class T, class... Args> constexpr bool is_trivially_constructible_v
+      template <class T, class... Args> inline constexpr bool is_trivially_constructible_v
         = is_trivially_constructible<T, Args...>::value;                 // C++17
-      template <class T> constexpr bool is_trivially_default_constructible_v
+      template <class T> inline constexpr bool is_trivially_default_constructible_v
         = is_trivially_default_constructible<T>::value;                  // C++17
-      template <class T> constexpr bool is_trivially_copy_constructible_v
+      template <class T> inline constexpr bool is_trivially_copy_constructible_v
         = is_trivially_copy_constructible<T>::value;                     // C++17
-      template <class T> constexpr bool is_trivially_move_constructible_v
+      template <class T> inline constexpr bool is_trivially_move_constructible_v
         = is_trivially_move_constructible<T>::value;                     // C++17
-      template <class T, class U> constexpr bool is_trivially_assignable_v
+      template <class T, class U> inline constexpr bool is_trivially_assignable_v
         = is_trivially_assignable<T, U>::value;                          // C++17
-      template <class T> constexpr bool is_trivially_copy_assignable_v
+      template <class T> inline constexpr bool is_trivially_copy_assignable_v
         = is_trivially_copy_assignable<T>::value;                        // C++17
-      template <class T> constexpr bool is_trivially_move_assignable_v
+      template <class T> inline constexpr bool is_trivially_move_assignable_v
         = is_trivially_move_assignable<T>::value;                        // C++17
-      template <class T> constexpr bool is_trivially_destructible_v
+      template <class T> inline constexpr bool is_trivially_destructible_v
         = is_trivially_destructible<T>::value;                           // C++17
-      template <class T, class... Args> constexpr bool is_nothrow_constructible_v
+      template <class T, class... Args> inline constexpr bool is_nothrow_constructible_v
         = is_nothrow_constructible<T, Args...>::value;                   // C++17
-      template <class T> constexpr bool is_nothrow_default_constructible_v
+      template <class T> inline constexpr bool is_nothrow_default_constructible_v
         = is_nothrow_default_constructible<T>::value;                    // C++17
-      template <class T> constexpr bool is_nothrow_copy_constructible_v
+      template <class T> inline constexpr bool is_nothrow_copy_constructible_v
         = is_nothrow_copy_constructible<T>::value;                       // C++17
-      template <class T> constexpr bool is_nothrow_move_constructible_v
+      template <class T> inline constexpr bool is_nothrow_move_constructible_v
         = is_nothrow_move_constructible<T>::value;                       // C++17
-      template <class T, class U> constexpr bool is_nothrow_assignable_v
+      template <class T, class U> inline constexpr bool is_nothrow_assignable_v
         = is_nothrow_assignable<T, U>::value;                            // C++17
-      template <class T> constexpr bool is_nothrow_copy_assignable_v
+      template <class T> inline constexpr bool is_nothrow_copy_assignable_v
         = is_nothrow_copy_assignable<T>::value;                          // C++17
-      template <class T> constexpr bool is_nothrow_move_assignable_v
+      template <class T> inline constexpr bool is_nothrow_move_assignable_v
         = is_nothrow_move_assignable<T>::value;                          // C++17
-      template <class T, class U> constexpr bool is_nothrow_swappable_with_v
+      template <class T, class U> inline constexpr bool is_nothrow_swappable_with_v
         = is_nothrow_swappable_with<T, U>::value;                       // C++17
-      template <class T> constexpr bool is_nothrow_swappable_v
+      template <class T> inline constexpr bool is_nothrow_swappable_v
         = is_nothrow_swappable<T>::value;                               // C++17
-      template <class T> constexpr bool is_nothrow_destructible_v
+      template <class T> inline constexpr bool is_nothrow_destructible_v
         = is_nothrow_destructible<T>::value;                             // C++17
-      template <class T> constexpr bool has_virtual_destructor_v
+      template <class T> inline constexpr bool has_virtual_destructor_v
         = has_virtual_destructor<T>::value;                              // C++17
 
       // See C++14 20.10.5, type property queries
-      template <class T> constexpr size_t alignment_of_v
+      template <class T> inline constexpr size_t alignment_of_v
         = alignment_of<T>::value;                                        // C++17
-      template <class T> constexpr size_t rank_v
+      template <class T> inline constexpr size_t rank_v
         = rank<T>::value;                                                // C++17
-      template <class T, unsigned I = 0> constexpr size_t extent_v
+      template <class T, unsigned I = 0> inline constexpr size_t extent_v
         = extent<T, I>::value;                                           // C++17
 
       // See C++14 20.10.6, type relations
-      template <class T, class U> constexpr bool is_same_v
+      template <class T, class U> inline constexpr bool is_same_v
         = is_same<T, U>::value;                                          // C++17
-      template <class Base, class Derived> constexpr bool is_base_of_v
+      template <class Base, class Derived> inline constexpr bool is_base_of_v
         = is_base_of<Base, Derived>::value;                              // C++17
-      template <class From, class To> constexpr bool is_convertible_v
+      template <class From, class To> inline constexpr bool is_convertible_v
         = is_convertible<From, To>::value;                               // C++17
-      template <class Fn, class... ArgTypes> constexpr bool is_invocable_v
+      template <class Fn, class... ArgTypes> inline constexpr bool is_invocable_v
         = is_invocable<Fn, ArgTypes...>::value;                          // C++17
-      template <class R, class Fn, class... ArgTypes> constexpr bool is_invocable_r_v
+      template <class R, class Fn, class... ArgTypes> inline constexpr bool is_invocable_r_v
         = is_invocable_r<R, Fn, ArgTypes...>::value;                     // C++17
-      template <class Fn, class... ArgTypes> constexpr bool is_nothrow_invocable_v
+      template <class Fn, class... ArgTypes> inline constexpr bool is_nothrow_invocable_v
         = is_nothrow_invocable<Fn, ArgTypes...>::value;                  // C++17
-      template <class R, class Fn, class... ArgTypes> constexpr bool is_nothrow_invocable_r_v
+      template <class R, class Fn, class... ArgTypes> inline constexpr bool is_nothrow_invocable_r_v
         = is_nothrow_invocable_r<R, Fn, ArgTypes...>::value;             // C++17
 
       // [meta.logical], logical operator traits:
       template<class... B> struct conjunction;                           // C++17
       template<class... B> 
-        constexpr bool conjunction_v = conjunction<B...>::value;         // C++17
+        inline constexpr bool conjunction_v = conjunction<B...>::value;  // C++17
       template<class... B> struct disjunction;                           // C++17
       template<class... B>
-        constexpr bool disjunction_v = disjunction<B...>::value;         // C++17
+        inline constexpr bool disjunction_v = disjunction<B...>::value;  // C++17
       template<class B> struct negation;                                 // C++17
       template<class B> 
-        constexpr bool negation_v = negation<B>::value;                  // C++17
+        inline constexpr bool negation_v = negation<B>::value;           // C++17
 
 }
 
@@ -619,7 +619,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_const_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_const_v
     = is_const<_Tp>::value;
 #endif
 
@@ -629,7 +630,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_volatile_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_volatile_v
     = is_volatile<_Tp>::value;
 #endif
 
@@ -666,7 +668,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_void<typename remove_cv<_Tp>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_void_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_void_v
     = is_void<_Tp>::value;
 #endif
 
@@ -683,7 +686,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_null_pointer_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_null_pointer_v
     = is_null_pointer<_Tp>::value;
 #endif
 #endif
@@ -717,7 +721,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_integral<typename remove_cv<_Tp>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_integral_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_integral_v
     = is_integral<_Tp>::value;
 #endif
 
@@ -732,7 +737,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_floating_point_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_floating_point_v
     = is_floating_point<_Tp>::value;
 #endif
 
@@ -746,7 +752,8 @@ template <class _Tp, size_t _Np> struct
     : public true_type {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_array_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_array_v
     = is_array<_Tp>::value;
 #endif
 
@@ -759,7 +766,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_pointer<typename remove_cv<_Tp>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_pointer_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pointer_v
     = is_pointer<_Tp>::value;
 #endif
 
@@ -780,13 +788,16 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_reference_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v
     = is_reference<_Tp>::value;
 
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_lvalue_reference_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_lvalue_reference_v
     = is_lvalue_reference<_Tp>::value;
 
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_rvalue_reference_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_rvalue_reference_v
     = is_rvalue_reference<_Tp>::value;
 #endif
 // is_union
@@ -805,7 +816,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_union_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_union_v
     = is_union<_Tp>::value;
 #endif
 
@@ -830,7 +842,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_class_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_class_v
     = is_class<_Tp>::value;
 #endif
 
@@ -840,7 +853,8 @@ template <class _Tp, class _Up> struct _
 template <class _Tp>            struct _LIBCPP_TEMPLATE_VIS is_same<_Tp, _Tp> : public true_type {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp, class _Up> _LIBCPP_CONSTEXPR bool is_same_v
+template <class _Tp, class _Up>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_same_v
     = is_same<_Tp, _Up>::value;
 #endif
 
@@ -870,7 +884,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_function<_Tp> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_function_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_function_v
     = is_function<_Tp>::value;
 #endif
 
@@ -897,7 +912,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type>::type {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_function_pointer_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_function_pointer_v
     = is_member_function_pointer<_Tp>::value;
 #endif
 
@@ -910,7 +926,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public __libcpp_is_member_pointer<typename remove_cv<_Tp>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_pointer_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_pointer_v
     = is_member_pointer<_Tp>::value;
 #endif
 
@@ -921,7 +938,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                                     !is_member_function_pointer<_Tp>::value> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_object_pointer_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_object_pointer_v
     = is_member_object_pointer<_Tp>::value;
 #endif
 
@@ -949,7 +967,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_enum_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_enum_v
     = is_enum<_Tp>::value;
 #endif
 
@@ -960,7 +979,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                                      is_floating_point<_Tp>::value> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_arithmetic_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_arithmetic_v
     = is_arithmetic<_Tp>::value;
 #endif
 
@@ -972,7 +992,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                                      is_arithmetic<_Tp>::value> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_fundamental_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_fundamental_v
     = is_fundamental<_Tp>::value;
 #endif
 
@@ -988,7 +1009,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 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_CONSTEXPR bool is_scalar_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scalar_v
     = is_scalar<_Tp>::value;
 #endif
 
@@ -1001,7 +1023,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                                      is_class<_Tp>::value  > {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_object_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_object_v
     = is_object<_Tp>::value;
 #endif
 
@@ -1011,7 +1034,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public integral_constant<bool, !is_fundamental<_Tp>::value> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_compound_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_compound_v
     = is_compound<_Tp>::value;
 #endif
 
@@ -1210,7 +1234,8 @@ template <class _Tp> struct __libcpp_is_
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_signed_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_signed_v
     = is_signed<_Tp>::value;
 #endif
 
@@ -1230,7 +1255,8 @@ template <class _Tp> struct __libcpp_is_
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_unsigned_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v
     = is_unsigned<_Tp>::value;
 #endif
 
@@ -1244,7 +1270,8 @@ template <class _Tp, size_t _Np> struct
     : public integral_constant<size_t, rank<_Tp>::value + 1> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR size_t rank_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t rank_v
     = rank<_Tp>::value;
 #endif
 
@@ -1262,7 +1289,8 @@ template <class _Tp, size_t _Np, unsigne
     : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp, unsigned _Ip = 0> _LIBCPP_CONSTEXPR size_t extent_v
+template <class _Tp, unsigned _Ip = 0>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t extent_v
     = extent<_Tp, _Ip>::value;
 #endif
 
@@ -1334,7 +1362,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public integral_constant<bool, __is_abstract(_Tp)> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_abstract_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_abstract_v
     = is_abstract<_Tp>::value;
 #endif
 
@@ -1354,7 +1383,8 @@ is_final : public integral_constant<bool
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_final_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_final_v
     = is_final<_Tp>::value;
 #endif
 
@@ -1366,7 +1396,8 @@ is_aggregate : public integral_constant<
 
 #if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
 template <class _Tp>
-constexpr bool is_aggregate_v = is_aggregate<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_aggregate_v
+    = is_aggregate<_Tp>::value;
 #endif
 
 #endif // _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE)
@@ -1407,7 +1438,8 @@ struct _LIBCPP_TEMPLATE_VIS is_base_of
 #endif  // _LIBCPP_HAS_IS_BASE_OF
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Bp, class _Dp> _LIBCPP_CONSTEXPR bool is_base_of_v
+template <class _Bp, class _Dp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_base_of_v
     = is_base_of<_Bp, _Dp>::value;
 #endif
 
@@ -1497,7 +1529,8 @@ template <class _T1, class _T2> struct _
 #endif  // __has_feature(is_convertible_to)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _From, class _To> _LIBCPP_CONSTEXPR bool is_convertible_v
+template <class _From, class _To>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_convertible_v
     = is_convertible<_From, _To>::value;
 #endif
 
@@ -1533,7 +1566,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif  // __has_feature(is_empty)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_empty_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_empty_v
     = is_empty<_Tp>::value;
 #endif
 
@@ -1558,7 +1592,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif // __has_feature(is_polymorphic)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_polymorphic_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_polymorphic_v
     = is_polymorphic<_Tp>::value;
 #endif
 
@@ -1577,7 +1612,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool has_virtual_destructor_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_virtual_destructor_v
     = has_virtual_destructor<_Tp>::value;
 #endif
 
@@ -1587,7 +1623,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     : public integral_constant<size_t, __alignof__(_Tp)> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR size_t alignment_of_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t alignment_of_v
     = alignment_of<_Tp>::value;
 #endif
 
@@ -2126,7 +2163,8 @@ struct is_assignable
     : public __is_assignable_imp<_Tp, _Arg> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_assignable_v
+template <class _Tp, class _Arg>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_assignable_v
     = is_assignable<_Tp, _Arg>::value;
 #endif
 
@@ -2137,7 +2175,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_copy_assignable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_copy_assignable_v
     = is_copy_assignable<_Tp>::value;
 #endif
 
@@ -2152,7 +2191,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_move_assignable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_assignable_v
     = is_move_assignable<_Tp>::value;
 #endif
 
@@ -2215,7 +2255,8 @@ struct is_destructible<void>
     : public _VSTD::false_type {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_destructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_destructible_v
     = is_destructible<_Tp>::value;
 #endif
 
@@ -3260,7 +3301,8 @@ struct __is_constructible2_imp<false, _A
 
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
-template <class _Tp, class ..._Args> _LIBCPP_CONSTEXPR bool is_constructible_v
+template <class _Tp, class ..._Args>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_constructible_v
     = is_constructible<_Tp, _Args...>::value;
 #endif
 
@@ -3272,7 +3314,8 @@ struct _LIBCPP_TEMPLATE_VIS is_default_c
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_default_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_default_constructible_v
     = is_default_constructible<_Tp>::value;
 #endif
 
@@ -3284,7 +3327,8 @@ struct _LIBCPP_TEMPLATE_VIS is_copy_cons
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_copy_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_copy_constructible_v
     = is_copy_constructible<_Tp>::value;
 #endif
 
@@ -3300,7 +3344,8 @@ struct _LIBCPP_TEMPLATE_VIS is_move_cons
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_move_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_constructible_v
     = is_move_constructible<_Tp>::value;
 #endif
 
@@ -3432,7 +3477,8 @@ struct _LIBCPP_TEMPLATE_VIS is_trivially
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
-template <class _Tp, class... _Args> _LIBCPP_CONSTEXPR bool is_trivially_constructible_v
+template <class _Tp, class... _Args>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_constructible_v
     = is_trivially_constructible<_Tp, _Args...>::value;
 #endif
 
@@ -3443,7 +3489,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v
     = is_trivially_default_constructible<_Tp>::value;
 #endif
 
@@ -3454,7 +3501,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v
     = is_trivially_copy_constructible<_Tp>::value;
 #endif
 
@@ -3469,7 +3517,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v
     = is_trivially_move_constructible<_Tp>::value;
 #endif
 
@@ -3512,7 +3561,8 @@ struct is_trivially_assignable<_Tp&, _Tp
 #endif  // !__has_feature(is_trivially_assignable)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_trivially_assignable_v
+template <class _Tp, class _Arg>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_assignable_v
     = is_trivially_assignable<_Tp, _Arg>::value;
 #endif
 
@@ -3523,7 +3573,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v
     = is_trivially_copy_assignable<_Tp>::value;
 #endif
 
@@ -3539,7 +3590,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v
     = is_trivially_move_assignable<_Tp>::value;
 #endif
 
@@ -3565,7 +3617,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_destructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_destructible_v
     = is_trivially_destructible<_Tp>::value;
 #endif
 
@@ -3730,7 +3783,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_c
 #endif  // __has_feature(is_nothrow_constructible)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
-template <class _Tp, class ..._Args> _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v
+template <class _Tp, class ..._Args>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v
     = is_nothrow_constructible<_Tp, _Args...>::value;
 #endif
 
@@ -3741,7 +3795,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v
     = is_nothrow_default_constructible<_Tp>::value;
 #endif
 
@@ -3752,7 +3807,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v
     = is_nothrow_copy_constructible<_Tp>::value;
 #endif
 
@@ -3767,7 +3823,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v
     = is_nothrow_move_constructible<_Tp>::value;
 #endif
 
@@ -3840,7 +3897,8 @@ struct is_nothrow_assignable<_Tp&, _Tp&&
 #endif  // __has_feature(cxx_noexcept)
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v
+template <class _Tp, class _Arg>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v
     = is_nothrow_assignable<_Tp, _Arg>::value;
 #endif
 
@@ -3851,7 +3909,8 @@ template <class _Tp> struct _LIBCPP_TEMP
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v
     = is_nothrow_copy_assignable<_Tp>::value;
 #endif
 
@@ -3867,7 +3926,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v
     = is_nothrow_move_assignable<_Tp>::value;
 #endif
 
@@ -3933,7 +3993,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_d
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v
     = is_nothrow_destructible<_Tp>::value;
 #endif
 
@@ -3955,7 +4016,8 @@ template <class _Tp> struct _LIBCPP_TEMP
 #endif
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_pod_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pod_v
     = is_pod<_Tp>::value;
 #endif
 
@@ -3971,7 +4033,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
     
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_literal_type_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_literal_type_v
     = is_literal_type<_Tp>::value;
 #endif
 
@@ -3986,7 +4049,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
     
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_standard_layout_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_standard_layout_v
     = is_standard_layout<_Tp>::value;
 #endif
 
@@ -4003,7 +4067,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
     
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copyable_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copyable_v
     = is_trivially_copyable<_Tp>::value;
 #endif
 
@@ -4019,7 +4084,8 @@ template <class _Tp> struct _LIBCPP_TEMP
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
-template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivial_v
+template <class _Tp>
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivial_v
     = is_trivial<_Tp>::value;
 #endif
 
@@ -4622,10 +4688,12 @@ template <class _Tp>
 constexpr bool is_swappable_v = is_swappable<_Tp>::value;
 
 template <class _Tp, class _Up>
-constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_nothrow_swappable_with_v
+    = is_nothrow_swappable_with<_Tp, _Up>::value;
 
 template <class _Tp>
-constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_nothrow_swappable_v
+    = is_nothrow_swappable<_Tp>::value;
 
 #endif // _LIBCPP_STD_VER > 14
 
@@ -4742,15 +4810,21 @@ template <class...> using void_t = void;
 # ifndef _LIBCPP_HAS_NO_VARIADICS
 template <class... _Args>
 struct conjunction : __and_<_Args...> {};
-template<class... _Args> constexpr bool conjunction_v = conjunction<_Args...>::value;
+template<class... _Args>
+_LIBCPP_INLINE_VAR constexpr bool conjunction_v
+    = conjunction<_Args...>::value;
 
 template <class... _Args>
 struct disjunction : __or_<_Args...> {};
-template<class... _Args> constexpr bool disjunction_v = disjunction<_Args...>::value;
+template<class... _Args>
+_LIBCPP_INLINE_VAR constexpr bool disjunction_v
+    = disjunction<_Args...>::value;
 
 template <class _Tp>
 struct negation : __not_<_Tp> {};
-template<class _Tp> constexpr bool negation_v = negation<_Tp>::value;
+template<class _Tp>
+_LIBCPP_INLINE_VAR constexpr bool negation_v
+    = negation<_Tp>::value;
 # endif // _LIBCPP_HAS_NO_VARIADICS
 #endif  // _LIBCPP_STD_VER > 14
 

Modified: libcxx/trunk/include/utility
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/utility?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/utility (original)
+++ libcxx/trunk/include/utility Tue Jan  2 09:17:01 2018
@@ -99,7 +99,7 @@ void
 swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));
 
 struct piecewise_construct_t { };
-constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
+inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
 
 template <class T> class tuple_size;
 template <size_t I, class T> class tuple_element;
@@ -296,7 +296,7 @@ struct _LIBCPP_TEMPLATE_VIS piecewise_co
 #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_UTILITY)
 extern const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
 #else
-constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
+_LIBCPP_INLINE_VAR constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
 #endif
 
 #if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
@@ -904,30 +904,21 @@ _T1 exchange(_T1& __obj, _T2 && __new_va
 struct _LIBCPP_TYPE_VIS in_place_t {
     explicit in_place_t() = default;
 };
-#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES
-inline
-#endif
-constexpr in_place_t in_place{};
+_LIBCPP_INLINE_VAR 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>
-#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES
-inline
-#endif
-constexpr in_place_type_t<_Tp> in_place_type{};
+_LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{};
 
 template <size_t _Idx>
 struct _LIBCPP_TYPE_VIS in_place_index_t {
     explicit in_place_index_t() = default;
 };
 template <size_t _Idx>
-#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES
-inline
-#endif
-constexpr in_place_index_t<_Idx> in_place_index{};
+_LIBCPP_INLINE_VAR 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 {};

Modified: libcxx/trunk/include/variant
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/variant?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/include/variant (original)
+++ libcxx/trunk/include/variant Tue Jan  2 09:17:01 2018
@@ -76,7 +76,7 @@ namespace std {
   template <class T> struct variant_size; // undefined
 
   template <class T>
-  constexpr size_t variant_size_v = variant_size<T>::value;
+  inline constexpr size_t variant_size_v = variant_size<T>::value;
 
   template <class T> struct variant_size<const T>;
   template <class T> struct variant_size<volatile T>;
@@ -97,7 +97,7 @@ namespace std {
   template <size_t I, class... Types>
   struct variant_alternative<I, variant<Types...>>;
 
-  constexpr size_t variant_npos = -1;
+  inline constexpr size_t variant_npos = -1;
 
   // 20.7.4, value access
   template <class T, class... Types>
@@ -246,7 +246,7 @@ template <class _Tp>
 struct _LIBCPP_TEMPLATE_VIS variant_size;
 
 template <class _Tp>
-constexpr size_t variant_size_v = variant_size<_Tp>::value;
+_LIBCPP_INLINE_VAR constexpr size_t variant_size_v = variant_size<_Tp>::value;
 
 template <class _Tp>
 struct _LIBCPP_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};
@@ -286,7 +286,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_alte
   using type = __type_pack_element<_Ip, _Types...>;
 };
 
-constexpr size_t variant_npos = static_cast<size_t>(-1);
+_LIBCPP_INLINE_VAR constexpr size_t variant_npos = static_cast<size_t>(-1);
 
 constexpr int __choose_index_type(unsigned int __num_elem) {
   if (__num_elem < std::numeric_limits<unsigned char>::max())

Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=321658&r1=321657&r2=321658&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Tue Jan  2 09:17:01 2018
@@ -161,7 +161,7 @@
 	<tr><td><a href="https://wg21.link/P0574R1">P0574R1</a></td><td>LWG</td><td>Algorithm Complexity Constraints and Parallel Overloads</td><td>Kona</td><td></td><td></td></tr>
 	<tr><td><a href="https://wg21.link/P0599R1">P0599R1</a></td><td>LWG</td><td>noexcept for hash functions</td><td>Kona</td><td>Complete</td><td>5.0</td></tr>
 	<tr><td><a href="https://wg21.link/P0604R0">P0604R0</a></td><td>LWG</td><td>Resolving GB 55, US 84, US 85, US 86</td><td>Kona</td><td></td><td></td></tr>
-	<tr><td><a href="https://wg21.link/P0607R0">P0607R0</a></td><td>LWG</td><td>Inline Variables for the Standard Library</td><td>Kona</td><td></td><td></td></tr>
+	<tr><td><a href="https://wg21.link/P0607R0">P0607R0</a></td><td>LWG</td><td>Inline Variables for the Standard Library</td><td>Kona</td><td>In Progress</td><td>6.0</td></tr>
 	<tr><td><a href="https://wg21.link/P0618R0">P0618R0</a></td><td>LWG</td><td>Deprecating <codecvt></td><td>Kona</td><td></td><td></td></tr>
 	<tr><td><a href="https://wg21.link/P0623R0">P0623R0</a></td><td>LWG</td><td>Final C++17 Parallel Algorithms Fixes</td><td>Kona</td><td></td><td></td></tr>
   	<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
@@ -171,6 +171,8 @@
 <!--  	<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr> -->
   </table>
 
+<p><i>The parts of P0607 that are not done are for <tt>has_unique_object_representations_v</tt>, <tt>is_callable_v</tt> and <tt>is_nothrow_callable_v</tt>, plus the <regex> bits.</i></p>
+
 <p><i>[ Note: "Nothing to do" means that no library changes were needed to implement this change -- end note]</i></p>
 
   <h3>Library Working group Issues Status</h3>




More information about the cfe-commits mailing list