[libc++][NFC] Rename _EnableIf to __enable_if_t for consistency
In other places in the code, we use lowercase spelling for things that
are not available in prior standards.
Differential Revision: https://reviews.llvm.org/D109435
NOKEYCHECK=True
GitOrigin-RevId: b4e88d4db12e9460e581de453c8603eb280f145b
diff --git a/include/__functional/bind.h b/include/__functional/bind.h
index 79dfad7..730aad0 100644
--- a/include/__functional/bind.h
+++ b/include/__functional/bind.h
@@ -97,7 +97,7 @@
template <class _Ti, class ..._Uj>
inline _LIBCPP_INLINE_VISIBILITY
-typename _EnableIf
+typename __enable_if_t
<
is_bind_expression<_Ti>::value,
__invoke_of<_Ti&, _Uj...>
diff --git a/include/__functional/reference_wrapper.h b/include/__functional/reference_wrapper.h
index 20b3eed..e1e4abd 100644
--- a/include/__functional/reference_wrapper.h
+++ b/include/__functional/reference_wrapper.h
@@ -46,7 +46,7 @@
reference_wrapper(type& __f) _NOEXCEPT
: __f_(_VSTD::addressof(__f)) {}
#else
- template <class _Up, class = _EnableIf<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(declval<_Up>())) >>
+ template <class _Up, class = __enable_if_t<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(declval<_Up>())) >>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) {
type& __f = static_cast<_Up&&>(__u);
diff --git a/include/__iterator/advance.h b/include/__iterator/advance.h
index 710cfb0..a60052a 100644
--- a/include/__iterator/advance.h
+++ b/include/__iterator/advance.h
@@ -55,7 +55,7 @@
template <
class _InputIter, class _Distance,
class _IntegralDistance = decltype(_VSTD::__convert_to_integral(declval<_Distance>())),
- class = _EnableIf<is_integral<_IntegralDistance>::value> >
+ class = __enable_if_t<is_integral<_IntegralDistance>::value> >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
void advance(_InputIter& __i, _Distance __orig_n) {
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
diff --git a/include/__iterator/iterator_traits.h b/include/__iterator/iterator_traits.h
index fc6e686..54c3e11 100644
--- a/include/__iterator/iterator_traits.h
+++ b/include/__iterator/iterator_traits.h
@@ -76,7 +76,7 @@
};
struct __iter_concept_random_fallback {
template <class _Iter>
- using _Apply = _EnableIf<
+ using _Apply = __enable_if_t<
__is_primary_template<iterator_traits<_Iter> >::value,
random_access_iterator_tag
>;
diff --git a/include/__iterator/move_iterator.h b/include/__iterator/move_iterator.h
index 5824cf8..eac9264 100644
--- a/include/__iterator/move_iterator.h
+++ b/include/__iterator/move_iterator.h
@@ -54,13 +54,13 @@
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
explicit move_iterator(_Iter __x) : __i(__x) {}
- template <class _Up, class = _EnableIf<
+ template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
move_iterator(const move_iterator<_Up>& __u) : __i(__u.base()) {}
- template <class _Up, class = _EnableIf<
+ template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value &&
is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value
diff --git a/include/__iterator/reverse_iterator.h b/include/__iterator/reverse_iterator.h
index 8cb3875..fad9bc1 100644
--- a/include/__iterator/reverse_iterator.h
+++ b/include/__iterator/reverse_iterator.h
@@ -75,7 +75,7 @@
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {}
- template <class _Up, class = _EnableIf<
+ template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
@@ -83,7 +83,7 @@
: __t(__u.base()), current(__u.base())
{ }
- template <class _Up, class = _EnableIf<
+ template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value &&
is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Up const&, _Iter>::value
@@ -100,7 +100,7 @@
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
explicit reverse_iterator(_Iter __x) : current(__x) {}
- template <class _Up, class = _EnableIf<
+ template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
@@ -108,7 +108,7 @@
: current(__u.base())
{ }
- template <class _Up, class = _EnableIf<
+ template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value &&
is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Up const&, _Iter>::value
diff --git a/include/__memory/allocator_traits.h b/include/__memory/allocator_traits.h
index a558d37..f4c8fa0 100644
--- a/include/__memory/allocator_traits.h
+++ b/include/__memory/allocator_traits.h
@@ -263,7 +263,7 @@
}
template <class _Ap = _Alloc, class =
- _EnableIf<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
+ __enable_if_t<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -271,7 +271,7 @@
_LIBCPP_SUPPRESS_DEPRECATED_POP
}
template <class _Ap = _Alloc, class = void, class =
- _EnableIf<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
+ __enable_if_t<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer) {
return __a.allocate(__n);
@@ -283,7 +283,7 @@
}
template <class _Tp, class... _Args, class =
- _EnableIf<__has_construct<allocator_type, _Tp*, _Args...>::value> >
+ __enable_if_t<__has_construct<allocator_type, _Tp*, _Args...>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -291,7 +291,7 @@
_LIBCPP_SUPPRESS_DEPRECATED_POP
}
template <class _Tp, class... _Args, class = void, class =
- _EnableIf<!__has_construct<allocator_type, _Tp*, _Args...>::value> >
+ __enable_if_t<!__has_construct<allocator_type, _Tp*, _Args...>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static void construct(allocator_type&, _Tp* __p, _Args&&... __args) {
#if _LIBCPP_STD_VER > 17
@@ -302,7 +302,7 @@
}
template <class _Tp, class =
- _EnableIf<__has_destroy<allocator_type, _Tp*>::value> >
+ __enable_if_t<__has_destroy<allocator_type, _Tp*>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static void destroy(allocator_type& __a, _Tp* __p) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -310,7 +310,7 @@
_LIBCPP_SUPPRESS_DEPRECATED_POP
}
template <class _Tp, class = void, class =
- _EnableIf<!__has_destroy<allocator_type, _Tp*>::value> >
+ __enable_if_t<!__has_destroy<allocator_type, _Tp*>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static void destroy(allocator_type&, _Tp* __p) {
#if _LIBCPP_STD_VER > 17
@@ -321,7 +321,7 @@
}
template <class _Ap = _Alloc, class =
- _EnableIf<__has_max_size<const _Ap>::value> >
+ __enable_if_t<__has_max_size<const _Ap>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static size_type max_size(const allocator_type& __a) _NOEXCEPT {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -329,20 +329,20 @@
_LIBCPP_SUPPRESS_DEPRECATED_POP
}
template <class _Ap = _Alloc, class = void, class =
- _EnableIf<!__has_max_size<const _Ap>::value> >
+ __enable_if_t<!__has_max_size<const _Ap>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static size_type max_size(const allocator_type&) _NOEXCEPT {
return numeric_limits<size_type>::max() / sizeof(value_type);
}
template <class _Ap = _Alloc, class =
- _EnableIf<__has_select_on_container_copy_construction<const _Ap>::value> >
+ __enable_if_t<__has_select_on_container_copy_construction<const _Ap>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
return __a.select_on_container_copy_construction();
}
template <class _Ap = _Alloc, class = void, class =
- _EnableIf<!__has_select_on_container_copy_construction<const _Ap>::value> >
+ __enable_if_t<!__has_select_on_container_copy_construction<const _Ap>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
return __a;
@@ -374,7 +374,7 @@
{ };
template <class _Alloc>
-struct __is_cpp17_move_insertable<_Alloc, _EnableIf<
+struct __is_cpp17_move_insertable<_Alloc, __enable_if_t<
!__is_default_allocator<_Alloc>::value &&
__has_construct<_Alloc, typename _Alloc::value_type*, typename _Alloc::value_type&&>::value
> > : true_type { };
@@ -389,7 +389,7 @@
{ };
template <class _Alloc>
-struct __is_cpp17_copy_insertable<_Alloc, _EnableIf<
+struct __is_cpp17_copy_insertable<_Alloc, __enable_if_t<
!__is_default_allocator<_Alloc>::value &&
__has_construct<_Alloc, typename _Alloc::value_type*, const typename _Alloc::value_type&>::value
> >
diff --git a/include/__memory/pointer_traits.h b/include/__memory/pointer_traits.h
index c1a4975..07bb6d4 100644
--- a/include/__memory/pointer_traits.h
+++ b/include/__memory/pointer_traits.h
@@ -173,7 +173,7 @@
}
// enable_if is needed here to avoid instantiating checks for fancy pointers on raw pointers
-template <class _Pointer, class = _EnableIf<
+template <class _Pointer, class = __enable_if_t<
!is_pointer<_Pointer>::value && !is_array<_Pointer>::value && !is_function<_Pointer>::value
> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
diff --git a/include/__memory/shared_ptr.h b/include/__memory/shared_ptr.h
index 4551d99..1b9e01f 100644
--- a/include/__memory/shared_ptr.h
+++ b/include/__memory/shared_ptr.h
@@ -437,7 +437,7 @@
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT;
- template<class _Yp, class = _EnableIf<
+ template<class _Yp, class = __enable_if_t<
_And<
__compatible_with<_Yp, _Tp>
// In C++03 we get errors when trying to do SFINAE with the
@@ -1093,7 +1093,7 @@
//
// std::allocate_shared and std::make_shared
//
-template<class _Tp, class _Alloc, class ..._Args, class = _EnableIf<!is_array<_Tp>::value> >
+template<class _Tp, class _Alloc, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args)
{
@@ -1105,7 +1105,7 @@
return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), _VSTD::addressof(*__control_block));
}
-template<class _Tp, class ..._Args, class = _EnableIf<!is_array<_Tp>::value> >
+template<class _Tp, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared(_Args&& ...__args)
{
diff --git a/include/bitset b/include/bitset
index 4b8827e..f9549e8 100644
--- a/include/bitset
+++ b/include/bitset
@@ -679,7 +679,7 @@
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
- template<class _CharT, class = _EnableIf<_IsCharLikeType<_CharT>::value> >
+ template<class _CharT, class = __enable_if_t<_IsCharLikeType<_CharT>::value> >
explicit bitset(const _CharT* __str,
typename basic_string<_CharT>::size_type __n = basic_string<_CharT>::npos,
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
diff --git a/include/math.h b/include/math.h
index 77762d5..8cbbc54 100644
--- a/include/math.h
+++ b/include/math.h
@@ -831,7 +831,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -926,7 +926,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1004,7 +1004,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1158,7 +1158,7 @@
_LIBCPP_CONSTEXPR
#endif
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1185,7 +1185,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1242,7 +1242,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1277,7 +1277,7 @@
template <class _A1, class _A2, class _A3>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value &&
@@ -1304,7 +1304,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1325,7 +1325,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1346,7 +1346,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1553,7 +1553,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1584,7 +1584,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
@@ -1605,7 +1605,7 @@
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::_EnableIf
+typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
diff --git a/include/queue b/include/queue
index 8662fa5..cbd0714 100644
--- a/include/queue
+++ b/include/queue
@@ -279,28 +279,28 @@
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit queue(const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(__a) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
queue(const queue& __q, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(__q.c, __a) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
queue(const container_type& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(__c, __a) {}
#ifndef _LIBCPP_CXX03_LANG
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
queue(container_type&& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(_VSTD::move(__c), __a) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
queue(queue&& __q, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(_VSTD::move(__q.c), __a) {}
#endif // _LIBCPP_CXX03_LANG
@@ -424,7 +424,7 @@
template <class _Tp, class _Container>
inline _LIBCPP_INLINE_VISIBILITY
-_EnableIf<__is_swappable<_Container>::value, void>
+__enable_if_t<__is_swappable<_Container>::value, void>
swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
@@ -491,16 +491,16 @@
_LIBCPP_INLINE_VISIBILITY
priority_queue(const value_compare& __comp, container_type&& __c);
#endif
- template <class _InputIter, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l,
const value_compare& __comp = value_compare());
- template <class _InputIter, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l,
const value_compare& __comp, const container_type& __c);
#ifndef _LIBCPP_CXX03_LANG
- template <class _InputIter, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l,
const value_compare& __comp, container_type&& __c);
@@ -508,55 +508,55 @@
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit priority_queue(const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
priority_queue(const value_compare& __comp, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
priority_queue(const value_compare& __comp, const container_type& __c,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
priority_queue(const priority_queue& __q, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
#ifndef _LIBCPP_CXX03_LANG
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
priority_queue(const value_compare& __comp, container_type&& __c,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
priority_queue(priority_queue&& __q, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
#endif // _LIBCPP_CXX03_LANG
- template <class _InputIter, class _Alloc, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
- template <class _InputIter, class _Alloc, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l,
const value_compare& __comp, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
- template <class _InputIter, class _Alloc, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l,
const value_compare& __comp, const container_type& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
#ifndef _LIBCPP_CXX03_LANG
- template <class _InputIter, class _Alloc, class = _EnableIf<__is_cpp17_input_iterator<_InputIter>::value> >
+ template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
_LIBCPP_INLINE_VISIBILITY
priority_queue(_InputIter __f, _InputIter __l,
const value_compare& __comp, container_type&& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0);
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
#endif // _LIBCPP_CXX03_LANG
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
@@ -710,7 +710,7 @@
template <class _Alloc>
inline
priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__a)
{
}
@@ -720,7 +720,7 @@
inline
priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__a),
comp(__comp)
{
@@ -732,7 +732,7 @@
priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
const container_type& __c,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__c, __a),
comp(__comp)
{
@@ -744,7 +744,7 @@
inline
priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue& __q,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__q.c, __a),
comp(__q.comp)
{
@@ -758,7 +758,7 @@
priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
container_type&& __c,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(_VSTD::move(__c), __a),
comp(__comp)
{
@@ -770,7 +770,7 @@
inline
priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(_VSTD::move(__q.c), __a),
comp(_VSTD::move(__q.comp))
{
@@ -783,7 +783,7 @@
inline
priority_queue<_Tp, _Container, _Compare>::priority_queue(
_InputIter __f, _InputIter __l, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__f, __l, __a),
comp()
{
@@ -796,7 +796,7 @@
priority_queue<_Tp, _Container, _Compare>::priority_queue(
_InputIter __f, _InputIter __l,
const value_compare& __comp, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__f, __l, __a),
comp(__comp)
{
@@ -809,7 +809,7 @@
priority_queue<_Tp, _Container, _Compare>::priority_queue(
_InputIter __f, _InputIter __l,
const value_compare& __comp, const container_type& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(__c, __a),
comp(__comp)
{
@@ -824,7 +824,7 @@
priority_queue<_Tp, _Container, _Compare>::priority_queue(
_InputIter __f, _InputIter __l, const value_compare& __comp,
container_type&& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>*)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
: c(_VSTD::move(__c), __a),
comp(__comp)
{
@@ -888,7 +888,7 @@
template <class _Tp, class _Container, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY
-_EnableIf<
+__enable_if_t<
__is_swappable<_Container>::value && __is_swappable<_Compare>::value,
void
>
diff --git a/include/stack b/include/stack
index 79cc15d..436993c 100644
--- a/include/stack
+++ b/include/stack
@@ -158,28 +158,28 @@
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit stack(const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(__a) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
stack(const container_type& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(__c, __a) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
stack(const stack& __s, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(__s.c, __a) {}
#ifndef _LIBCPP_CXX03_LANG
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
stack(container_type&& __c, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(_VSTD::move(__c), __a) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
stack(stack&& __s, const _Alloc& __a,
- _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
+ __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
: c(_VSTD::move(__s.c), __a) {}
#endif // _LIBCPP_CXX03_LANG
@@ -297,7 +297,7 @@
template <class _Tp, class _Container>
inline _LIBCPP_INLINE_VISIBILITY
-_EnableIf<__is_swappable<_Container>::value, void>
+__enable_if_t<__is_swappable<_Container>::value, void>
swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
diff --git a/include/string b/include/string
index f2606cb..8696bdf 100644
--- a/include/string
+++ b/include/string
@@ -832,7 +832,7 @@
basic_string(basic_string&& __str, const allocator_type& __a);
#endif // _LIBCPP_CXX03_LANG
- template <class = _EnableIf<__is_allocator<_Allocator>::value, nullptr_t> >
+ template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
_LIBCPP_INLINE_VISIBILITY
basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
_LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
@@ -842,7 +842,7 @@
# endif
}
- template <class = _EnableIf<__is_allocator<_Allocator>::value, nullptr_t> >
+ template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
_LIBCPP_INLINE_VISIBILITY
basic_string(const _CharT* __s, const _Allocator& __a);
@@ -857,7 +857,7 @@
_LIBCPP_INLINE_VISIBILITY
basic_string(size_type __n, _CharT __c);
- template <class = _EnableIf<__is_allocator<_Allocator>::value, nullptr_t> >
+ template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
_LIBCPP_INLINE_VISIBILITY
basic_string(size_type __n, _CharT __c, const _Allocator& __a);
@@ -867,24 +867,24 @@
basic_string(const basic_string& __str, size_type __pos,
const _Allocator& __a = _Allocator());
- template<class _Tp, class = _EnableIf<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
+ template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
basic_string(const _Tp& __t, size_type __pos, size_type __n,
const allocator_type& __a = allocator_type());
- template<class _Tp, class = _EnableIf<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
+ template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value> >
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
explicit basic_string(const _Tp& __t);
- template<class _Tp, class = _EnableIf<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
+ template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
explicit basic_string(const _Tp& __t, const allocator_type& __a);
- template<class _InputIterator, class = _EnableIf<__is_cpp17_input_iterator<_InputIterator>::value> >
+ template<class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
_LIBCPP_INLINE_VISIBILITY
basic_string(_InputIterator __first, _InputIterator __last);
- template<class _InputIterator, class = _EnableIf<__is_cpp17_input_iterator<_InputIterator>::value> >
+ template<class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
_LIBCPP_INLINE_VISIBILITY
basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
#ifndef _LIBCPP_CXX03_LANG
@@ -901,7 +901,7 @@
basic_string& operator=(const basic_string& __str);
- template <class _Tp, class = _EnableIf<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
+ template <class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
basic_string& operator=(const _Tp& __t)
{__self_view __sv = __t; return assign(__sv);}
@@ -1004,7 +1004,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string >::value,
@@ -1022,7 +1022,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf<
+ __enable_if_t<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string>::value,
basic_string&
@@ -1032,7 +1032,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string>::value,
@@ -1048,7 +1048,7 @@
template<class _InputIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
basic_string&
@@ -1061,7 +1061,7 @@
}
template<class _ForwardIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
basic_string&
@@ -1084,7 +1084,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -1101,7 +1101,7 @@
basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string>::value,
@@ -1113,7 +1113,7 @@
basic_string& assign(size_type __n, value_type __c);
template<class _InputIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
basic_string&
@@ -1121,7 +1121,7 @@
assign(_InputIterator __first, _InputIterator __last);
template<class _ForwardIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
basic_string&
@@ -1137,7 +1137,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -1147,7 +1147,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
basic_string&
@@ -1162,7 +1162,7 @@
iterator insert(const_iterator __pos, size_type __n, value_type __c);
template<class _InputIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
iterator
@@ -1170,7 +1170,7 @@
insert(const_iterator __pos, _InputIterator __first, _InputIterator __last);
template<class _ForwardIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
iterator
@@ -1193,7 +1193,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -1202,7 +1202,7 @@
basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2=npos);
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
basic_string&
@@ -1216,7 +1216,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -1231,7 +1231,7 @@
basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
template<class _InputIterator>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__is_cpp17_input_iterator<_InputIterator>::value,
basic_string&
@@ -1273,7 +1273,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
@@ -1289,7 +1289,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
@@ -1305,7 +1305,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
@@ -1322,7 +1322,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
@@ -1339,7 +1339,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
@@ -1356,7 +1356,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
@@ -1373,7 +1373,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
int
@@ -1382,7 +1382,7 @@
template <class _Tp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
int
@@ -1395,7 +1395,7 @@
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
int
@@ -1591,7 +1591,7 @@
template <class _InputIterator>
inline
- _EnableIf
+ __enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value
>
@@ -1599,7 +1599,7 @@
template <class _ForwardIterator>
inline
- _EnableIf
+ __enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value
>
@@ -2136,7 +2136,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator>
-_EnableIf
+__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value
>
@@ -2162,7 +2162,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator>
-_EnableIf
+__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value
>
@@ -2491,7 +2491,7 @@
template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator>
-_EnableIf
+__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -2505,7 +2505,7 @@
template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator>
-_EnableIf
+__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -2551,7 +2551,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -2684,7 +2684,7 @@
template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator>
-_EnableIf
+__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -2737,7 +2737,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
- _EnableIf
+ __enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -2826,7 +2826,7 @@
template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator>
-_EnableIf
+__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
typename basic_string<_CharT, _Traits, _Allocator>::iterator
@@ -2844,7 +2844,7 @@
template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator>
-_EnableIf
+__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
typename basic_string<_CharT, _Traits, _Allocator>::iterator
@@ -2914,7 +2914,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -3071,7 +3071,7 @@
template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator>
-_EnableIf
+__enable_if_t
<
__is_cpp17_input_iterator<_InputIterator>::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -3104,7 +3104,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
basic_string<_CharT, _Traits, _Allocator>&
@@ -3563,7 +3563,7 @@
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -3621,7 +3621,7 @@
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -3679,7 +3679,7 @@
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -3737,7 +3737,7 @@
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -3795,7 +3795,7 @@
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -3854,7 +3854,7 @@
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -3892,7 +3892,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
int
@@ -3946,7 +3946,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
int
@@ -3971,7 +3971,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_EnableIf
+__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
diff --git a/include/tuple b/include/tuple
index 986d4da..01073e6 100644
--- a/include/tuple
+++ b/include/tuple
@@ -231,7 +231,7 @@
"Attempted to default construct a reference element in a tuple");}
template <class _Tp,
- class = _EnableIf<
+ class = __enable_if_t<
_And<
_IsNotSame<__uncvref_t<_Tp>, __tuple_leaf>,
is_constructible<_Hp, _Tp>
@@ -304,7 +304,7 @@
: _Hp(__a) {}
template <class _Tp,
- class = _EnableIf<
+ class = __enable_if_t<
_And<
_IsNotSame<__uncvref_t<_Tp>, __tuple_leaf>,
is_constructible<_Hp, _Tp>
@@ -466,7 +466,7 @@
// [tuple.cnstr]
// tuple() constructors (including allocator_arg_t variants)
- template <template<class...> class _IsImpDefault = __is_implicitly_default_constructible, _EnableIf<
+ template <template<class...> class _IsImpDefault = __is_implicitly_default_constructible, __enable_if_t<
_And<
_IsImpDefault<_Tp>... // explicit check
>::value
@@ -477,7 +477,7 @@
{ }
template <template<class...> class _IsImpDefault = __is_implicitly_default_constructible,
- template<class...> class _IsDefault = is_default_constructible, _EnableIf<
+ template<class...> class _IsDefault = is_default_constructible, __enable_if_t<
_And<
_IsDefault<_Tp>...,
_Not<_Lazy<_And, _IsImpDefault<_Tp>...> > // explicit check
@@ -488,7 +488,7 @@
_NOEXCEPT_(_And<is_nothrow_default_constructible<_Tp>...>::value)
{ }
- template <class _Alloc, template<class...> class _IsImpDefault = __is_implicitly_default_constructible, _EnableIf<
+ template <class _Alloc, template<class...> class _IsImpDefault = __is_implicitly_default_constructible, __enable_if_t<
_And<
_IsImpDefault<_Tp>... // explicit check
>::value
@@ -502,7 +502,7 @@
template <class _Alloc,
template<class...> class _IsImpDefault = __is_implicitly_default_constructible,
- template<class...> class _IsDefault = is_default_constructible, _EnableIf<
+ template<class...> class _IsDefault = is_default_constructible, __enable_if_t<
_And<
_IsDefault<_Tp>...,
_Not<_Lazy<_And, _IsImpDefault<_Tp>...> > // explicit check
@@ -516,7 +516,7 @@
__tuple_types<_Tp...>()) {}
// tuple(const T&...) constructors (including allocator_arg_t variants)
- template <template<class...> class _And = _And, _EnableIf<
+ template <template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) >= 1>,
is_copy_constructible<_Tp>...,
@@ -533,7 +533,7 @@
__t...
) {}
- template <template<class...> class _And = _And, _EnableIf<
+ template <template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) >= 1>,
is_copy_constructible<_Tp>...,
@@ -550,7 +550,7 @@
__t...
) {}
- template <class _Alloc, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) >= 1>,
is_copy_constructible<_Tp>...,
@@ -567,7 +567,7 @@
__t...
) {}
- template <class _Alloc, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) >= 1>,
is_copy_constructible<_Tp>...,
@@ -595,7 +595,7 @@
is_constructible<_Tp, _Up>...
> { };
- template <class ..._Up, _EnableIf<
+ template <class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableUTypesCtor<_Up...>,
@@ -611,7 +611,7 @@
typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
_VSTD::forward<_Up>(__u)...) {}
- template <class ..._Up, _EnableIf<
+ template <class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableUTypesCtor<_Up...>,
@@ -627,7 +627,7 @@
typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
_VSTD::forward<_Up>(__u)...) {}
- template <class _Alloc, class ..._Up, _EnableIf<
+ template <class _Alloc, class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableUTypesCtor<_Up...>,
@@ -643,7 +643,7 @@
typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
_VSTD::forward<_Up>(__u)...) {}
- template <class _Alloc, class ..._Up, _EnableIf<
+ template <class _Alloc, class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableUTypesCtor<_Up...>,
@@ -663,14 +663,14 @@
tuple(const tuple&) = default;
tuple(tuple&&) = default;
- template <class _Alloc, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
_And<is_copy_constructible<_Tp>...>::value
, int> = 0>
tuple(allocator_arg_t, const _Alloc& __alloc, const tuple& __t)
: __base_(allocator_arg_t(), __alloc, __t)
{ }
- template <class _Alloc, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
_And<is_move_constructible<_Tp>...>::value
, int> = 0>
tuple(allocator_arg_t, const _Alloc& __alloc, tuple&& __t)
@@ -693,7 +693,7 @@
is_constructible<_Tp, const _Up&>...
> { };
- template <class ..._Up, _EnableIf<
+ template <class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableCopyFromOtherTuple<_Up...>,
@@ -706,7 +706,7 @@
: __base_(__t)
{ }
- template <class ..._Up, _EnableIf<
+ template <class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableCopyFromOtherTuple<_Up...>,
@@ -719,7 +719,7 @@
: __base_(__t)
{ }
- template <class ..._Up, class _Alloc, _EnableIf<
+ template <class ..._Up, class _Alloc, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableCopyFromOtherTuple<_Up...>,
@@ -731,7 +731,7 @@
: __base_(allocator_arg_t(), __a, __t)
{ }
- template <class ..._Up, class _Alloc, _EnableIf<
+ template <class ..._Up, class _Alloc, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableCopyFromOtherTuple<_Up...>,
@@ -759,7 +759,7 @@
is_constructible<_Tp, _Up>...
> { };
- template <class ..._Up, _EnableIf<
+ template <class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableMoveFromOtherTuple<_Up...>,
@@ -772,7 +772,7 @@
: __base_(_VSTD::move(__t))
{ }
- template <class ..._Up, _EnableIf<
+ template <class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableMoveFromOtherTuple<_Up...>,
@@ -785,7 +785,7 @@
: __base_(_VSTD::move(__t))
{ }
- template <class _Alloc, class ..._Up, _EnableIf<
+ template <class _Alloc, class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableMoveFromOtherTuple<_Up...>,
@@ -797,7 +797,7 @@
: __base_(allocator_arg_t(), __a, _VSTD::move(__t))
{ }
- template <class _Alloc, class ..._Up, _EnableIf<
+ template <class _Alloc, class ..._Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
_EnableMoveFromOtherTuple<_Up...>,
@@ -826,7 +826,7 @@
_Not<is_convertible<const _Up2&, _SecondType<_DependentTp...> > >
> { };
- template <class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableImplicitCopyFromPair<_Up1, _Up2, _Tp...>
@@ -841,7 +841,7 @@
: __base_(__p)
{ }
- template <class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableExplicitCopyFromPair<_Up1, _Up2, _Tp...>
@@ -856,7 +856,7 @@
: __base_(__p)
{ }
- template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableImplicitCopyFromPair<_Up1, _Up2, _Tp...>
@@ -867,7 +867,7 @@
: __base_(allocator_arg_t(), __a, __p)
{ }
- template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableExplicitCopyFromPair<_Up1, _Up2, _Tp...>
@@ -895,7 +895,7 @@
_Not<is_convertible<_Up2, _SecondType<_DependentTp...> > >
> { };
- template <class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableImplicitMoveFromPair<_Up1, _Up2, _Tp...>
@@ -910,7 +910,7 @@
: __base_(_VSTD::move(__p))
{ }
- template <class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableExplicitMoveFromPair<_Up1, _Up2, _Tp...>
@@ -925,7 +925,7 @@
: __base_(_VSTD::move(__p))
{ }
- template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableImplicitMoveFromPair<_Up1, _Up2, _Tp...>
@@ -936,7 +936,7 @@
: __base_(allocator_arg_t(), __a, _VSTD::move(__p))
{ }
- template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, _EnableIf<
+ template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == 2>,
_EnableExplicitMoveFromPair<_Up1, _Up2, _Tp...>
@@ -967,7 +967,7 @@
return *this;
}
- template<class... _Up, _EnableIf<
+ template<class... _Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>,
is_assignable<_Tp&, _Up const&>...
@@ -982,7 +982,7 @@
return *this;
}
- template<class... _Up, _EnableIf<
+ template<class... _Up, __enable_if_t<
_And<
_BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>,
is_assignable<_Tp&, _Up>...
@@ -998,7 +998,7 @@
return *this;
}
- template<class _Up1, class _Up2, class _Dep = true_type, _EnableIf<
+ template<class _Up1, class _Up2, class _Dep = true_type, __enable_if_t<
_And<_Dep,
_BoolConstant<sizeof...(_Tp) == 2>,
is_assignable<_FirstType<_Tp..., _Dep>&, _Up1 const&>,
@@ -1017,7 +1017,7 @@
return *this;
}
- template<class _Up1, class _Up2, class _Dep = true_type, _EnableIf<
+ template<class _Up1, class _Up2, class _Dep = true_type, __enable_if_t<
_And<_Dep,
_BoolConstant<sizeof...(_Tp) == 2>,
is_assignable<_FirstType<_Tp..., _Dep>&, _Up1>,
@@ -1037,7 +1037,7 @@
}
// EXTENSION
- template<class _Up, size_t _Np, class = _EnableIf<
+ template<class _Up, size_t _Np, class = __enable_if_t<
_And<
_BoolConstant<_Np == sizeof...(_Tp)>,
is_assignable<_Tp&, _Up const&>...
@@ -1053,7 +1053,7 @@
}
// EXTENSION
- template<class _Up, size_t _Np, class = void, class = _EnableIf<
+ template<class _Up, size_t _Np, class = void, class = __enable_if_t<
_And<
_BoolConstant<_Np == sizeof...(_Tp)>,
is_assignable<_Tp&, _Up>...
diff --git a/include/type_traits b/include/type_traits
index b0f18c8..15cff1f 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -458,7 +458,7 @@
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {typedef _Tp type;};
-template <bool _Bp, class _Tp = void> using _EnableIf _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;
+template <bool _Bp, class _Tp = void> using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;
#if _LIBCPP_STD_VER > 11
template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
@@ -507,7 +507,7 @@
template <class ...> using __expand_to_true = true_type;
template <class ..._Pred>
-__expand_to_true<_EnableIf<_Pred::value>...> __and_helper(int);
+__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
template <class ...>
false_type __and_helper(...);
template <class ..._Pred>
@@ -593,7 +593,7 @@
template <class _Tp>
-using __test_for_primary_template = _EnableIf<
+using __test_for_primary_template = __enable_if_t<
_IsSame<_Tp, typename _Tp::__primary_template>::value
>;
template <class _Tp>