diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h --- a/libcxx/include/__functional/bind.h +++ b/libcxx/include/__functional/bind.h @@ -97,7 +97,7 @@ template inline _LIBCPP_INLINE_VISIBILITY -typename _EnableIf +typename __enable_if_t < is_bind_expression<_Ti>::value, __invoke_of<_Ti&, _Uj...> diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -46,7 +46,7 @@ reference_wrapper(type& __f) _NOEXCEPT : __f_(_VSTD::addressof(__f)) {} #else - template ::value, decltype(__fun(declval<_Up>())) >> + template ::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/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -55,7 +55,7 @@ template < class _InputIter, class _Distance, class _IntegralDistance = decltype(_VSTD::__convert_to_integral(declval<_Distance>())), - class = _EnableIf::value> > + class = __enable_if_t::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/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -76,7 +76,7 @@ }; struct __iter_concept_random_fallback { template - using _Apply = _EnableIf< + using _Apply = __enable_if_t< __is_primary_template >::value, random_access_iterator_tag >; diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h --- a/libcxx/include/__iterator/move_iterator.h +++ b/libcxx/include/__iterator/move_iterator.h @@ -54,13 +54,13 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 explicit move_iterator(_Iter __x) : __i(__x) {} - template ::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 ::value && is_convertible<_Up const&, _Iter>::value && is_assignable<_Iter&, _Up const&>::value diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/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 ::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 ::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 ::value && is_convertible<_Up const&, _Iter>::value > > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 @@ -108,7 +108,7 @@ : current(__u.base()) { } - template ::value && is_convertible<_Up const&, _Iter>::value && is_assignable<_Up const&, _Iter>::value diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -263,7 +263,7 @@ } template ::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 ::value> > + __enable_if_t::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 ::value> > + __enable_if_t<__has_construct::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 ::value> > + __enable_if_t::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 ::value> > + __enable_if_t<__has_destroy::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 ::value> > + __enable_if_t::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 ::value> > + __enable_if_t<__has_max_size::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 ::value> > + __enable_if_t::value> > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static size_type max_size(const allocator_type&) _NOEXCEPT { return numeric_limits::max() / sizeof(value_type); } template ::value> > + __enable_if_t<__has_select_on_container_copy_construction::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 ::value> > + __enable_if_t::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 -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 -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/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/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 ::value && !is_array<_Pointer>::value && !is_function<_Pointer>::value > > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -437,7 +437,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT; - template // 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::value> > +template::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::value> > +template::value> > _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> make_shared(_Args&& ...__args) { diff --git a/libcxx/include/bitset b/libcxx/include/bitset --- a/libcxx/include/bitset +++ b/libcxx/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::value> > + template::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/libcxx/include/math.h b/libcxx/include/math.h --- a/libcxx/include/math.h +++ b/libcxx/include/math.h @@ -831,7 +831,7 @@ template 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 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 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 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 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 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 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 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 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 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 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 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/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -279,28 +279,28 @@ template _LIBCPP_INLINE_VISIBILITY explicit queue(const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(__a) {} template _LIBCPP_INLINE_VISIBILITY queue(const queue& __q, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(__q.c, __a) {} template _LIBCPP_INLINE_VISIBILITY queue(const container_type& __c, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(__c, __a) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY queue(container_type&& __c, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(_VSTD::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY queue(queue&& __q, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(_VSTD::move(__q.c), __a) {} #endif // _LIBCPP_CXX03_LANG @@ -424,7 +424,7 @@ template 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 ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp = value_compare()); - template ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const container_type& __c); #ifndef _LIBCPP_CXX03_LANG - template ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c); @@ -508,55 +508,55 @@ template _LIBCPP_INLINE_VISIBILITY explicit priority_queue(const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); template _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); template _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const container_type& __c, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); template _LIBCPP_INLINE_VISIBILITY priority_queue(const priority_queue& __q, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, container_type&& __c, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); template _LIBCPP_INLINE_VISIBILITY priority_queue(priority_queue&& __q, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); #endif // _LIBCPP_CXX03_LANG - template ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); - template ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); - template ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const container_type& __c, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); #ifndef _LIBCPP_CXX03_LANG - template ::value> > + template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c, const _Alloc& __a, - _EnableIf::value>* = 0); + __enable_if_t::value>* = 0); #endif // _LIBCPP_CXX03_LANG _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY @@ -710,7 +710,7 @@ template inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Alloc& __a, - _EnableIf::value>*) + __enable_if_t::value>*) : c(__a) { } @@ -720,7 +720,7 @@ inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp, const _Alloc& __a, - _EnableIf::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::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::value>*) + __enable_if_t::value>*) : c(_VSTD::move(__c), __a), comp(__comp) { @@ -888,7 +888,7 @@ template inline _LIBCPP_INLINE_VISIBILITY -_EnableIf< +__enable_if_t< __is_swappable<_Container>::value && __is_swappable<_Compare>::value, void > diff --git a/libcxx/include/stack b/libcxx/include/stack --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -158,28 +158,28 @@ template _LIBCPP_INLINE_VISIBILITY explicit stack(const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(__a) {} template _LIBCPP_INLINE_VISIBILITY stack(const container_type& __c, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(__c, __a) {} template _LIBCPP_INLINE_VISIBILITY stack(const stack& __s, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(__s.c, __a) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY stack(container_type&& __c, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(_VSTD::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY stack(stack&& __s, const _Alloc& __a, - _EnableIf::value>* = 0) + __enable_if_t::value>* = 0) : c(_VSTD::move(__s.c), __a) {} #endif // _LIBCPP_CXX03_LANG @@ -297,7 +297,7 @@ template 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/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -832,7 +832,7 @@ basic_string(basic_string&& __str, const allocator_type& __a); #endif // _LIBCPP_CXX03_LANG - template ::value, nullptr_t> > + template ::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 ::value, nullptr_t> > + template ::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 ::value, nullptr_t> > + template ::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::value && !__is_same_uncvref<_Tp, basic_string>::value> > + template::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::value && + template::value && !__is_same_uncvref<_Tp, basic_string>::value> > _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit basic_string(const _Tp& __t); - template::value && !__is_same_uncvref<_Tp, basic_string>::value> > + template::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::value> > + template::value> > _LIBCPP_INLINE_VISIBILITY basic_string(_InputIterator __first, _InputIterator __last); - template::value> > + template::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 ::value && !__is_same_uncvref<_Tp, basic_string>::value> > + template ::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 _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 _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 _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 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS - _EnableIf + __enable_if_t < __is_exactly_cpp17_input_iterator<_InputIterator>::value, basic_string& @@ -1061,7 +1061,7 @@ } template _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS - _EnableIf + __enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value, basic_string& @@ -1084,7 +1084,7 @@ template _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 _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 _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 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS - _EnableIf + __enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value, basic_string& @@ -1137,7 +1137,7 @@ template _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 _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 _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 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS - _EnableIf + __enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value, iterator @@ -1193,7 +1193,7 @@ template _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 _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 _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 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS - _EnableIf + __enable_if_t < __is_cpp17_input_iterator<_InputIterator>::value, basic_string& @@ -1273,7 +1273,7 @@ template _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 _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 _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 _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 _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 _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 _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 _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 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 inline - _EnableIf + __enable_if_t < __is_exactly_cpp17_input_iterator<_InputIterator>::value > @@ -1599,7 +1599,7 @@ template inline - _EnableIf + __enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value > @@ -2136,7 +2136,7 @@ template template -_EnableIf +__enable_if_t < __is_exactly_cpp17_input_iterator<_InputIterator>::value > @@ -2162,7 +2162,7 @@ template template -_EnableIf +__enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value > @@ -2491,7 +2491,7 @@ template template -_EnableIf +__enable_if_t < __is_exactly_cpp17_input_iterator<_InputIterator>::value, basic_string<_CharT, _Traits, _Allocator>& @@ -2505,7 +2505,7 @@ template template -_EnableIf +__enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value, basic_string<_CharT, _Traits, _Allocator>& @@ -2551,7 +2551,7 @@ template template -_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 template -_EnableIf +__enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value, basic_string<_CharT, _Traits, _Allocator>& @@ -2737,7 +2737,7 @@ template template - _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 template -_EnableIf +__enable_if_t < __is_exactly_cpp17_input_iterator<_InputIterator>::value, typename basic_string<_CharT, _Traits, _Allocator>::iterator @@ -2844,7 +2844,7 @@ template template -_EnableIf +__enable_if_t < __is_cpp17_forward_iterator<_ForwardIterator>::value, typename basic_string<_CharT, _Traits, _Allocator>::iterator @@ -2914,7 +2914,7 @@ template template -_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 template -_EnableIf +__enable_if_t < __is_cpp17_input_iterator<_InputIterator>::value, basic_string<_CharT, _Traits, _Allocator>& @@ -3104,7 +3104,7 @@ template template -_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 template -_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 template -_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 template -_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 template -_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 template -_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 template -_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 template -_EnableIf +__enable_if_t < __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int @@ -3946,7 +3946,7 @@ template template -_EnableIf +__enable_if_t < __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int @@ -3971,7 +3971,7 @@ template template -_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/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -231,7 +231,7 @@ "Attempted to default construct a reference element in a tuple");} template , __tuple_leaf>, is_constructible<_Hp, _Tp> @@ -304,7 +304,7 @@ : _Hp(__a) {} template , __tuple_leaf>, is_constructible<_Hp, _Tp> @@ -466,7 +466,7 @@ // [tuple.cnstr] // tuple() constructors (including allocator_arg_t variants) - template class _IsImpDefault = __is_implicitly_default_constructible, _EnableIf< + template class _IsImpDefault = __is_implicitly_default_constructible, __enable_if_t< _And< _IsImpDefault<_Tp>... // explicit check >::value @@ -477,7 +477,7 @@ { } template class _IsImpDefault = __is_implicitly_default_constructible, - template class _IsDefault = is_default_constructible, _EnableIf< + template class _IsDefault = is_default_constructible, __enable_if_t< _And< _IsDefault<_Tp>..., _Not<_Lazy<_And, _IsImpDefault<_Tp>...> > // explicit check @@ -488,7 +488,7 @@ _NOEXCEPT_(_And...>::value) { } - template class _IsImpDefault = __is_implicitly_default_constructible, _EnableIf< + template class _IsImpDefault = __is_implicitly_default_constructible, __enable_if_t< _And< _IsImpDefault<_Tp>... // explicit check >::value @@ -502,7 +502,7 @@ template class _IsImpDefault = __is_implicitly_default_constructible, - template class _IsDefault = is_default_constructible, _EnableIf< + template 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 class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant= 1>, is_copy_constructible<_Tp>..., @@ -533,7 +533,7 @@ __t... ) {} - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant= 1>, is_copy_constructible<_Tp>..., @@ -550,7 +550,7 @@ __t... ) {} - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant= 1>, is_copy_constructible<_Tp>..., @@ -567,7 +567,7 @@ __t... ) {} - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant= 1>, is_copy_constructible<_Tp>..., @@ -595,7 +595,7 @@ is_constructible<_Tp, _Up>... > { }; - template , _EnableUTypesCtor<_Up...>, @@ -611,7 +611,7 @@ typename __make_tuple_types::type(), _VSTD::forward<_Up>(__u)...) {} - template , _EnableUTypesCtor<_Up...>, @@ -627,7 +627,7 @@ typename __make_tuple_types::type(), _VSTD::forward<_Up>(__u)...) {} - template , _EnableUTypesCtor<_Up...>, @@ -643,7 +643,7 @@ typename __make_tuple_types::type(), _VSTD::forward<_Up>(__u)...) {} - template , _EnableUTypesCtor<_Up...>, @@ -663,14 +663,14 @@ tuple(const tuple&) = default; tuple(tuple&&) = default; - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And...>::value , int> = 0> tuple(allocator_arg_t, const _Alloc& __alloc, const tuple& __t) : __base_(allocator_arg_t(), __alloc, __t) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And...>::value , int> = 0> tuple(allocator_arg_t, const _Alloc& __alloc, tuple&& __t) @@ -693,7 +693,7 @@ is_constructible<_Tp, const _Up&>... > { }; - template , _EnableCopyFromOtherTuple<_Up...>, @@ -706,7 +706,7 @@ : __base_(__t) { } - template , _EnableCopyFromOtherTuple<_Up...>, @@ -719,7 +719,7 @@ : __base_(__t) { } - template , _EnableCopyFromOtherTuple<_Up...>, @@ -731,7 +731,7 @@ : __base_(allocator_arg_t(), __a, __t) { } - template , _EnableCopyFromOtherTuple<_Up...>, @@ -759,7 +759,7 @@ is_constructible<_Tp, _Up>... > { }; - template , _EnableMoveFromOtherTuple<_Up...>, @@ -772,7 +772,7 @@ : __base_(_VSTD::move(__t)) { } - template , _EnableMoveFromOtherTuple<_Up...>, @@ -785,7 +785,7 @@ : __base_(_VSTD::move(__t)) { } - template , _EnableMoveFromOtherTuple<_Up...>, @@ -797,7 +797,7 @@ : __base_(allocator_arg_t(), __a, _VSTD::move(__t)) { } - template , _EnableMoveFromOtherTuple<_Up...>, @@ -826,7 +826,7 @@ _Not > > > { }; - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableImplicitCopyFromPair<_Up1, _Up2, _Tp...> @@ -841,7 +841,7 @@ : __base_(__p) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableExplicitCopyFromPair<_Up1, _Up2, _Tp...> @@ -856,7 +856,7 @@ : __base_(__p) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableImplicitCopyFromPair<_Up1, _Up2, _Tp...> @@ -867,7 +867,7 @@ : __base_(allocator_arg_t(), __a, __p) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableExplicitCopyFromPair<_Up1, _Up2, _Tp...> @@ -895,7 +895,7 @@ _Not > > > { }; - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableImplicitMoveFromPair<_Up1, _Up2, _Tp...> @@ -910,7 +910,7 @@ : __base_(_VSTD::move(__p)) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableExplicitMoveFromPair<_Up1, _Up2, _Tp...> @@ -925,7 +925,7 @@ : __base_(_VSTD::move(__p)) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableImplicitMoveFromPair<_Up1, _Up2, _Tp...> @@ -936,7 +936,7 @@ : __base_(allocator_arg_t(), __a, _VSTD::move(__p)) { } - template class _And = _And, _EnableIf< + template class _And = _And, __enable_if_t< _And< _BoolConstant, _EnableExplicitMoveFromPair<_Up1, _Up2, _Tp...> @@ -967,7 +967,7 @@ return *this; } - template, is_assignable<_Tp&, _Up const&>... @@ -982,7 +982,7 @@ return *this; } - template, is_assignable<_Tp&, _Up>... @@ -998,7 +998,7 @@ return *this; } - template, is_assignable<_FirstType<_Tp..., _Dep>&, _Up1 const&>, @@ -1017,7 +1017,7 @@ return *this; } - template, is_assignable<_FirstType<_Tp..., _Dep>&, _Up1>, @@ -1037,7 +1037,7 @@ } // EXTENSION - template, is_assignable<_Tp&, _Up const&>... @@ -1053,7 +1053,7 @@ } // EXTENSION - template, is_assignable<_Tp&, _Up>... diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -458,7 +458,7 @@ template struct _LIBCPP_TEMPLATE_VIS enable_if {}; template struct _LIBCPP_TEMPLATE_VIS enable_if {typedef _Tp type;}; -template using _EnableIf _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type; +template using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type; #if _LIBCPP_STD_VER > 11 template using enable_if_t = typename enable_if<_Bp, _Tp>::type; @@ -507,7 +507,7 @@ template using __expand_to_true = true_type; template -__expand_to_true<_EnableIf<_Pred::value>...> __and_helper(int); +__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int); template false_type __and_helper(...); template @@ -593,7 +593,7 @@ template -using __test_for_primary_template = _EnableIf< +using __test_for_primary_template = __enable_if_t< _IsSame<_Tp, typename _Tp::__primary_template>::value >; template