summaryrefslogtreecommitdiff
path: root/include/type_traits
diff options
context:
space:
mode:
Diffstat (limited to 'include/type_traits')
-rw-r--r--include/type_traits410
1 files changed, 255 insertions, 155 deletions
diff --git a/include/type_traits b/include/type_traits
index 60b5dec5b839..7a6c992930e4 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -132,6 +132,8 @@ namespace std
template <class T> struct has_virtual_destructor;
+ template<class T> struct has_unique_object_representations; // C++17
+
// Relationships between types:
template <class T, class U> struct is_same;
template <class Base, class Derived> struct is_base_of;
@@ -223,173 +225,175 @@ 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
+ template<class T> inline constexpr bool has_unique_object_representations_v // C++17
+ = has_unique_object_representations<T>::value;
// 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 +623,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const : public fa
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 +634,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile : pub
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 +672,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_void
: 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 +690,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_null_pointer
: 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 +725,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_integral
: 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 +741,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_floating_point
: 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 +756,8 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]>
: 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 +770,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pointer
: 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 +792,16 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public tr
#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 +820,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union
#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 +846,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class
#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 +857,8 @@ template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same :
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 +888,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_function
: 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 +916,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
: 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 +930,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_pointer
: 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 +942,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
!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 +971,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum
#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 +983,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_arithmetic
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 +996,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_fundamental
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 +1013,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_scalar
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 +1027,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_object
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 +1038,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_compound
: 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 +1238,8 @@ template <class _Tp> struct __libcpp_is_signed<_Tp, false> : public false_type {
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 +1259,8 @@ template <class _Tp> struct __libcpp_is_unsigned<_Tp, false> : public false_type
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 +1274,8 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]>
: 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 +1293,8 @@ template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS exten
: 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 +1366,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract
: 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 +1387,8 @@ is_final : public integral_constant<bool, __is_final(_Tp)> {};
#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 +1400,8 @@ is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {};
#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 +1442,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 +1533,8 @@ template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
#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 +1570,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_empty : public __libcpp_empt
#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 +1596,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_polymorphic
#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,17 +1616,35 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
#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
+// has_unique_object_representations
+
+#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS)
+
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations
+ : public integral_constant<bool,
+ __has_unique_object_representations(remove_cv_t<remove_all_extents_t<_Tp>>)> {};
+
+#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;
+#endif
+
+#endif
+
// alignment_of
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS alignment_of
: 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 +2183,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 +2195,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
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 +2211,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_move_assignable
#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 +2275,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 +3321,8 @@ struct __is_constructible2_imp<false, _Ap[], _A0, _A1>
#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 +3334,8 @@ struct _LIBCPP_TEMPLATE_VIS is_default_constructible
{};
#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 +3347,8 @@ struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
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 +3364,8 @@ struct _LIBCPP_TEMPLATE_VIS is_move_constructible
{};
#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 +3497,8 @@ struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&,
#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 +3509,8 @@ 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_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 +3521,8 @@ 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_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 +3537,8 @@ 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_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 +3581,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 +3593,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
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 +3610,8 @@ 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_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 +3637,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]
#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 +3803,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&,
#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 +3815,8 @@ 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_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 +3827,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
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 +3843,8 @@ 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_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 +3917,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 +3929,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
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 +3946,8 @@ 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_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 +4013,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]>
#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 +4036,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
#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 +4053,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_literal_type
{};
#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 +4069,8 @@ 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_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 +4087,8 @@ 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_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 +4104,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial
{};
#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
@@ -4457,12 +4543,14 @@ struct _LIBCPP_TEMPLATE_VIS is_invocable_r
: integral_constant<bool, __invokable_r<_Ret, _Fn, _Args...>::value> {};
template <class _Fn, class ..._Args>
-constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_invocable_v
+ = is_invocable<_Fn, _Args...>::value;
template <class _Ret, class _Fn, class ..._Args>
-constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_invocable_r_v
+ = is_invocable_r<_Ret, _Fn, _Args...>::value;
-// is_nothrow_callable
+// is_nothrow_invocable
template <class _Fn, class ..._Args>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable
@@ -4473,10 +4561,12 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r
: integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};
template <class _Fn, class ..._Args>
-constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_v
+ = is_nothrow_invocable<_Fn, _Args...>::value;
template <class _Ret, class _Fn, class ..._Args>
-constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_r_v
+ = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
#endif // _LIBCPP_STD_VER > 14
@@ -4616,16 +4706,20 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
};
template <class _Tp, class _Up>
-constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;
+_LIBCPP_INLINE_VAR constexpr bool is_swappable_with_v
+ = is_swappable_with<_Tp, _Up>::value;
template <class _Tp>
-constexpr bool is_swappable_v = is_swappable<_Tp>::value;
+_LIBCPP_INLINE_VAR 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 +4836,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