[libcxx-commits] [libcxx] [libc++] Use template variables in a bunch of places instead of class templates (PR #139518)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 31 06:16:18 PDT 2025
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/139518
>From 015399fbe742d4d88be8020c4a8e0d67a1b9d15f Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Mon, 12 May 2025 08:06:45 +0200
Subject: [PATCH] [libc++] Use template variables in a bunch of places instead
of class templates
---
libcxx/include/__algorithm/equal.h | 4 +-
libcxx/include/__algorithm/equal_range.h | 2 +-
libcxx/include/__algorithm/find.h | 4 +-
libcxx/include/__algorithm/includes.h | 2 +-
libcxx/include/__algorithm/is_permutation.h | 4 +-
.../__algorithm/lexicographical_compare.h | 4 +-
libcxx/include/__algorithm/lower_bound.h | 2 +-
libcxx/include/__algorithm/max_element.h | 2 +-
libcxx/include/__algorithm/min_element.h | 2 +-
libcxx/include/__algorithm/minmax.h | 2 +-
libcxx/include/__algorithm/minmax_element.h | 2 +-
libcxx/include/__algorithm/mismatch.h | 2 +-
.../include/__algorithm/partial_sort_copy.h | 4 +-
libcxx/include/__algorithm/search.h | 2 +-
libcxx/include/__algorithm/search_n.h | 2 +-
libcxx/include/__algorithm/upper_bound.h | 2 +-
libcxx/include/__expected/expected.h | 46 +-
libcxx/include/__expected/unexpected.h | 9 +-
libcxx/include/__functional/bind.h | 28 +-
libcxx/include/__hash_table | 27 +-
libcxx/include/__mdspan/extents.h | 7 +-
libcxx/include/__mdspan/layout_left.h | 2 +-
libcxx/include/__mdspan/layout_right.h | 2 +-
libcxx/include/__mdspan/layout_stride.h | 2 +-
libcxx/include/__memory/shared_ptr.h | 17 +-
.../include/__random/discard_block_engine.h | 9 +-
.../__random/independent_bits_engine.h | 4 +-
libcxx/include/__random/is_seed_sequence.h | 6 +-
.../__random/linear_congruential_engine.h | 4 +-
.../__random/mersenne_twister_engine.h | 4 +-
.../include/__random/shuffle_order_engine.h | 9 +-
.../__random/subtract_with_carry_engine.h | 4 +-
.../include/__string/constexpr_c_functions.h | 7 +-
libcxx/include/__type_traits/invoke.h | 12 +-
libcxx/include/__type_traits/is_callable.h | 2 +-
.../__type_traits/is_core_convertible.h | 4 -
.../__type_traits/is_equality_comparable.h | 36 +-
.../__type_traits/is_reference_wrapper.h | 8 +-
libcxx/include/__utility/in_place.h | 14 +-
.../include/__utility/is_pointer_in_range.h | 10 +-
libcxx/include/any | 8 +-
libcxx/include/cwchar | 2 +-
libcxx/include/experimental/propagate_const | 18 +-
libcxx/include/optional | 24 +-
libcxx/include/span | 6 +-
libcxx/include/valarray | 424 ++++++++----------
libcxx/include/variant | 6 +-
.../type_traits/is_callable.compile.pass.cpp | 13 +-
.../is_trivially_comparable.compile.pass.cpp | 50 +--
.../utility/__is_inplace_index.pass.cpp | 28 +-
.../utility/__is_inplace_type.pass.cpp | 28 +-
51 files changed, 422 insertions(+), 500 deletions(-)
diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h
index 5a8c9504ede1d..22f5fe6282b1d 100644
--- a/libcxx/include/__algorithm/equal.h
+++ b/libcxx/include/__algorithm/equal.h
@@ -184,7 +184,7 @@ template <class _Tp,
class _Up,
class _BinaryPredicate,
__enable_if_t<__desugars_to_v<__equal_tag, _BinaryPredicate, _Tp, _Up> && !is_volatile<_Tp>::value &&
- !is_volatile<_Up>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
+ !is_volatile<_Up>::value && __is_trivially_equality_comparable_v<_Tp, _Up>,
int> = 0>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal_iter_impl(_Tp* __first1, _Tp* __last1, _Up* __first2, _BinaryPredicate&) {
@@ -225,7 +225,7 @@ template <class _Tp,
class _Proj2,
__enable_if_t<__desugars_to_v<__equal_tag, _Pred, _Tp, _Up> && __is_identity<_Proj1>::value &&
__is_identity<_Proj2>::value && !is_volatile<_Tp>::value && !is_volatile<_Up>::value &&
- __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
+ __is_trivially_equality_comparable_v<_Tp, _Up>,
int> = 0>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal_impl(_Tp* __first1, _Tp* __last1, _Up* __first2, _Up*, _Pred&, _Proj1&, _Proj2&) {
diff --git a/libcxx/include/__algorithm/equal_range.h b/libcxx/include/__algorithm/equal_range.h
index ff6f4f2225c7a..5e1a5a5ffeb06 100644
--- a/libcxx/include/__algorithm/equal_range.h
+++ b/libcxx/include/__algorithm/equal_range.h
@@ -58,7 +58,7 @@ __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
template <class _ForwardIterator, class _Tp, class _Compare>
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
- static_assert(__is_callable<_Compare&, decltype(*__first), const _Tp&>::value, "The comparator has to be callable");
+ static_assert(__is_callable_v<_Compare&, decltype(*__first), const _Tp&>, "The comparator has to be callable");
static_assert(is_copy_constructible<_ForwardIterator>::value, "Iterator has to be copy constructible");
return std::__equal_range<_ClassicAlgPolicy>(
std::move(__first),
diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index 10379d7074c3a..4541473f5470e 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -118,7 +118,7 @@ template <
class _Tp,
class _Up,
class _Proj,
- __enable_if_t<__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value, int> = 0>
+ __enable_if_t<__is_identity<_Proj>::value && __is_trivially_equality_comparable_v<_Tp, _Up>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
if constexpr (sizeof(_Tp) == 1) {
if (auto __ret = std::__constexpr_memchr(__first, __value, __last - __first))
@@ -149,7 +149,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _T
template <class _Tp,
class _Up,
class _Proj,
- __enable_if_t<__is_identity<_Proj>::value && !__libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
+ __enable_if_t<__is_identity<_Proj>::value && !__is_trivially_equality_comparable_v<_Tp, _Up> &&
is_integral<_Tp>::value && is_integral<_Up>::value &&
is_signed<_Tp>::value == is_signed<_Up>::value,
int> = 0>
diff --git a/libcxx/include/__algorithm/includes.h b/libcxx/include/__algorithm/includes.h
index bc6c6579693b1..f68a764f7c1da 100644
--- a/libcxx/include/__algorithm/includes.h
+++ b/libcxx/include/__algorithm/includes.h
@@ -53,7 +53,7 @@ includes(_InputIterator1 __first1,
_InputIterator2 __last2,
_Compare __comp) {
static_assert(
- __is_callable<_Compare&, decltype(*__first1), decltype(*__first2)>::value, "The comparator has to be callable");
+ __is_callable_v<_Compare&, decltype(*__first1), decltype(*__first2)>, "The comparator has to be callable");
return std::__includes(
std::move(__first1),
diff --git a/libcxx/include/__algorithm/is_permutation.h b/libcxx/include/__algorithm/is_permutation.h
index 86f469c2799c5..4282d11db82fd 100644
--- a/libcxx/include/__algorithm/is_permutation.h
+++ b/libcxx/include/__algorithm/is_permutation.h
@@ -250,7 +250,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool is_permutation(
_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred) {
- static_assert(__is_callable<_BinaryPredicate&, decltype(*__first1), decltype(*__first2)>::value,
+ static_assert(__is_callable_v<_BinaryPredicate&, decltype(*__first1), decltype(*__first2)>,
"The comparator has to be callable");
return std::__is_permutation<_ClassicAlgPolicy>(std::move(__first1), std::move(__last1), std::move(__first2), __pred);
@@ -287,7 +287,7 @@ template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredica
_ForwardIterator2 __first2,
_ForwardIterator2 __last2,
_BinaryPredicate __pred) {
- static_assert(__is_callable<_BinaryPredicate&, decltype(*__first1), decltype(*__first2)>::value,
+ static_assert(__is_callable_v<_BinaryPredicate&, decltype(*__first1), decltype(*__first2)>,
"The comparator has to be callable");
return std::__is_permutation<_ClassicAlgPolicy>(
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index ebe7e3b56a292..a12add69d4d2c 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -66,8 +66,8 @@ template <class _Tp,
class _Proj2,
class _Comp,
__enable_if_t<__desugars_to_v<__totally_ordered_less_tag, _Comp, _Tp, _Tp> && !is_volatile<_Tp>::value &&
- __libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value &&
- __is_identity<_Proj1>::value && __is_identity<_Proj2>::value,
+ __is_trivially_equality_comparable_v<_Tp, _Tp> && __is_identity<_Proj1>::value &&
+ __is_identity<_Proj2>::value,
int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__lexicographical_compare(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Tp* __last2, _Comp&, _Proj1&, _Proj2&) {
diff --git a/libcxx/include/__algorithm/lower_bound.h b/libcxx/include/__algorithm/lower_bound.h
index 4fba6748e6d71..639183568e039 100644
--- a/libcxx/include/__algorithm/lower_bound.h
+++ b/libcxx/include/__algorithm/lower_bound.h
@@ -92,7 +92,7 @@ __lower_bound(_ForwardIterator __first, _Sent __last, const _Type& __value, _Com
template <class _ForwardIterator, class _Tp, class _Compare>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
- static_assert(__is_callable<_Compare&, decltype(*__first), const _Tp&>::value, "The comparator has to be callable");
+ static_assert(__is_callable_v<_Compare&, decltype(*__first), const _Tp&>, "The comparator has to be callable");
auto __proj = std::__identity();
return std::__lower_bound<_ClassicAlgPolicy>(__first, __last, __value, __comp, __proj);
}
diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h
index 929f337fc10ad..d66b170b760f2 100644
--- a/libcxx/include/__algorithm/max_element.h
+++ b/libcxx/include/__algorithm/max_element.h
@@ -39,7 +39,7 @@ template <class _ForwardIterator, class _Compare>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(
- __is_callable<_Compare&, decltype(*__first), decltype(*__first)>::value, "The comparator has to be callable");
+ __is_callable_v<_Compare&, decltype(*__first), decltype(*__first)>, "The comparator has to be callable");
return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
}
diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h
index fdab63aefec7e..53c561dfa214d 100644
--- a/libcxx/include/__algorithm/min_element.h
+++ b/libcxx/include/__algorithm/min_element.h
@@ -53,7 +53,7 @@ min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
static_assert(
__has_forward_iterator_category<_ForwardIterator>::value, "std::min_element requires a ForwardIterator");
static_assert(
- __is_callable<_Compare&, decltype(*__first), decltype(*__first)>::value, "The comparator has to be callable");
+ __is_callable_v<_Compare&, decltype(*__first), decltype(*__first)>, "The comparator has to be callable");
return std::__min_element<__comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp);
}
diff --git a/libcxx/include/__algorithm/minmax.h b/libcxx/include/__algorithm/minmax.h
index de0bec0ef72fc..5b603d9223555 100644
--- a/libcxx/include/__algorithm/minmax.h
+++ b/libcxx/include/__algorithm/minmax.h
@@ -40,7 +40,7 @@ minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __
template <class _Tp, class _Compare>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Tp, _Tp>
minmax(initializer_list<_Tp> __t, _Compare __comp) {
- static_assert(__is_callable<_Compare&, _Tp, _Tp>::value, "The comparator has to be callable");
+ static_assert(__is_callable_v<_Compare&, _Tp, _Tp>, "The comparator has to be callable");
__identity __proj;
auto __ret = std::__minmax_element_impl(__t.begin(), __t.end(), __comp, __proj);
return pair<_Tp, _Tp>(*__ret.first, *__ret.second);
diff --git a/libcxx/include/__algorithm/minmax_element.h b/libcxx/include/__algorithm/minmax_element.h
index dc0c3a818cd57..db135aab8950f 100644
--- a/libcxx/include/__algorithm/minmax_element.h
+++ b/libcxx/include/__algorithm/minmax_element.h
@@ -84,7 +84,7 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
static_assert(
__has_forward_iterator_category<_ForwardIterator>::value, "std::minmax_element requires a ForwardIterator");
static_assert(
- __is_callable<_Compare&, decltype(*__first), decltype(*__first)>::value, "The comparator has to be callable");
+ __is_callable_v<_Compare&, decltype(*__first), decltype(*__first)>, "The comparator has to be callable");
auto __proj = __identity();
return std::__minmax_element_impl(__first, __last, __comp, __proj);
}
diff --git a/libcxx/include/__algorithm/mismatch.h b/libcxx/include/__algorithm/mismatch.h
index 749c701974f07..7111cd9398838 100644
--- a/libcxx/include/__algorithm/mismatch.h
+++ b/libcxx/include/__algorithm/mismatch.h
@@ -136,7 +136,7 @@ template <class _Tp,
class _Proj2,
__enable_if_t<!is_integral<_Tp>::value && __desugars_to_v<__equal_tag, _Pred, _Tp, _Tp> &&
__is_identity<_Proj1>::value && __is_identity<_Proj2>::value &&
- __can_map_to_integer_v<_Tp> && __libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
+ __can_map_to_integer_v<_Tp> && __is_trivially_equality_comparable_v<_Tp, _Tp>,
int> = 0>
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Tp*, _Tp*>
__mismatch(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
diff --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h
index 2230dfc9cc4ad..2daa3faa53258 100644
--- a/libcxx/include/__algorithm/partial_sort_copy.h
+++ b/libcxx/include/__algorithm/partial_sort_copy.h
@@ -76,8 +76,8 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
_RandomAccessIterator __result_first,
_RandomAccessIterator __result_last,
_Compare __comp) {
- static_assert(__is_callable<_Compare&, decltype(*__first), decltype(*__result_first)>::value,
- "The comparator has to be callable");
+ static_assert(
+ __is_callable_v<_Compare&, decltype(*__first), decltype(*__result_first)>, "The comparator has to be callable");
auto __result = std::__partial_sort_copy<_ClassicAlgPolicy>(
__first,
diff --git a/libcxx/include/__algorithm/search.h b/libcxx/include/__algorithm/search.h
index 161fd39d861a6..5393cebcc8c6c 100644
--- a/libcxx/include/__algorithm/search.h
+++ b/libcxx/include/__algorithm/search.h
@@ -166,7 +166,7 @@ search(_ForwardIterator1 __first1,
_ForwardIterator2 __first2,
_ForwardIterator2 __last2,
_BinaryPredicate __pred) {
- static_assert(__is_callable<_BinaryPredicate&, decltype(*__first1), decltype(*__first2)>::value,
+ static_assert(__is_callable_v<_BinaryPredicate&, decltype(*__first1), decltype(*__first2)>,
"The comparator has to be callable");
auto __proj = __identity();
return std::__search_impl(__first1, __last1, __first2, __last2, __pred, __proj, __proj).first;
diff --git a/libcxx/include/__algorithm/search_n.h b/libcxx/include/__algorithm/search_n.h
index 38474e1b2379d..8517f23c97c09 100644
--- a/libcxx/include/__algorithm/search_n.h
+++ b/libcxx/include/__algorithm/search_n.h
@@ -140,7 +140,7 @@ template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator search_n(
_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value, _BinaryPredicate __pred) {
static_assert(
- __is_callable<_BinaryPredicate&, decltype(*__first), const _Tp&>::value, "The comparator has to be callable");
+ __is_callable_v<_BinaryPredicate&, decltype(*__first), const _Tp&>, "The comparator has to be callable");
auto __proj = __identity();
return std::__search_n_impl(__first, __last, std::__convert_to_integral(__count), __value, __pred, __proj).first;
}
diff --git a/libcxx/include/__algorithm/upper_bound.h b/libcxx/include/__algorithm/upper_bound.h
index d77286c9e5af5..deb45a23816ed 100644
--- a/libcxx/include/__algorithm/upper_bound.h
+++ b/libcxx/include/__algorithm/upper_bound.h
@@ -52,7 +52,7 @@ __upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
template <class _ForwardIterator, class _Tp, class _Compare>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
- static_assert(__is_callable<_Compare&, const _Tp&, decltype(*__first)>::value, "The comparator has to be callable");
+ static_assert(__is_callable_v<_Compare&, const _Tp&, decltype(*__first)>, "The comparator has to be callable");
static_assert(is_copy_constructible<_ForwardIterator>::value, "Iterator has to be copy constructible");
return std::__upper_bound<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), __value, std::move(__comp), std::__identity());
diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h
index 8b3eeebd38ae7..b08b872a5d279 100644
--- a/libcxx/include/__expected/expected.h
+++ b/libcxx/include/__expected/expected.h
@@ -65,10 +65,10 @@ template <class _Tp, class _Err>
class expected;
template <class _Tp>
-struct __is_std_expected : false_type {};
+inline constexpr bool __is_std_expected_v = false;
template <class _Tp, class _Err>
-struct __is_std_expected<expected<_Tp, _Err>> : true_type {};
+inline constexpr bool __is_std_expected_v<expected<_Tp, _Err>> = true;
struct __expected_construct_in_place_from_invoke_tag {};
struct __expected_construct_unexpected_from_invoke_tag {};
@@ -450,7 +450,7 @@ class __expected_base {
template <class _Tp, class _Err>
class expected : private __expected_base<_Tp, _Err> {
static_assert(!is_reference_v<_Tp> && !is_function_v<_Tp> && !is_same_v<remove_cv_t<_Tp>, in_place_t> &&
- !is_same_v<remove_cv_t<_Tp>, unexpect_t> && !__is_std_unexpected<remove_cv_t<_Tp>>::value &&
+ !is_same_v<remove_cv_t<_Tp>, unexpect_t> && !__is_std_unexpected_v<remove_cv_t<_Tp>> &&
__valid_std_unexpected<_Err>::value,
"[expected.object.general] A program that instantiates the definition of template expected<T, E> for a "
"reference type, a function type, or for possibly cv-qualified types in_place_t, unexpect_t, or a "
@@ -558,8 +558,8 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Up = remove_cv_t<_Tp>>
requires(!is_same_v<remove_cvref_t<_Up>, in_place_t> && !is_same_v<expected, remove_cvref_t<_Up>> &&
!is_same_v<remove_cvref_t<_Up>, unexpect_t> && is_constructible_v<_Tp, _Up> &&
- !__is_std_unexpected<remove_cvref_t<_Up>>::value &&
- (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_expected<remove_cvref_t<_Up>>::value))
+ !__is_std_unexpected_v<remove_cvref_t<_Up>> &&
+ (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_unexpected_v<remove_cvref_t<_Up>>))
_LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp>)
expected(_Up&& __u) noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened
: __base(in_place, std::forward<_Up>(__u)) {}
@@ -671,7 +671,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Up = remove_cv_t<_Tp>>
_LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(_Up&& __v)
- requires(!is_same_v<expected, remove_cvref_t<_Up>> && !__is_std_unexpected<remove_cvref_t<_Up>>::value &&
+ requires(!is_same_v<expected, remove_cvref_t<_Up>> && !__is_std_unexpected_v<remove_cvref_t<_Up>> &&
is_constructible_v<_Tp, _Up> && is_assignable_v<_Tp&, _Up> &&
(is_nothrow_constructible_v<_Tp, _Up> || is_nothrow_move_constructible_v<_Tp> ||
is_nothrow_move_constructible_v<_Err>))
@@ -924,7 +924,7 @@ class expected : private __expected_base<_Tp, _Err> {
requires is_constructible_v<_Err, _Err&>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) & {
using _Up = remove_cvref_t<invoke_result_t<_Func, _Tp&>>;
- static_assert(__is_std_expected<_Up>::value, "The result of f(value()) must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Up>, "The result of f(value()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Up::error_type, _Err>,
"The result of f(value()) must have the same error_type as this expected");
if (has_value()) {
@@ -937,7 +937,7 @@ class expected : private __expected_base<_Tp, _Err> {
requires is_constructible_v<_Err, const _Err&>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const& {
using _Up = remove_cvref_t<invoke_result_t<_Func, const _Tp&>>;
- static_assert(__is_std_expected<_Up>::value, "The result of f(value()) must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Up>, "The result of f(value()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Up::error_type, _Err>,
"The result of f(value()) must have the same error_type as this expected");
if (has_value()) {
@@ -951,7 +951,7 @@ class expected : private __expected_base<_Tp, _Err> {
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) && {
using _Up = remove_cvref_t<invoke_result_t<_Func, _Tp&&>>;
static_assert(
- __is_std_expected<_Up>::value, "The result of f(std::move(value())) must be a specialization of std::expected");
+ __is_std_expected_v<_Up>, "The result of f(std::move(value())) must be a specialization of std::expected");
static_assert(is_same_v<typename _Up::error_type, _Err>,
"The result of f(std::move(value())) must have the same error_type as this expected");
if (has_value()) {
@@ -965,7 +965,7 @@ class expected : private __expected_base<_Tp, _Err> {
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const&& {
using _Up = remove_cvref_t<invoke_result_t<_Func, const _Tp&&>>;
static_assert(
- __is_std_expected<_Up>::value, "The result of f(std::move(value())) must be a specialization of std::expected");
+ __is_std_expected_v<_Up>, "The result of f(std::move(value())) must be a specialization of std::expected");
static_assert(is_same_v<typename _Up::error_type, _Err>,
"The result of f(std::move(value())) must have the same error_type as this expected");
if (has_value()) {
@@ -978,7 +978,7 @@ class expected : private __expected_base<_Tp, _Err> {
requires is_constructible_v<_Tp, _Tp&>
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) & {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&>>;
- static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Gp>, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(error()) must have the same value_type as this expected");
if (has_value()) {
@@ -991,7 +991,7 @@ class expected : private __expected_base<_Tp, _Err> {
requires is_constructible_v<_Tp, const _Tp&>
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&>>;
- static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Gp>, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(error()) must have the same value_type as this expected");
if (has_value()) {
@@ -1005,7 +1005,7 @@ class expected : private __expected_base<_Tp, _Err> {
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) && {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&&>>;
static_assert(
- __is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
+ __is_std_expected_v<_Gp>, "The result of f(std::move(error())) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(std::move(error())) must have the same value_type as this expected");
if (has_value()) {
@@ -1019,7 +1019,7 @@ class expected : private __expected_base<_Tp, _Err> {
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const&& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&&>>;
static_assert(
- __is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
+ __is_std_expected_v<_Gp>, "The result of f(std::move(error())) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(std::move(error())) must have the same value_type as this expected");
if (has_value()) {
@@ -1167,7 +1167,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _T2>
_LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const expected& __x, const _T2& __v)
# if _LIBCPP_STD_VER >= 26
- requires(!__is_std_expected<_T2>::value) && requires {
+ requires(!__is_std_expected_v<_T2>) && requires {
{ *__x == __v } -> __core_convertible_to<bool>;
}
# endif
@@ -1668,7 +1668,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
requires is_constructible_v<_Err, _Err&>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) & {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
- static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Up>, "The result of f() must be a specialization of std::expected");
static_assert(
is_same_v<typename _Up::error_type, _Err>, "The result of f() must have the same error_type as this expected");
if (has_value()) {
@@ -1681,7 +1681,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
requires is_constructible_v<_Err, const _Err&>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const& {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
- static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Up>, "The result of f() must be a specialization of std::expected");
static_assert(
is_same_v<typename _Up::error_type, _Err>, "The result of f() must have the same error_type as this expected");
if (has_value()) {
@@ -1694,7 +1694,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
requires is_constructible_v<_Err, _Err&&>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) && {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
- static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Up>, "The result of f() must be a specialization of std::expected");
static_assert(
is_same_v<typename _Up::error_type, _Err>, "The result of f() must have the same error_type as this expected");
if (has_value()) {
@@ -1707,7 +1707,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
requires is_constructible_v<_Err, const _Err&&>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const&& {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
- static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Up>, "The result of f() must be a specialization of std::expected");
static_assert(
is_same_v<typename _Up::error_type, _Err>, "The result of f() must have the same error_type as this expected");
if (has_value()) {
@@ -1719,7 +1719,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) & {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&>>;
- static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Gp>, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(error()) must have the same value_type as this expected");
if (has_value()) {
@@ -1731,7 +1731,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&>>;
- static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
+ static_assert(__is_std_expected_v<_Gp>, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(error()) must have the same value_type as this expected");
if (has_value()) {
@@ -1744,7 +1744,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) && {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&&>>;
static_assert(
- __is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
+ __is_std_expected_v<_Gp>, "The result of f(std::move(error())) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(std::move(error())) must have the same value_type as this expected");
if (has_value()) {
@@ -1757,7 +1757,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
_LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const&& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&&>>;
static_assert(
- __is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
+ __is_std_expected_v<_Gp>, "The result of f(std::move(error())) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
"The result of f(std::move(error())) must have the same value_type as this expected");
if (has_value()) {
diff --git a/libcxx/include/__expected/unexpected.h b/libcxx/include/__expected/unexpected.h
index 6904889b8c6b1..8cbaac43e12e3 100644
--- a/libcxx/include/__expected/unexpected.h
+++ b/libcxx/include/__expected/unexpected.h
@@ -17,6 +17,7 @@
#include <__type_traits/is_nothrow_constructible.h>
#include <__type_traits/is_object.h>
#include <__type_traits/is_same.h>
+#include <__type_traits/is_specialization.h>
#include <__type_traits/is_swappable.h>
#include <__type_traits/is_volatile.h>
#include <__type_traits/negation.h>
@@ -42,16 +43,16 @@ template <class _Err>
class unexpected;
template <class _Tp>
-struct __is_std_unexpected : false_type {};
+inline constexpr bool __is_std_unexpected_v = false;
-template <class _Err>
-struct __is_std_unexpected<unexpected<_Err>> : true_type {};
+template <class _Tp>
+inline constexpr bool __is_std_unexpected_v<unexpected<_Tp>> = true;
template <class _Tp>
using __valid_std_unexpected _LIBCPP_NODEBUG = _BoolConstant< //
is_object_v<_Tp> && //
!is_array_v<_Tp> && //
- !__is_std_unexpected<_Tp>::value && //
+ !__is_std_unexpected_v<_Tp> && //
!is_const_v<_Tp> && //
!is_volatile_v<_Tp> //
>;
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index def9e4c4ec7a9..a9bf97859909d 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -109,11 +109,11 @@ __mu(_Ti&, _Uj& __uj) {
return std::forward<typename tuple_element<__indx, _Uj>::type>(std::get<__indx>(__uj));
}
-template <class _Ti,
- class _Uj,
- __enable_if_t<!is_bind_expression<_Ti>::value && is_placeholder<_Ti>::value == 0 &&
- !__is_reference_wrapper<_Ti>::value,
- int> = 0>
+template <
+ class _Ti,
+ class _Uj,
+ __enable_if_t<!is_bind_expression<_Ti>::value && is_placeholder<_Ti>::value == 0 && !__is_reference_wrapper_v<_Ti>,
+ int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Ti& __mu(_Ti& __ti, _Uj&) {
return __ti;
}
@@ -155,27 +155,23 @@ template <class _Ti, class _TupleUj>
struct __mu_return
: public __mu_return_impl<
_Ti,
- __is_reference_wrapper<_Ti>::value,
+ __is_reference_wrapper_v<_Ti>,
is_bind_expression<_Ti>::value,
0 < is_placeholder<_Ti>::value && is_placeholder<_Ti>::value <= tuple_size<_TupleUj>::value,
_TupleUj> {};
template <class _Fp, class _BoundArgs, class _TupleUj>
-struct __is_valid_bind_return {
- static const bool value = false;
-};
+inline const bool __is_valid_bind_return_v = false;
template <class _Fp, class... _BoundArgs, class _TupleUj>
-struct __is_valid_bind_return<_Fp, tuple<_BoundArgs...>, _TupleUj> {
- static const bool value = __is_invocable_v<_Fp, typename __mu_return<_BoundArgs, _TupleUj>::type...>;
-};
+inline const bool __is_valid_bind_return_v<_Fp, tuple<_BoundArgs...>, _TupleUj> =
+ __is_invocable_v<_Fp, typename __mu_return<_BoundArgs, _TupleUj>::type...>;
template <class _Fp, class... _BoundArgs, class _TupleUj>
-struct __is_valid_bind_return<_Fp, const tuple<_BoundArgs...>, _TupleUj> {
- static const bool value = __is_invocable_v<_Fp, typename __mu_return<const _BoundArgs, _TupleUj>::type...>;
-};
+inline const bool __is_valid_bind_return_v<_Fp, const tuple<_BoundArgs...>, _TupleUj> =
+ __is_invocable_v<_Fp, typename __mu_return<const _BoundArgs, _TupleUj>::type...>;
-template <class _Fp, class _BoundArgs, class _TupleUj, bool = __is_valid_bind_return<_Fp, _BoundArgs, _TupleUj>::value>
+template <class _Fp, class _BoundArgs, class _TupleUj, bool = __is_valid_bind_return_v<_Fp, _BoundArgs, _TupleUj> >
struct __bind_return;
template <class _Fp, class... _BoundArgs, class _TupleUj>
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index e1897949a47e6..89896d04c17f9 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -38,6 +38,7 @@
#include <__type_traits/is_nothrow_constructible.h>
#include <__type_traits/is_reference.h>
#include <__type_traits/is_same.h>
+#include <__type_traits/is_specialization.h>
#include <__type_traits/is_swappable.h>
#include <__type_traits/remove_const.h>
#include <__type_traits/remove_cvref.h>
@@ -61,17 +62,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Key, class _Tp>
struct __hash_value_type;
-template <class _Tp>
-struct __is_hash_value_type_imp : false_type {};
-
-template <class _Key, class _Value>
-struct __is_hash_value_type_imp<__hash_value_type<_Key, _Value> > : true_type {};
-
template <class... _Args>
-struct __is_hash_value_type : false_type {};
+inline const bool __is_hash_value_type_v = false;
template <class _One>
-struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__remove_cvref_t<_One> > {};
+inline const bool __is_hash_value_type_v<_One> = __is_specialization_v<__remove_cvref_t<_One>, __hash_value_type>;
_LIBCPP_EXPORTED_FROM_ABI size_t __next_prime(size_t __n);
@@ -839,28 +834,28 @@ public:
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);
- template <class _ValueT = _Tp, __enable_if_t<__is_hash_value_type<_ValueT>::value, int> = 0>
+ template <class _ValueT = _Tp, __enable_if_t<__is_hash_value_type_v<_ValueT>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __insert_unique_from_orphaned_node(value_type&& __value) {
__node_holder __h = __construct_node(const_cast<key_type&&>(__value.first), std::move(__value.second));
__node_insert_unique(__h.get());
__h.release();
}
- template <class _ValueT = _Tp, __enable_if_t<!__is_hash_value_type<_ValueT>::value, int> = 0>
+ template <class _ValueT = _Tp, __enable_if_t<!__is_hash_value_type_v<_ValueT>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __insert_unique_from_orphaned_node(value_type&& __value) {
__node_holder __h = __construct_node(std::move(__value));
__node_insert_unique(__h.get());
__h.release();
}
- template <class _ValueT = _Tp, __enable_if_t<__is_hash_value_type<_ValueT>::value, int> = 0>
+ template <class _ValueT = _Tp, __enable_if_t<__is_hash_value_type_v<_ValueT>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __insert_multi_from_orphaned_node(value_type&& __value) {
__node_holder __h = __construct_node(const_cast<key_type&&>(__value.first), std::move(__value.second));
__node_insert_multi(__h.get());
__h.release();
}
- template <class _ValueT = _Tp, __enable_if_t<!__is_hash_value_type<_ValueT>::value, int> = 0>
+ template <class _ValueT = _Tp, __enable_if_t<!__is_hash_value_type_v<_ValueT>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __insert_multi_from_orphaned_node(value_type&& __value) {
__node_holder __h = __construct_node(std::move(__value));
__node_insert_multi(__h.get());
@@ -1042,7 +1037,7 @@ private:
_LIBCPP_HIDE_FROM_ABI __next_pointer __detach() _NOEXCEPT;
- template <class _From, class _ValueT = _Tp, __enable_if_t<__is_hash_value_type<_ValueT>::value, int> = 0>
+ template <class _From, class _ValueT = _Tp, __enable_if_t<__is_hash_value_type_v<_ValueT>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __assign_value(__get_hash_node_value_type_t<_Tp>& __lhs, _From&& __rhs) {
// This is technically UB, since the object was constructed as `const`.
// Clang doesn't optimize on this currently though.
@@ -1050,7 +1045,7 @@ private:
__lhs.second = std::forward<_From>(__rhs).second;
}
- template <class _From, class _ValueT = _Tp, __enable_if_t<!__is_hash_value_type<_ValueT>::value, int> = 0>
+ template <class _From, class _ValueT = _Tp, __enable_if_t<!__is_hash_value_type_v<_ValueT>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __assign_value(_Tp& __lhs, _From&& __rhs) {
__lhs = std::forward<_From>(__rhs);
}
@@ -1818,7 +1813,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class... _Args>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&&... __args) {
- static_assert(!__is_hash_value_type<_Args...>::value, "Construct cannot be called with a hash value type");
+ static_assert(!__is_hash_value_type_v<_Args...>, "Construct cannot be called with a hash value type");
__node_allocator& __na = __node_alloc();
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
@@ -1839,7 +1834,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class... _Args>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(size_t __hash, _Args&&... __args) {
- static_assert(!__is_hash_value_type<_Args...>::value, "Construct cannot be called with a hash value type");
+ static_assert(!__is_hash_value_type_v<_Args...>, "Construct cannot be called with a hash value type");
__node_allocator& __na = __node_alloc();
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
std::__construct_at(std::addressof(*__h), /* hash = */ __hash, __na, std::forward<_Args>(__args)...);
diff --git a/libcxx/include/__mdspan/extents.h b/libcxx/include/__mdspan/extents.h
index 99b54badf893c..bed086d62d379 100644
--- a/libcxx/include/__mdspan/extents.h
+++ b/libcxx/include/__mdspan/extents.h
@@ -476,13 +476,10 @@ namespace __mdspan_detail {
// Helper type traits for identifying a class as extents.
template <class _Tp>
-struct __is_extents : false_type {};
+inline constexpr bool __is_extents_v = false;
template <class _IndexType, size_t... _ExtentsPack>
-struct __is_extents<extents<_IndexType, _ExtentsPack...>> : true_type {};
-
-template <class _Tp>
-inline constexpr bool __is_extents_v = __is_extents<_Tp>::value;
+inline constexpr bool __is_extents_v<extents<_IndexType, _ExtentsPack...>> = true;
// Function to check whether a set of indices are a multidimensional
// index into extents. This is a word of power in the C++ standard
diff --git a/libcxx/include/__mdspan/layout_left.h b/libcxx/include/__mdspan/layout_left.h
index 2f515afb6c860..86c0ff99a3731 100644
--- a/libcxx/include/__mdspan/layout_left.h
+++ b/libcxx/include/__mdspan/layout_left.h
@@ -43,7 +43,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Extents>
class layout_left::mapping {
public:
- static_assert(__mdspan_detail::__is_extents<_Extents>::value,
+ static_assert(__mdspan_detail::__is_extents_v<_Extents>,
"layout_left::mapping template argument must be a specialization of extents.");
using extents_type = _Extents;
diff --git a/libcxx/include/__mdspan/layout_right.h b/libcxx/include/__mdspan/layout_right.h
index ccfbd23e28ad7..314be43fd0e29 100644
--- a/libcxx/include/__mdspan/layout_right.h
+++ b/libcxx/include/__mdspan/layout_right.h
@@ -43,7 +43,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Extents>
class layout_right::mapping {
public:
- static_assert(__mdspan_detail::__is_extents<_Extents>::value,
+ static_assert(__mdspan_detail::__is_extents_v<_Extents>,
"layout_right::mapping template argument must be a specialization of extents.");
using extents_type = _Extents;
diff --git a/libcxx/include/__mdspan/layout_stride.h b/libcxx/include/__mdspan/layout_stride.h
index 9d77d71bc3598..91fef91f4848f 100644
--- a/libcxx/include/__mdspan/layout_stride.h
+++ b/libcxx/include/__mdspan/layout_stride.h
@@ -68,7 +68,7 @@ concept __layout_mapping_alike = requires {
template <class _Extents>
class layout_stride::mapping {
public:
- static_assert(__mdspan_detail::__is_extents<_Extents>::value,
+ static_assert(__mdspan_detail::__is_extents_v<_Extents>,
"layout_stride::mapping template argument must be a specialization of extents.");
using extents_type = _Extents;
diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index e90db587d2836..3d640a2b5e945 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -270,14 +270,14 @@ struct __raw_pointer_compatible_with : is_convertible<_Yp*, _Tp*> {};
#endif // _LIBCPP_STD_VER >= 17
template <class _Ptr, class = void>
-struct __is_deletable : false_type {};
+inline const bool __is_deletable_v = false;
template <class _Ptr>
-struct __is_deletable<_Ptr, decltype(delete std::declval<_Ptr>())> : true_type {};
+inline const bool __is_deletable_v<_Ptr, decltype(delete std::declval<_Ptr>())> = true;
template <class _Ptr, class = void>
-struct __is_array_deletable : false_type {};
+inline const bool __is_array_deletable_v = false;
template <class _Ptr>
-struct __is_array_deletable<_Ptr, decltype(delete[] std::declval<_Ptr>())> : true_type {};
+inline const bool __is_array_deletable_v<_Ptr, decltype(delete[] std::declval<_Ptr>())> = true;
template <class _Dp, class _Pt, class = decltype(std::declval<_Dp>()(std::declval<_Pt>()))>
true_type __well_formed_deleter_test(int);
@@ -332,16 +332,15 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI shared_ptr {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT : __ptr_(nullptr), __cntrl_(nullptr) {}
template <class _Yp,
- __enable_if_t< _And< __raw_pointer_compatible_with<_Yp, _Tp>
+ __enable_if_t<__raw_pointer_compatible_with<_Yp, _Tp>::value
// In C++03 we get errors when trying to do SFINAE with the
// delete operator, so we always pretend that it's deletable.
// The same happens on GCC.
#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_COMPILER_GCC)
- ,
- _If<is_array<_Tp>::value, __is_array_deletable<_Yp*>, __is_deletable<_Yp*> >
+ && (is_array<_Tp>::value ? __is_array_deletable_v<_Yp*> : __is_deletable_v<_Yp*>)
#endif
- >::value,
- int> = 0>
+ ,
+ int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit shared_ptr(_Yp* __p) : __ptr_(__p) {
unique_ptr<_Yp> __hold(__p);
typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
diff --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h
index 12d1ff318ccd2..a6e1997fc1c2d 100644
--- a/libcxx/include/__random/discard_block_engine.h
+++ b/libcxx/include/__random/discard_block_engine.h
@@ -64,10 +64,9 @@ class discard_block_engine {
_LIBCPP_HIDE_FROM_ABI explicit discard_block_engine(_Engine&& __e) : __e_(std::move(__e)), __n_(0) {}
#endif // _LIBCPP_CXX03_LANG
_LIBCPP_HIDE_FROM_ABI explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
- template <
- class _Sseq,
- __enable_if_t<__is_seed_sequence<_Sseq, discard_block_engine>::value && !is_convertible<_Sseq, _Engine>::value,
- int> = 0>
+ template <class _Sseq,
+ __enable_if_t<__is_seed_sequence_v<_Sseq, discard_block_engine> && !is_convertible<_Sseq, _Engine>::value,
+ int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit discard_block_engine(_Sseq& __q) : __e_(__q), __n_(0) {}
_LIBCPP_HIDE_FROM_ABI void seed() {
__e_.seed();
@@ -77,7 +76,7 @@ class discard_block_engine {
__e_.seed(__sd);
__n_ = 0;
}
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, discard_block_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, discard_block_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void seed(_Sseq& __q) {
__e_.seed(__q);
__n_ = 0;
diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h
index 7484857049414..947ed1f55ddc9 100644
--- a/libcxx/include/__random/independent_bits_engine.h
+++ b/libcxx/include/__random/independent_bits_engine.h
@@ -94,12 +94,12 @@ class independent_bits_engine {
_LIBCPP_HIDE_FROM_ABI explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
template <
class _Sseq,
- __enable_if_t<__is_seed_sequence<_Sseq, independent_bits_engine>::value && !is_convertible<_Sseq, _Engine>::value,
+ __enable_if_t<__is_seed_sequence_v<_Sseq, independent_bits_engine> && !is_convertible<_Sseq, _Engine>::value,
int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit independent_bits_engine(_Sseq& __q) : __e_(__q) {}
_LIBCPP_HIDE_FROM_ABI void seed() { __e_.seed(); }
_LIBCPP_HIDE_FROM_ABI void seed(result_type __sd) { __e_.seed(__sd); }
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, independent_bits_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, independent_bits_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void seed(_Sseq& __q) {
__e_.seed(__q);
}
diff --git a/libcxx/include/__random/is_seed_sequence.h b/libcxx/include/__random/is_seed_sequence.h
index c7171cff2eda0..8b675cccd4474 100644
--- a/libcxx/include/__random/is_seed_sequence.h
+++ b/libcxx/include/__random/is_seed_sequence.h
@@ -21,10 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Sseq, class _Engine>
-struct __is_seed_sequence {
- static _LIBCPP_CONSTEXPR const bool value =
- !is_convertible<_Sseq, typename _Engine::result_type>::value && !is_same<__remove_cv_t<_Sseq>, _Engine>::value;
-};
+inline const bool __is_seed_sequence_v =
+ !is_convertible<_Sseq, typename _Engine::result_type>::value && !is_same<__remove_cv_t<_Sseq>, _Engine>::value;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__random/linear_congruential_engine.h b/libcxx/include/__random/linear_congruential_engine.h
index f74129d9b8ffe..e8d3425097e07 100644
--- a/libcxx/include/__random/linear_congruential_engine.h
+++ b/libcxx/include/__random/linear_congruential_engine.h
@@ -265,14 +265,14 @@ class linear_congruential_engine {
#else
_LIBCPP_HIDE_FROM_ABI explicit linear_congruential_engine(result_type __s = default_seed) { seed(__s); }
#endif
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, linear_congruential_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, linear_congruential_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit linear_congruential_engine(_Sseq& __q) {
seed(__q);
}
_LIBCPP_HIDE_FROM_ABI void seed(result_type __s = default_seed) {
seed(integral_constant<bool, __m == 0>(), integral_constant<bool, __c == 0>(), __s);
}
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, linear_congruential_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, linear_congruential_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void seed(_Sseq& __q) {
__seed(
__q,
diff --git a/libcxx/include/__random/mersenne_twister_engine.h b/libcxx/include/__random/mersenne_twister_engine.h
index c60fe1529bf57..132e3c0826678 100644
--- a/libcxx/include/__random/mersenne_twister_engine.h
+++ b/libcxx/include/__random/mersenne_twister_engine.h
@@ -190,12 +190,12 @@ class mersenne_twister_engine {
#else
_LIBCPP_HIDE_FROM_ABI explicit mersenne_twister_engine(result_type __sd = default_seed) { seed(__sd); }
#endif
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, mersenne_twister_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit mersenne_twister_engine(_Sseq& __q) {
seed(__q);
}
_LIBCPP_HIDE_FROM_ABI void seed(result_type __sd = default_seed);
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, mersenne_twister_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void seed(_Sseq& __q) {
__seed(__q, integral_constant<unsigned, 1 + (__w - 1) / 32>());
}
diff --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h
index 64d73033a1609..febce5c7198dc 100644
--- a/libcxx/include/__random/shuffle_order_engine.h
+++ b/libcxx/include/__random/shuffle_order_engine.h
@@ -88,10 +88,9 @@ class shuffle_order_engine {
_LIBCPP_HIDE_FROM_ABI explicit shuffle_order_engine(_Engine&& __e) : __e_(std::move(__e)) { __init(); }
#endif // _LIBCPP_CXX03_LANG
_LIBCPP_HIDE_FROM_ABI explicit shuffle_order_engine(result_type __sd) : __e_(__sd) { __init(); }
- template <
- class _Sseq,
- __enable_if_t<__is_seed_sequence<_Sseq, shuffle_order_engine>::value && !is_convertible<_Sseq, _Engine>::value,
- int> = 0>
+ template <class _Sseq,
+ __enable_if_t<__is_seed_sequence_v<_Sseq, shuffle_order_engine> && !is_convertible<_Sseq, _Engine>::value,
+ int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit shuffle_order_engine(_Sseq& __q) : __e_(__q) {
__init();
}
@@ -103,7 +102,7 @@ class shuffle_order_engine {
__e_.seed(__sd);
__init();
}
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, shuffle_order_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, shuffle_order_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void seed(_Sseq& __q) {
__e_.seed(__q);
__init();
diff --git a/libcxx/include/__random/subtract_with_carry_engine.h b/libcxx/include/__random/subtract_with_carry_engine.h
index c2b17cc889769..cbff7c8fa18a2 100644
--- a/libcxx/include/__random/subtract_with_carry_engine.h
+++ b/libcxx/include/__random/subtract_with_carry_engine.h
@@ -86,14 +86,14 @@ class subtract_with_carry_engine {
#else
_LIBCPP_HIDE_FROM_ABI explicit subtract_with_carry_engine(result_type __sd = default_seed) { seed(__sd); }
#endif
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, subtract_with_carry_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI explicit subtract_with_carry_engine(_Sseq& __q) {
seed(__q);
}
_LIBCPP_HIDE_FROM_ABI void seed(result_type __sd = default_seed) {
seed(__sd, integral_constant<unsigned, 1 + (__w - 1) / 32>());
}
- template <class _Sseq, __enable_if_t<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value, int> = 0>
+ template <class _Sseq, __enable_if_t<__is_seed_sequence_v<_Sseq, subtract_with_carry_engine>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void seed(_Sseq& __q) {
__seed(__q, integral_constant<unsigned, 1 + (__w - 1) / 32>());
}
diff --git a/libcxx/include/__string/constexpr_c_functions.h b/libcxx/include/__string/constexpr_c_functions.h
index 160d2af10950f..4b05e862b80e3 100644
--- a/libcxx/include/__string/constexpr_c_functions.h
+++ b/libcxx/include/__string/constexpr_c_functions.h
@@ -95,14 +95,13 @@ __constexpr_memcmp(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
}
}
-// Because of __libcpp_is_trivially_equality_comparable we know that comparing the object representations is equivalent
+// Because of __is_trivially_equality_comparable_v we know that comparing the object representations is equivalent
// to a std::memcmp(...) == 0. Since we have multiple objects contiguously in memory, we can call memcmp once instead
// of invoking it on every object individually.
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
- static_assert(__libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
- "_Tp and _Up have to be trivially equality comparable");
+ static_assert(__is_trivially_equality_comparable_v<_Tp, _Up>, "_Tp and _Up have to be trivially equality comparable");
auto __count = static_cast<size_t>(__n);
@@ -127,7 +126,7 @@ __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_memchr(_Tp* __str, _Up __value, size_t __count) {
- static_assert(sizeof(_Tp) == 1 && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
+ static_assert(sizeof(_Tp) == 1 && __is_trivially_equality_comparable_v<_Tp, _Up>,
"Calling memchr on non-trivially equality comparable types is unsafe.");
if (__libcpp_is_constant_evaluated()) {
diff --git a/libcxx/include/__type_traits/invoke.h b/libcxx/include/__type_traits/invoke.h
index ba8202576593e..c7bbd5beb1cd6 100644
--- a/libcxx/include/__type_traits/invoke.h
+++ b/libcxx/include/__type_traits/invoke.h
@@ -107,7 +107,7 @@ inline const bool __is_invocable_r_impl = false;
template <class _Ret, class... _Args>
inline const bool __is_invocable_r_impl<_Ret, true, _Args...> =
- __is_core_convertible<__invoke_result_t<_Args...>, _Ret>::value || is_void<_Ret>::value;
+ __is_core_convertible_v<__invoke_result_t<_Args...>, _Ret> || is_void<_Ret>::value;
template <class _Ret, class... _Args>
inline const bool __is_invocable_r_v = __is_invocable_r_impl<_Ret, __is_invocable_v<_Args...>, _Args...>;
@@ -155,7 +155,7 @@ using __enable_if_bullet1 _LIBCPP_NODEBUG =
template <class _Fp, class _A0, class _DecayFp = __decay_t<_Fp>, class _DecayA0 = __decay_t<_A0> >
using __enable_if_bullet2 _LIBCPP_NODEBUG =
- __enable_if_t<is_member_function_pointer<_DecayFp>::value && __is_reference_wrapper<_DecayA0>::value>;
+ __enable_if_t<is_member_function_pointer<_DecayFp>::value && __is_reference_wrapper_v<_DecayA0> >;
template <class _Fp,
class _A0,
@@ -165,7 +165,7 @@ template <class _Fp,
using __enable_if_bullet3 _LIBCPP_NODEBUG =
__enable_if_t<is_member_function_pointer<_DecayFp>::value &&
!(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) &&
- !__is_reference_wrapper<_DecayA0>::value>;
+ !__is_reference_wrapper_v<_DecayA0> >;
template <class _Fp,
class _A0,
@@ -178,7 +178,7 @@ using __enable_if_bullet4 _LIBCPP_NODEBUG =
template <class _Fp, class _A0, class _DecayFp = __decay_t<_Fp>, class _DecayA0 = __decay_t<_A0> >
using __enable_if_bullet5 _LIBCPP_NODEBUG =
- __enable_if_t<is_member_object_pointer<_DecayFp>::value && __is_reference_wrapper<_DecayA0>::value>;
+ __enable_if_t<is_member_object_pointer<_DecayFp>::value && __is_reference_wrapper_v<_DecayA0> >;
template <class _Fp,
class _A0,
@@ -188,7 +188,7 @@ template <class _Fp,
using __enable_if_bullet6 _LIBCPP_NODEBUG =
__enable_if_t<is_member_object_pointer<_DecayFp>::value &&
!(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) &&
- !__is_reference_wrapper<_DecayA0>::value>;
+ !__is_reference_wrapper_v<_DecayA0> >;
// __invoke forward declarations
@@ -267,7 +267,7 @@ struct __invokable_r {
using _Result _LIBCPP_NODEBUG = decltype(__try_call<_Fp, _Args...>(0));
using type = __conditional_t<_IsNotSame<_Result, __nat>::value,
- __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
+ integral_constant<bool, is_void<_Ret>::value || __is_core_convertible_v<_Result, _Ret> >,
false_type>;
static const bool value = type::value;
};
diff --git a/libcxx/include/__type_traits/is_callable.h b/libcxx/include/__type_traits/is_callable.h
index 49724fe892ee5..169382986d32f 100644
--- a/libcxx/include/__type_traits/is_callable.h
+++ b/libcxx/include/__type_traits/is_callable.h
@@ -25,7 +25,7 @@ template <class...>
false_type __is_callable_helper(...);
template <class _Func, class... _Args>
-struct __is_callable : decltype(std::__is_callable_helper<_Func, _Args...>(0)) {};
+inline const bool __is_callable_v = decltype(std::__is_callable_helper<_Func, _Args...>(0))::value;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_core_convertible.h b/libcxx/include/__type_traits/is_core_convertible.h
index b1f2a5cc7d684..325e0c59303ea 100644
--- a/libcxx/include/__type_traits/is_core_convertible.h
+++ b/libcxx/include/__type_traits/is_core_convertible.h
@@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
#include <__config>
-#include <__type_traits/integral_constant.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -30,9 +29,6 @@ template <class _Tp, class _Up>
inline const bool
__is_core_convertible_v<_Tp, _Up, decltype(static_cast<void (*)(_Up)>(0)(static_cast<_Tp (*)()>(0)()))> = true;
-template <class _Tp, class _Up>
-using __is_core_convertible _LIBCPP_NODEBUG = integral_constant<bool, __is_core_convertible_v<_Tp, _Up> >;
-
#if _LIBCPP_STD_VER >= 20
template <class _Tp, class _Up>
diff --git a/libcxx/include/__type_traits/is_equality_comparable.h b/libcxx/include/__type_traits/is_equality_comparable.h
index 3ee1839996bef..d8d56c1ef411e 100644
--- a/libcxx/include/__type_traits/is_equality_comparable.h
+++ b/libcxx/include/__type_traits/is_equality_comparable.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/enable_if.h>
-#include <__type_traits/integral_constant.h>
#include <__type_traits/is_integral.h>
#include <__type_traits/is_same.h>
#include <__type_traits/is_signed.h>
@@ -27,11 +26,11 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Up, class = void>
-struct __is_equality_comparable : false_type {};
+inline const bool __is_equality_comparable_v = false;
template <class _Tp, class _Up>
-struct __is_equality_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>() == std::declval<_Up>())> > : true_type {
-};
+inline const bool
+ __is_equality_comparable_v<_Tp, _Up, __void_t<decltype(std::declval<_Tp>() == std::declval<_Up>())> > = true;
// A type is_trivially_equality_comparable if the expression `a == b` is equivalent to `std::memcmp(&a, &b, sizeof(T))`
// (with `a` and `b` being of type `T`). For the case where we compare two object of the same type, we can use
@@ -48,40 +47,35 @@ struct __is_equality_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>()
// representation may not be equivalent.
template <class _Tp, class _Up, class = void>
-struct __libcpp_is_trivially_equality_comparable_impl : false_type {};
+inline const bool __is_trivially_equality_comparable_impl = false;
template <class _Tp>
-struct __libcpp_is_trivially_equality_comparable_impl<_Tp, _Tp>
+inline const bool __is_trivially_equality_comparable_impl<_Tp, _Tp>
#if __has_builtin(__is_trivially_equality_comparable)
- : integral_constant<bool, __is_trivially_equality_comparable(_Tp) && __is_equality_comparable<_Tp, _Tp>::value> {
-};
+ = __is_trivially_equality_comparable(_Tp) && __is_equality_comparable_v<_Tp, _Tp>;
#else
- : is_integral<_Tp> {
-};
+ = is_integral<_Tp>::value;
#endif // __has_builtin(__is_trivially_equality_comparable)
template <class _Tp, class _Up>
-struct __libcpp_is_trivially_equality_comparable_impl<
+inline const bool __is_trivially_equality_comparable_impl<
_Tp,
_Up,
__enable_if_t<is_integral<_Tp>::value && is_integral<_Up>::value && !is_same<_Tp, _Up>::value &&
- is_signed<_Tp>::value == is_signed<_Up>::value && sizeof(_Tp) == sizeof(_Up)> > : true_type {};
+ is_signed<_Tp>::value == is_signed<_Up>::value && sizeof(_Tp) == sizeof(_Up)> > = true;
template <class _Tp>
-struct __libcpp_is_trivially_equality_comparable_impl<_Tp*, _Tp*> : true_type {};
+inline const bool __is_trivially_equality_comparable_impl<_Tp*, _Tp*> = true;
// TODO: Use is_pointer_inverconvertible_base_of
template <class _Tp, class _Up>
-struct __libcpp_is_trivially_equality_comparable_impl<_Tp*, _Up*>
- : integral_constant<
- bool,
- __is_equality_comparable<_Tp*, _Up*>::value &&
- (is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >::value || is_void<_Tp>::value || is_void<_Up>::value)> {
-};
+inline const bool __is_trivially_equality_comparable_impl<_Tp*, _Up*> =
+ __is_equality_comparable_v<_Tp*, _Up*> &&
+ (is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >::value || is_void<_Tp>::value || is_void<_Up>::value);
template <class _Tp, class _Up>
-using __libcpp_is_trivially_equality_comparable _LIBCPP_NODEBUG =
- __libcpp_is_trivially_equality_comparable_impl<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >;
+inline const bool __is_trivially_equality_comparable_v =
+ __is_trivially_equality_comparable_impl<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_reference_wrapper.h b/libcxx/include/__type_traits/is_reference_wrapper.h
index 4bd8ebd44f05f..ba73b13e765f2 100644
--- a/libcxx/include/__type_traits/is_reference_wrapper.h
+++ b/libcxx/include/__type_traits/is_reference_wrapper.h
@@ -11,7 +11,7 @@
#include <__config>
#include <__fwd/functional.h>
-#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_specialization.h>
#include <__type_traits/remove_cv.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -21,11 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct __is_reference_wrapper_impl : false_type {};
-template <class _Tp>
-struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : true_type {};
-template <class _Tp>
-struct __is_reference_wrapper : __is_reference_wrapper_impl<__remove_cv_t<_Tp> > {};
+inline const bool __is_reference_wrapper_v = __is_specialization_v<__remove_cv_t<_Tp>, reference_wrapper>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h
index c5bfa947058fb..c34a77acb88d4 100644
--- a/libcxx/include/__utility/in_place.h
+++ b/libcxx/include/__utility/in_place.h
@@ -12,6 +12,7 @@
#include <__config>
#include <__cstddef/size_t.h>
#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_specialization.h>
#include <__type_traits/remove_cvref.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -42,20 +43,15 @@ template <size_t _Idx>
inline constexpr in_place_index_t<_Idx> in_place_index{};
template <class _Tp>
-struct __is_inplace_type_imp : false_type {};
-template <class _Tp>
-struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};
-
-template <class _Tp>
-using __is_inplace_type _LIBCPP_NODEBUG = __is_inplace_type_imp<__remove_cvref_t<_Tp>>;
+inline constexpr bool __is_in_place_type_v = __is_specialization_v<__remove_cvref_t<_Tp>, in_place_type_t>;
template <class _Tp>
-struct __is_inplace_index_imp : false_type {};
+inline constexpr bool __is_in_place_index_impl = false;
template <size_t _Idx>
-struct __is_inplace_index_imp<in_place_index_t<_Idx>> : true_type {};
+inline constexpr bool __is_in_place_index_impl<in_place_index_t<_Idx>> = true;
template <class _Tp>
-using __is_inplace_index _LIBCPP_NODEBUG = __is_inplace_index_imp<__remove_cvref_t<_Tp>>;
+inline constexpr bool __is_in_place_index_v = __is_in_place_index_impl<__remove_cvref_t<_Tp>>;
#endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__utility/is_pointer_in_range.h b/libcxx/include/__utility/is_pointer_in_range.h
index 55fac6256b74e..10b6595c59710 100644
--- a/libcxx/include/__utility/is_pointer_in_range.h
+++ b/libcxx/include/__utility/is_pointer_in_range.h
@@ -26,13 +26,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Up, class = void>
-struct __is_less_than_comparable : false_type {};
+inline const bool __is_less_than_comparable_v = false;
template <class _Tp, class _Up>
-struct __is_less_than_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>() < std::declval<_Up>())> > : true_type {
-};
+inline const bool
+ __is_less_than_comparable_v<_Tp, _Up, __void_t<decltype(std::declval<_Tp>() < std::declval<_Up>())> > = true;
-template <class _Tp, class _Up, __enable_if_t<__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
+template <class _Tp, class _Up, __enable_if_t<__is_less_than_comparable_v<const _Tp*, const _Up*>, int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
__is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(std::__is_valid_range(__begin, __end), "[__begin, __end) is not a valid range");
@@ -47,7 +47,7 @@ __is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
return !__less<>()(__ptr, __begin) && __less<>()(__ptr, __end);
}
-template <class _Tp, class _Up, __enable_if_t<!__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
+template <class _Tp, class _Up, __enable_if_t<!__is_less_than_comparable_v<const _Tp*, const _Up*>, int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
__is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
if (__libcpp_is_constant_evaluated())
diff --git a/libcxx/include/any b/libcxx/include/any
index 148fb16c802a5..5b419799ee02c 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -203,10 +203,10 @@ public:
__other.__call(_Action::_Move, this);
}
- template < class _ValueType,
- class _Tp = decay_t<_ValueType>,
- class = enable_if_t< !is_same<_Tp, any>::value && !__is_inplace_type<_ValueType>::value &&
- is_copy_constructible<_Tp>::value> >
+ template <
+ class _ValueType,
+ class _Tp = decay_t<_ValueType>,
+ class = enable_if_t<!is_same_v<_Tp, any> && !__is_in_place_type_v<_ValueType> && is_copy_constructible_v<_Tp>>>
_LIBCPP_HIDE_FROM_ABI any(_ValueType&& __value);
template <class _ValueType,
diff --git a/libcxx/include/cwchar b/libcxx/include/cwchar
index 8b940b887d25f..03db9e5fb2327 100644
--- a/libcxx/include/cwchar
+++ b/libcxx/include/cwchar
@@ -232,7 +232,7 @@ __constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count)
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp* __str, _Up __value, size_t __count) {
static_assert(sizeof(_Tp) == sizeof(wchar_t)&& _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
- __libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
+ __is_trivially_equality_comparable_v<_Tp, _Tp>,
"Calling wmemchr on non-trivially equality comparable types is unsafe.");
# if __has_builtin(__builtin_wmemchr)
diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const
index 6a7f8ae9c4595..f58427805aa1d 100644
--- a/libcxx/include/experimental/propagate_const
+++ b/libcxx/include/experimental/propagate_const
@@ -149,6 +149,12 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_V2
template <class _Tp>
class propagate_const;
+template <class _Up>
+inline constexpr bool __is_propagate_const_v = false;
+
+template <class _Up>
+inline constexpr bool __is_propagate_const_v<propagate_const<_Up>> = true;
+
template <class _Up>
inline _LIBCPP_HIDE_FROM_ABI constexpr const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
@@ -188,12 +194,6 @@ private:
return __get_pointer(__u.get());
}
- template <class _Up>
- struct __is_propagate_const : false_type {};
-
- template <class _Up>
- struct __is_propagate_const<propagate_const<_Up>> : true_type {};
-
_Tp __t_;
public:
@@ -220,13 +220,13 @@ public:
template <class _Up,
enable_if_t<!is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value &&
- !__is_propagate_const<decay_t<_Up>>::value,
+ !__is_propagate_const_v<decay_t<_Up>>,
bool> = true>
explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
template <class _Up,
enable_if_t<is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value &&
- !__is_propagate_const<decay_t<_Up>>::value,
+ !__is_propagate_const_v<decay_t<_Up>>,
bool> = false>
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
@@ -240,7 +240,7 @@ public:
return *this;
}
- template <class _Up, class _Vp = enable_if_t<!__is_propagate_const<decay_t<_Up>>::value>>
+ template <class _Up, class _Vp = enable_if_t<!__is_propagate_const_v<decay_t<_Up>>>>
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(_Up&& __u) {
__t_ = std::forward<_Up>(__u);
return *this;
diff --git a/libcxx/include/optional b/libcxx/include/optional
index ef1bfd3ec44c0..ddd91494f2ca3 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -603,9 +603,9 @@ concept __is_derived_from_optional = requires(const _Tp& __t) { []<class _Up>(co
# endif // _LIBCPP_STD_VER >= 20
template <class _Tp>
-struct __is_std_optional : false_type {};
+inline constexpr bool __is_std_optional_v = false;
template <class _Tp>
-struct __is_std_optional<optional<_Tp>> : true_type {};
+inline constexpr bool __is_std_optional_v<optional<_Tp>> = true;
template <class _Tp>
class _LIBCPP_DECLSPEC_EMPTY_BASES optional
@@ -657,10 +657,10 @@ private:
};
template <class _Up>
using _CheckOptionalArgsCtor _LIBCPP_NODEBUG =
- _If< _IsNotSame<__remove_cvref_t<_Up>, in_place_t>::value && _IsNotSame<__remove_cvref_t<_Up>, optional>::value &&
- (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_optional<__remove_cvref_t<_Up>>::value),
- _CheckOptionalArgsConstructor,
- __check_tuple_constructor_fail >;
+ _If<_IsNotSame<__remove_cvref_t<_Up>, in_place_t>::value && _IsNotSame<__remove_cvref_t<_Up>, optional>::value &&
+ (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_optional_v<__remove_cvref_t<_Up>>),
+ _CheckOptionalArgsConstructor,
+ __check_tuple_constructor_fail>;
template <class _QualUp>
struct _CheckOptionalLikeConstructor {
template <class _Up, class _Opt = optional<_Up>>
@@ -938,8 +938,8 @@ public:
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) & {
using _Up = invoke_result_t<_Func, value_type&>;
- static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
- "Result of f(value()) must be a specialization of std::optional");
+ static_assert(
+ __is_std_optional_v<remove_cvref_t<_Up>>, "Result of f(value()) must be a specialization of std::optional");
if (*this)
return std::invoke(std::forward<_Func>(__f), value());
return remove_cvref_t<_Up>();
@@ -948,8 +948,8 @@ public:
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const& {
using _Up = invoke_result_t<_Func, const value_type&>;
- static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
- "Result of f(value()) must be a specialization of std::optional");
+ static_assert(
+ __is_std_optional_v<remove_cvref_t<_Up>>, "Result of f(value()) must be a specialization of std::optional");
if (*this)
return std::invoke(std::forward<_Func>(__f), value());
return remove_cvref_t<_Up>();
@@ -958,7 +958,7 @@ public:
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) && {
using _Up = invoke_result_t<_Func, value_type&&>;
- static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
+ static_assert(__is_std_optional_v<remove_cvref_t<_Up>>,
"Result of f(std::move(value())) must be a specialization of std::optional");
if (*this)
return std::invoke(std::forward<_Func>(__f), std::move(value()));
@@ -968,7 +968,7 @@ public:
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const&& {
using _Up = invoke_result_t<_Func, const value_type&&>;
- static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
+ static_assert(__is_std_optional_v<remove_cvref_t<_Up>>,
"Result of f(std::move(value())) must be a specialization of std::optional");
if (*this)
return std::invoke(std::forward<_Func>(__f), std::move(value()));
diff --git a/libcxx/include/span b/libcxx/include/span
index 3d4f9e4ba7831..718914012c1de 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -203,14 +203,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD
# if _LIBCPP_STD_VER >= 20
template <class _Tp>
-struct __is_std_span : false_type {};
+inline constexpr bool __is_std_span_v = false;
template <class _Tp, size_t _Sz>
-struct __is_std_span<span<_Tp, _Sz>> : true_type {};
+inline constexpr bool __is_std_span_v<span<_Tp, _Sz>> = true;
template <class _Range, class _ElementType>
concept __span_compatible_range =
- !__is_std_span<remove_cvref_t<_Range>>::value && //
+ !__is_std_span_v<remove_cvref_t<_Range>> && //
ranges::contiguous_range<_Range> && //
ranges::sized_range<_Range> && //
(ranges::borrowed_range<_Range> || is_const_v<_ElementType>) && //
diff --git a/libcxx/include/valarray b/libcxx/include/valarray
index 215811d5ba475..8ff9ce3597e46 100644
--- a/libcxx/include/valarray
+++ b/libcxx/include/valarray
@@ -728,25 +728,25 @@ template <class _ValExpr>
class __val_expr;
template <class _ValExpr>
-struct __is_val_expr : false_type {};
+inline const bool __is_val_expr_v = false;
template <class _ValExpr>
-struct __is_val_expr<__val_expr<_ValExpr> > : true_type {};
+inline const bool __is_val_expr_v<__val_expr<_ValExpr> > = true;
template <class _Tp>
-struct __is_val_expr<valarray<_Tp> > : true_type {};
+inline const bool __is_val_expr_v<valarray<_Tp> > = true;
template <class _Tp>
-struct __is_val_expr<slice_array<_Tp> > : true_type {};
+inline const bool __is_val_expr_v<slice_array<_Tp> > = true;
template <class _Tp>
-struct __is_val_expr<gslice_array<_Tp> > : true_type {};
+inline const bool __is_val_expr_v<gslice_array<_Tp> > = true;
template <class _Tp>
-struct __is_val_expr<mask_array<_Tp> > : true_type {};
+inline const bool __is_val_expr_v<mask_array<_Tp> > = true;
template <class _Tp>
-struct __is_val_expr<indirect_array<_Tp> > : true_type {};
+inline const bool __is_val_expr_v<indirect_array<_Tp> > = true;
// The functions using a __val_expr access the elements by their index.
// valarray and the libc++ lazy proxies have an operator[]. The
@@ -872,34 +872,34 @@ public:
_LIBCPP_HIDE_FROM_ABI valarray& operator<<=(const value_type& __x);
_LIBCPP_HIDE_FROM_ABI valarray& operator>>=(const value_type& __x);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator*=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator/=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator%=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator+=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator-=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator^=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator|=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator&=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator<<=(const _Expr& __v);
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
_LIBCPP_HIDE_FROM_ABI valarray& operator>>=(const _Expr& __v);
// member functions:
@@ -956,14 +956,12 @@ template <class _Tp, size_t _Size>
valarray(const _Tp (&)[_Size], size_t) -> valarray<_Tp>;
# endif
-template <class _Expr,
- __enable_if_t<__is_val_expr<_Expr>::value && __val_expr_use_member_functions<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr> && __val_expr_use_member_functions<_Expr>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI typename _Expr::value_type __get(const _Expr& __v, size_t __i) {
return __v.__get(__i);
}
-template <class _Expr,
- __enable_if_t<__is_val_expr<_Expr>::value && !__val_expr_use_member_functions<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr> && !__val_expr_use_member_functions<_Expr>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI typename _Expr::value_type __get(const _Expr& __v, size_t __i) {
return __v[__i];
}
@@ -1049,37 +1047,37 @@ private:
size_t __stride_;
public:
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator*=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator/=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator%=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator+=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator-=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator^=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator&=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator|=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator<<=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator>>=(const _Expr& __v) const;
slice_array(slice_array const&) = default;
@@ -1114,7 +1112,7 @@ inline const slice_array<_Tp>& slice_array<_Tp>::operator=(const slice_array& __
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1129,7 +1127,7 @@ inline void slice_array<_Tp>::operator=(const valarray<value_type>& __va) const
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator*=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1137,7 +1135,7 @@ inline void slice_array<_Tp>::operator*=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator/=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1145,7 +1143,7 @@ inline void slice_array<_Tp>::operator/=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator%=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1153,7 +1151,7 @@ inline void slice_array<_Tp>::operator%=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator+=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1161,7 +1159,7 @@ inline void slice_array<_Tp>::operator+=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator-=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1169,7 +1167,7 @@ inline void slice_array<_Tp>::operator-=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator^=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1177,7 +1175,7 @@ inline void slice_array<_Tp>::operator^=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator&=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1185,7 +1183,7 @@ inline void slice_array<_Tp>::operator&=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator|=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1193,7 +1191,7 @@ inline void slice_array<_Tp>::operator|=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator<<=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1201,7 +1199,7 @@ inline void slice_array<_Tp>::operator<<=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void slice_array<_Tp>::operator>>=(const _Expr& __v) const {
value_type* __t = __vp_;
for (size_t __i = 0; __i < __size_; ++__i, __t += __stride_)
@@ -1278,37 +1276,37 @@ private:
valarray<size_t> __1d_;
public:
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator*=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator/=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator%=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator+=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator-=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator^=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator&=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator|=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator<<=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator>>=(const _Expr& __v) const;
_LIBCPP_HIDE_FROM_ABI const gslice_array& operator=(const gslice_array& __ga) const;
@@ -1337,7 +1335,7 @@ private:
};
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1346,7 +1344,7 @@ inline void gslice_array<_Tp>::operator=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator*=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1355,7 +1353,7 @@ inline void gslice_array<_Tp>::operator*=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator/=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1364,7 +1362,7 @@ inline void gslice_array<_Tp>::operator/=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator%=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1373,7 +1371,7 @@ inline void gslice_array<_Tp>::operator%=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator+=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1382,7 +1380,7 @@ inline void gslice_array<_Tp>::operator+=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator-=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1391,7 +1389,7 @@ inline void gslice_array<_Tp>::operator-=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator^=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1400,7 +1398,7 @@ inline void gslice_array<_Tp>::operator^=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator&=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1409,7 +1407,7 @@ inline void gslice_array<_Tp>::operator&=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator|=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1418,7 +1416,7 @@ inline void gslice_array<_Tp>::operator|=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator<<=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1427,7 +1425,7 @@ inline void gslice_array<_Tp>::operator<<=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void gslice_array<_Tp>::operator>>=(const _Expr& __v) const {
typedef const size_t* _Ip;
size_t __j = 0;
@@ -1463,37 +1461,37 @@ private:
valarray<size_t> __1d_;
public:
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator*=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator/=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator%=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator+=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator-=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator^=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator&=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator|=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator<<=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator>>=(const _Expr& __v) const;
mask_array(const mask_array&) = default;
@@ -1523,7 +1521,7 @@ private:
};
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1531,7 +1529,7 @@ inline void mask_array<_Tp>::operator=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator*=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1539,7 +1537,7 @@ inline void mask_array<_Tp>::operator*=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator/=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1547,7 +1545,7 @@ inline void mask_array<_Tp>::operator/=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator%=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1555,7 +1553,7 @@ inline void mask_array<_Tp>::operator%=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator+=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1563,7 +1561,7 @@ inline void mask_array<_Tp>::operator+=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator-=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1571,7 +1569,7 @@ inline void mask_array<_Tp>::operator-=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator^=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1579,7 +1577,7 @@ inline void mask_array<_Tp>::operator^=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator&=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1587,7 +1585,7 @@ inline void mask_array<_Tp>::operator&=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator|=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1595,7 +1593,7 @@ inline void mask_array<_Tp>::operator|=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator<<=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1603,7 +1601,7 @@ inline void mask_array<_Tp>::operator<<=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void mask_array<_Tp>::operator>>=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1668,37 +1666,37 @@ private:
valarray<size_t> __1d_;
public:
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator*=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator/=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator%=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator+=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator-=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator^=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator&=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator|=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator<<=(const _Expr& __v) const;
- template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+ template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
void _LIBCPP_HIDE_FROM_ABI operator>>=(const _Expr& __v) const;
indirect_array(const indirect_array&) = default;
@@ -1729,7 +1727,7 @@ private:
};
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1737,7 +1735,7 @@ inline void indirect_array<_Tp>::operator=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator*=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1745,7 +1743,7 @@ inline void indirect_array<_Tp>::operator*=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator/=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1753,7 +1751,7 @@ inline void indirect_array<_Tp>::operator/=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator%=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1761,7 +1759,7 @@ inline void indirect_array<_Tp>::operator%=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator+=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1769,7 +1767,7 @@ inline void indirect_array<_Tp>::operator+=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator-=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1777,7 +1775,7 @@ inline void indirect_array<_Tp>::operator-=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator^=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1785,7 +1783,7 @@ inline void indirect_array<_Tp>::operator^=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator&=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1793,7 +1791,7 @@ inline void indirect_array<_Tp>::operator&=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator|=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1801,7 +1799,7 @@ inline void indirect_array<_Tp>::operator|=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator<<=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -1809,7 +1807,7 @@ inline void indirect_array<_Tp>::operator<<=(const _Expr& __v) const {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline void indirect_array<_Tp>::operator>>=(const _Expr& __v) const {
size_t __n = __1d_.size();
for (size_t __i = 0; __i < __n; ++__i)
@@ -2384,7 +2382,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator>>=(const value_type& __x) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator*=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2393,7 +2391,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator*=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator/=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2402,7 +2400,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator/=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator%=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2411,7 +2409,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator%=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator+=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2420,7 +2418,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator+=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator-=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2429,7 +2427,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator-=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator^=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2438,7 +2436,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator^=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator|=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2447,7 +2445,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator|=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator&=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2456,7 +2454,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator&=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator<<=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2465,7 +2463,7 @@ inline valarray<_Tp>& valarray<_Tp>::operator<<=(const _Expr& __v) {
}
template <class _Tp>
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> >
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> >
inline valarray<_Tp>& valarray<_Tp>::operator>>=(const _Expr& __v) {
size_t __i = 0;
for (value_type* __t = __begin_; __t != __end_; ++__t, ++__i)
@@ -2601,9 +2599,7 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(valarray<_Tp>& __x, valarray<_Tp>& __y) _
__x.swap(__y);
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<multiplies<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator*(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2611,7 +2607,7 @@ operator*(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(multiplies<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<multiplies<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator*(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2620,7 +2616,7 @@ operator*(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(multiplies<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<multiplies<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator*(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2629,9 +2625,7 @@ operator*(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(multiplies<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<divides<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator/(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2639,7 +2633,7 @@ operator/(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(divides<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<divides<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator/(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2648,7 +2642,7 @@ operator/(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(divides<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<divides<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator/(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2657,9 +2651,7 @@ operator/(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(divides<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<modulus<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator%(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2667,7 +2659,7 @@ operator%(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(modulus<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<modulus<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator%(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2676,7 +2668,7 @@ operator%(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(modulus<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<modulus<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator%(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2685,9 +2677,7 @@ operator%(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(modulus<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<plus<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator+(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2695,7 +2685,7 @@ operator+(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(plus<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<plus<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator+(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2704,7 +2694,7 @@ operator+(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(plus<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<plus<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator+(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2713,9 +2703,7 @@ operator+(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(plus<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<minus<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator-(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2723,7 +2711,7 @@ operator-(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(minus<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<minus<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator-(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2732,7 +2720,7 @@ operator-(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(minus<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<minus<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator-(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2741,9 +2729,7 @@ operator-(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(minus<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<bit_xor<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator^(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2751,7 +2737,7 @@ operator^(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(bit_xor<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<bit_xor<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator^(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2760,7 +2746,7 @@ operator^(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(bit_xor<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<bit_xor<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator^(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2769,9 +2755,7 @@ operator^(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(bit_xor<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<bit_and<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator&(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2779,7 +2763,7 @@ operator&(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(bit_and<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<bit_and<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator&(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2788,7 +2772,7 @@ operator&(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(bit_and<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<bit_and<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator&(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2797,9 +2781,7 @@ operator&(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(bit_and<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<bit_or<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator|(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2807,7 +2789,7 @@ operator|(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(bit_or<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<bit_or<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator|(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2816,7 +2798,7 @@ operator|(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(bit_or<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<bit_or<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator|(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2825,9 +2807,7 @@ operator|(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(bit_or<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<__bit_shift_left<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator<<(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2835,7 +2815,7 @@ operator<<(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(__bit_shift_left<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr< _BinaryOp<__bit_shift_left<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator<<(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2844,7 +2824,7 @@ operator<<(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(__bit_shift_left<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr< _BinaryOp<__bit_shift_left<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator<<(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2853,9 +2833,7 @@ operator<<(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(__bit_shift_left<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<__bit_shift_right<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator>>(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2863,7 +2841,7 @@ operator>>(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(__bit_shift_right<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<
_BinaryOp<__bit_shift_right<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator>>(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2872,7 +2850,7 @@ operator>>(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(__bit_shift_right<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr< _BinaryOp<__bit_shift_right<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator>>(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2881,9 +2859,7 @@ operator>>(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(__bit_shift_right<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<logical_and<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator&&(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2891,7 +2867,7 @@ operator&&(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(logical_and<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<logical_and<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator&&(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2900,7 +2876,7 @@ operator&&(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(logical_and<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<logical_and<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator&&(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2909,9 +2885,7 @@ operator&&(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(logical_and<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<logical_or<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator||(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2919,7 +2893,7 @@ operator||(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(logical_or<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<logical_or<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator||(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2928,7 +2902,7 @@ operator||(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(logical_or<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<logical_or<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator||(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2937,9 +2911,7 @@ operator||(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(logical_or<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<equal_to<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator==(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2947,7 +2919,7 @@ operator==(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(equal_to<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<equal_to<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator==(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2956,7 +2928,7 @@ operator==(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(equal_to<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<equal_to<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator==(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2965,9 +2937,7 @@ operator==(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(equal_to<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<not_equal_to<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator!=(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -2975,7 +2945,7 @@ operator!=(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(not_equal_to<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<not_equal_to<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator!=(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -2984,7 +2954,7 @@ operator!=(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(not_equal_to<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<not_equal_to<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator!=(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -2993,9 +2963,7 @@ operator!=(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(not_equal_to<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<less<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator<(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -3003,7 +2971,7 @@ operator<(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(less<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<less<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator<(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -3012,7 +2980,7 @@ operator<(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(less<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<less<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator<(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -3021,9 +2989,7 @@ operator<(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(less<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<greater<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator>(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -3031,7 +2997,7 @@ operator>(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(greater<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<greater<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator>(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -3040,7 +3006,7 @@ operator>(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(greater<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<greater<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator>(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -3049,9 +3015,7 @@ operator>(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(greater<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<less_equal<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator<=(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -3059,7 +3023,7 @@ operator<=(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(less_equal<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<less_equal<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator<=(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -3068,7 +3032,7 @@ operator<=(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(less_equal<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<less_equal<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator<=(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -3077,9 +3041,7 @@ operator<=(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(less_equal<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<greater_equal<typename _Expr1::value_type>, _Expr1, _Expr2> >
operator>=(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -3087,7 +3049,7 @@ operator>=(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(greater_equal<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<greater_equal<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
operator>=(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -3096,7 +3058,7 @@ operator>=(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(greater_equal<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<greater_equal<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
operator>=(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -3105,7 +3067,7 @@ operator>=(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(greater_equal<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__abs_expr<typename _Expr::value_type>, _Expr> >
abs(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3113,7 +3075,7 @@ abs(const _Expr& __x) {
return __val_expr<_Op>(_Op(__abs_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__acos_expr<typename _Expr::value_type>, _Expr> >
acos(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3121,7 +3083,7 @@ acos(const _Expr& __x) {
return __val_expr<_Op>(_Op(__acos_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__asin_expr<typename _Expr::value_type>, _Expr> >
asin(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3129,7 +3091,7 @@ asin(const _Expr& __x) {
return __val_expr<_Op>(_Op(__asin_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__atan_expr<typename _Expr::value_type>, _Expr> >
atan(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3137,9 +3099,7 @@ atan(const _Expr& __x) {
return __val_expr<_Op>(_Op(__atan_expr<value_type>(), __x));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<__atan2_expr<typename _Expr1::value_type>, _Expr1, _Expr2> >
atan2(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -3147,7 +3107,7 @@ atan2(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(__atan2_expr<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<__atan2_expr<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
atan2(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -3156,7 +3116,7 @@ atan2(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(__atan2_expr<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<__atan2_expr<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
atan2(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -3165,7 +3125,7 @@ atan2(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(__atan2_expr<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__cos_expr<typename _Expr::value_type>, _Expr> >
cos(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3173,7 +3133,7 @@ cos(const _Expr& __x) {
return __val_expr<_Op>(_Op(__cos_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__cosh_expr<typename _Expr::value_type>, _Expr> >
cosh(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3181,7 +3141,7 @@ cosh(const _Expr& __x) {
return __val_expr<_Op>(_Op(__cosh_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__exp_expr<typename _Expr::value_type>, _Expr> >
exp(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3189,7 +3149,7 @@ exp(const _Expr& __x) {
return __val_expr<_Op>(_Op(__exp_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__log_expr<typename _Expr::value_type>, _Expr> >
log(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3197,7 +3157,7 @@ log(const _Expr& __x) {
return __val_expr<_Op>(_Op(__log_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__log10_expr<typename _Expr::value_type>, _Expr> >
log10(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3205,9 +3165,7 @@ log10(const _Expr& __x) {
return __val_expr<_Op>(_Op(__log10_expr<value_type>(), __x));
}
-template <class _Expr1,
- class _Expr2,
- __enable_if_t<__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, int> = 0>
+template <class _Expr1, class _Expr2, __enable_if_t<__is_val_expr_v<_Expr1> && __is_val_expr_v<_Expr2>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_BinaryOp<__pow_expr<typename _Expr1::value_type>, _Expr1, _Expr2> >
pow(const _Expr1& __x, const _Expr2& __y) {
typedef typename _Expr1::value_type value_type;
@@ -3215,7 +3173,7 @@ pow(const _Expr1& __x, const _Expr2& __y) {
return __val_expr<_Op>(_Op(__pow_expr<value_type>(), __x, __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<__pow_expr<typename _Expr::value_type>, _Expr, __scalar_expr<typename _Expr::value_type> > >
pow(const _Expr& __x, const typename _Expr::value_type& __y) {
@@ -3224,7 +3182,7 @@ pow(const _Expr& __x, const typename _Expr::value_type& __y) {
return __val_expr<_Op>(_Op(__pow_expr<value_type>(), __x, __scalar_expr<value_type>(__y, __x.size())));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI
__val_expr<_BinaryOp<__pow_expr<typename _Expr::value_type>, __scalar_expr<typename _Expr::value_type>, _Expr> >
pow(const typename _Expr::value_type& __x, const _Expr& __y) {
@@ -3233,7 +3191,7 @@ pow(const typename _Expr::value_type& __x, const _Expr& __y) {
return __val_expr<_Op>(_Op(__pow_expr<value_type>(), __scalar_expr<value_type>(__x, __y.size()), __y));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__sin_expr<typename _Expr::value_type>, _Expr> >
sin(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3241,7 +3199,7 @@ sin(const _Expr& __x) {
return __val_expr<_Op>(_Op(__sin_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__sinh_expr<typename _Expr::value_type>, _Expr> >
sinh(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3249,7 +3207,7 @@ sinh(const _Expr& __x) {
return __val_expr<_Op>(_Op(__sinh_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__sqrt_expr<typename _Expr::value_type>, _Expr> >
sqrt(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3257,7 +3215,7 @@ sqrt(const _Expr& __x) {
return __val_expr<_Op>(_Op(__sqrt_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__tan_expr<typename _Expr::value_type>, _Expr> >
tan(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
@@ -3265,7 +3223,7 @@ tan(const _Expr& __x) {
return __val_expr<_Op>(_Op(__tan_expr<value_type>(), __x));
}
-template <class _Expr, __enable_if_t<__is_val_expr<_Expr>::value, int> = 0>
+template <class _Expr, __enable_if_t<__is_val_expr_v<_Expr>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI __val_expr<_UnaryOp<__tanh_expr<typename _Expr::value_type>, _Expr> >
tanh(const _Expr& __x) {
typedef typename _Expr::value_type value_type;
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 8e958581a6b07..7da308bf8e92d 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -1183,9 +1183,9 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr variant(variant&&) = default;
template < class _Arg,
- enable_if_t<!is_same_v<__remove_cvref_t<_Arg>, variant>, int> = 0,
- enable_if_t<!__is_inplace_type<__remove_cvref_t<_Arg>>::value, int> = 0,
- enable_if_t<!__is_inplace_index<__remove_cvref_t<_Arg>>::value, int> = 0,
+ enable_if_t<!is_same_v<__remove_cvref_t<_Arg>, variant>, int> = 0,
+ enable_if_t<!__is_in_place_type_v<__remove_cvref_t<_Arg>>, int> = 0,
+ enable_if_t<!__is_in_place_index_v<__remove_cvref_t<_Arg>>, int> = 0,
class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
size_t _Ip = __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, _Arg>, int> = 0>
diff --git a/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp
index d7bd701aa706a..2eff784b12aef 100644
--- a/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp
+++ b/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp
@@ -22,10 +22,9 @@ struct ArgumentFunctor {
bool operator()(int, int);
};
-static_assert(std::__is_callable<Functor>::value, "");
-static_assert(std::__is_callable<decltype(func)>::value, "");
-static_assert(!std::__is_callable<NotFunctor>::value, "");
-static_assert(!std::__is_callable<NotFunctor,
- decltype(&NotFunctor::compare)>::value, "");
-static_assert(std::__is_callable<ArgumentFunctor, int, int>::value, "");
-static_assert(!std::__is_callable<ArgumentFunctor, int>::value, "");
+static_assert(std::__is_callable_v<Functor>, "");
+static_assert(std::__is_callable_v<decltype(func)>, "");
+static_assert(!std::__is_callable_v<NotFunctor>, "");
+static_assert(!std::__is_callable_v<NotFunctor, decltype(&NotFunctor::compare)>, "");
+static_assert(std::__is_callable_v<ArgumentFunctor, int, int>, "");
+static_assert(!std::__is_callable_v<ArgumentFunctor, int>, "");
diff --git a/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp
index e2be399456b1b..1243a3dacc559 100644
--- a/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp
+++ b/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp
@@ -14,38 +14,38 @@
enum Enum : int {};
enum class EnumClass : int {};
-static_assert(std::__libcpp_is_trivially_equality_comparable<int, int>::value, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<const int, int>::value, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<int, const int>::value, "");
+static_assert(std::__is_trivially_equality_comparable_v<int, int>, "");
+static_assert(std::__is_trivially_equality_comparable_v<const int, int>, "");
+static_assert(std::__is_trivially_equality_comparable_v<int, const int>, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<unsigned int, unsigned int>::value, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<const unsigned int, unsigned int>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<unsigned int, int>::value, "");
+static_assert(std::__is_trivially_equality_comparable_v<unsigned int, unsigned int>, "");
+static_assert(std::__is_trivially_equality_comparable_v<const unsigned int, unsigned int>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<unsigned int, int>, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<std::int32_t, std::int64_t>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<std::int64_t, std::int32_t>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<std::int32_t, std::int64_t>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<std::int64_t, std::int32_t>, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<int*, int*>::value, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<int*, void*>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<int*, long*>::value, "");
+static_assert(std::__is_trivially_equality_comparable_v<int*, int*>, "");
+static_assert(std::__is_trivially_equality_comparable_v<int*, void*>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<int*, long*>, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<Enum, int>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<EnumClass, int>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<Enum, int>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<EnumClass, int>, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<float, int>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<double, long long>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<float, int>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<double, long long>, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<float, int>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<float, int>, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<float, float>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<double, double>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<long double, long double>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<float, float>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<double, double>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<long double, long double>, "");
-static_assert(std::__libcpp_is_trivially_equality_comparable<
+static_assert(std::__is_trivially_equality_comparable_v<
char,
- typename std::conditional<std::is_signed<char>::value, signed char, unsigned char>::type>::value,
+ typename std::conditional<std::is_signed<char>::value, signed char, unsigned char>::type>,
"");
-static_assert(std::__libcpp_is_trivially_equality_comparable<char16_t, std::uint_least16_t>::value, "");
+static_assert(std::__is_trivially_equality_comparable_v<char16_t, std::uint_least16_t>, "");
struct S {
char c;
@@ -58,8 +58,8 @@ struct S2 {
struct VirtualBase : virtual S {};
struct NonVirtualBase : S, S2 {};
-static_assert(!std::__libcpp_is_trivially_equality_comparable<S*, VirtualBase*>::value, "");
-static_assert(!std::__libcpp_is_trivially_equality_comparable<S2*, VirtualBase*>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<S*, VirtualBase*>, "");
+static_assert(!std::__is_trivially_equality_comparable_v<S2*, VirtualBase*>, "");
// This is trivially_equality_comparable, but we can't detect it currently
-static_assert(!std::__libcpp_is_trivially_equality_comparable<S*, NonVirtualBase*>::value, "");
+static_assert(!std::__is_trivially_equality_comparable_v<S*, NonVirtualBase*>, "");
diff --git a/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp b/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp
index e26f5159603f1..b8e7f40eb0277 100644
--- a/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp
@@ -18,20 +18,20 @@ struct S {};
int main(int, char**) {
using I = std::in_place_index_t<0>;
- static_assert( std::__is_inplace_index<I>::value, "");
- static_assert( std::__is_inplace_index<const I>::value, "");
- static_assert( std::__is_inplace_index<const volatile I>::value, "");
- static_assert( std::__is_inplace_index<I&>::value, "");
- static_assert( std::__is_inplace_index<const I&>::value, "");
- static_assert( std::__is_inplace_index<const volatile I&>::value, "");
- static_assert( std::__is_inplace_index<I&&>::value, "");
- static_assert( std::__is_inplace_index<const I&&>::value, "");
- static_assert( std::__is_inplace_index<const volatile I&&>::value, "");
- static_assert(!std::__is_inplace_index<std::in_place_type_t<int>>::value, "");
- static_assert(!std::__is_inplace_index<std::in_place_t>::value, "");
- static_assert(!std::__is_inplace_index<void>::value, "");
- static_assert(!std::__is_inplace_index<int>::value, "");
- static_assert(!std::__is_inplace_index<S>::value, "");
+ static_assert(std::__is_in_place_index_v<I>, "");
+ static_assert(std::__is_in_place_index_v<const I>, "");
+ static_assert(std::__is_in_place_index_v<const volatile I>, "");
+ static_assert(std::__is_in_place_index_v<I&>, "");
+ static_assert(std::__is_in_place_index_v<const I&>, "");
+ static_assert(std::__is_in_place_index_v<const volatile I&>, "");
+ static_assert(std::__is_in_place_index_v<I&&>, "");
+ static_assert(std::__is_in_place_index_v<const I&&>, "");
+ static_assert(std::__is_in_place_index_v<const volatile I&&>, "");
+ static_assert(!std::__is_in_place_index_v<std::in_place_type_t<int>>, "");
+ static_assert(!std::__is_in_place_index_v<std::in_place_t>, "");
+ static_assert(!std::__is_in_place_index_v<void>, "");
+ static_assert(!std::__is_in_place_index_v<int>, "");
+ static_assert(!std::__is_in_place_index_v<S>, "");
return 0;
}
diff --git a/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp b/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp
index 1179067d7d4ca..ae757c1116088 100644
--- a/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp
@@ -18,20 +18,20 @@ struct S {};
int main(int, char**) {
using T = std::in_place_type_t<int>;
- static_assert( std::__is_inplace_type<T>::value, "");
- static_assert( std::__is_inplace_type<const T>::value, "");
- static_assert( std::__is_inplace_type<const volatile T>::value, "");
- static_assert( std::__is_inplace_type<T&>::value, "");
- static_assert( std::__is_inplace_type<const T&>::value, "");
- static_assert( std::__is_inplace_type<const volatile T&>::value, "");
- static_assert( std::__is_inplace_type<T&&>::value, "");
- static_assert( std::__is_inplace_type<const T&&>::value, "");
- static_assert( std::__is_inplace_type<const volatile T&&>::value, "");
- static_assert(!std::__is_inplace_type<std::in_place_index_t<0>>::value, "");
- static_assert(!std::__is_inplace_type<std::in_place_t>::value, "");
- static_assert(!std::__is_inplace_type<void>::value, "");
- static_assert(!std::__is_inplace_type<int>::value, "");
- static_assert(!std::__is_inplace_type<S>::value, "");
+ static_assert(std::__is_in_place_type_v<T>, "");
+ static_assert(std::__is_in_place_type_v<const T>, "");
+ static_assert(std::__is_in_place_type_v<const volatile T>, "");
+ static_assert(std::__is_in_place_type_v<T&>, "");
+ static_assert(std::__is_in_place_type_v<const T&>, "");
+ static_assert(std::__is_in_place_type_v<const volatile T&>, "");
+ static_assert(std::__is_in_place_type_v<T&&>, "");
+ static_assert(std::__is_in_place_type_v<const T&&>, "");
+ static_assert(std::__is_in_place_type_v<const volatile T&&>, "");
+ static_assert(!std::__is_in_place_type_v<std::in_place_index_t<0>>, "");
+ static_assert(!std::__is_in_place_type_v<std::in_place_t>, "");
+ static_assert(!std::__is_in_place_type_v<void>, "");
+ static_assert(!std::__is_in_place_type_v<int>, "");
+ static_assert(!std::__is_in_place_type_v<S>, "");
return 0;
}
More information about the libcxx-commits
mailing list