diff --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h --- a/libcxx/include/__functional/bind_back.h +++ b/libcxx/include/__functional/bind_back.h @@ -44,7 +44,7 @@ using __perfect_forward<__bind_back_op>, _Fn, _BoundArgs>::__perfect_forward; }; -template , _Fn>, is_move_constructible>, diff --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h --- a/libcxx/include/__functional/bind_front.h +++ b/libcxx/include/__functional/bind_front.h @@ -38,7 +38,7 @@ using __perfect_forward<__bind_front_op, _Fn, _BoundArgs...>::__perfect_forward; }; -template , _Fn>, is_move_constructible>, diff --git a/libcxx/include/__functional/not_fn.h b/libcxx/include/__functional/not_fn.h --- a/libcxx/include/__functional/not_fn.h +++ b/libcxx/include/__functional/not_fn.h @@ -37,7 +37,7 @@ using __perfect_forward<__not_fn_op, _Fn>::__perfect_forward; }; -template , _Fn> && is_move_constructible_v> >> diff --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h --- a/libcxx/include/__functional/perfect_forward.h +++ b/libcxx/include/__functional/perfect_forward.h @@ -34,7 +34,7 @@ tuple<_Bound...> __bound_; public: - template , _BoundArgs&&...> >> explicit constexpr __perfect_forward_impl(_BoundArgs&& ...__bound) @@ -47,40 +47,40 @@ __perfect_forward_impl& operator=(__perfect_forward_impl const&) = default; __perfect_forward_impl& operator=(__perfect_forward_impl&&) = default; - template >> + template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) & noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...))) -> decltype( _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...)) { return _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...); } - template >> + template >> auto operator()(_Args&&...) & = delete; - template >> + template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const& noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...))) -> decltype( _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...)) { return _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...); } - template >> + template >> auto operator()(_Args&&...) const& = delete; - template >> + template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) && noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...))) -> decltype( _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...)) { return _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...); } - template >> + template >> auto operator()(_Args&&...) && = delete; - template >> + template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&& noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...))) -> decltype( _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...)) { return _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...); } - template >> + template >> auto operator()(_Args&&...) const&& = delete; }; diff --git a/libcxx/include/__memory/construct_at.h b/libcxx/include/__memory/construct_at.h --- a/libcxx/include/__memory/construct_at.h +++ b/libcxx/include/__memory/construct_at.h @@ -47,7 +47,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy(_ForwardIterator, _ForwardIterator); -template , int> = 0> +template , int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy_at(_Tp* __loc) { _LIBCPP_ASSERT(__loc, "null pointer given to destroy_at"); @@ -55,7 +55,7 @@ } #if _LIBCPP_STD_VER > 17 -template , int> = 0> +template , int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy_at(_Tp* __loc) { _LIBCPP_ASSERT(__loc, "null pointer given to destroy_at"); diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -358,7 +358,7 @@ #if _LIBCPP_STD_VER >= 17 template::value...>::value> + class = enable_if_t<__all<_IsSame<_Tp, _Args>::value...>::value> > array(_Tp, _Args...) -> array<_Tp, 1 + sizeof...(_Args)>; diff --git a/libcxx/include/bit b/libcxx/include/bit --- a/libcxx/include/bit +++ b/libcxx/include/bit @@ -222,7 +222,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> rotl(_Tp __t, unsigned int __cnt) noexcept { return __rotl(__t, __cnt); @@ -230,7 +230,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> rotr(_Tp __t, unsigned int __cnt) noexcept { return __rotr(__t, __cnt); @@ -238,7 +238,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, int> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> countl_zero(_Tp __t) noexcept { return __countl_zero(__t); @@ -246,7 +246,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, int> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> countl_one(_Tp __t) noexcept { return __countl_one(__t); @@ -254,7 +254,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, int> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> countr_zero(_Tp __t) noexcept { return __countr_zero(__t); @@ -262,7 +262,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, int> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> countr_one(_Tp __t) noexcept { return __countr_one(__t); @@ -270,7 +270,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, int> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> popcount(_Tp __t) noexcept { return __popcount(__t); @@ -278,7 +278,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, bool> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, bool> has_single_bit(_Tp __t) noexcept { return __has_single_bit(__t); @@ -286,7 +286,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> bit_floor(_Tp __t) noexcept { return __t == 0 ? 0 : _Tp{1} << __bit_log2(__t); @@ -294,7 +294,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> bit_ceil(_Tp __t) noexcept { if (__t < 2) return 1; @@ -313,7 +313,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> bit_width(_Tp __t) noexcept { return __t == 0 ? 0 : __bit_log2(__t) + 1; diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -535,7 +535,7 @@ template inline _LIBCPP_INLINE_VISIBILITY -typename _EnableIf +typename enable_if_t < is_arithmetic<_A1>::value && is_arithmetic<_A2>::value && diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -1568,14 +1568,14 @@ #if _LIBCPP_STD_VER >= 17 template>, - class = _EnableIf<__is_allocator<_Alloc>::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > deque(_InputIterator, _InputIterator) -> deque<__iter_value_type<_InputIterator>, _Alloc>; template::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > deque(_InputIterator, _InputIterator, _Alloc) -> deque<__iter_value_type<_InputIterator>, _Alloc>; diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -873,14 +873,14 @@ #if _LIBCPP_STD_VER >= 17 template>, - class = _EnableIf<__is_allocator<_Alloc>::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > forward_list(_InputIterator, _InputIterator) -> forward_list<__iter_value_type<_InputIterator>, _Alloc>; template::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > forward_list(_InputIterator, _InputIterator, _Alloc) -> forward_list<__iter_value_type<_InputIterator>, _Alloc>; diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -1144,14 +1144,14 @@ #if _LIBCPP_STD_VER >= 17 template>, - class = _EnableIf<__is_allocator<_Alloc>::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > list(_InputIterator, _InputIterator) -> list<__iter_value_type<_InputIterator>, _Alloc>; template::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > list(_InputIterator, _InputIterator, _Alloc) -> list<__iter_value_type<_InputIterator>, _Alloc>; diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -1505,26 +1505,26 @@ #if _LIBCPP_STD_VER >= 17 template>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, - class = _EnableIf::value, void>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>> + class = enable_if_t::value, void>, + class = enable_if_t<__is_allocator<_Allocator>::value, void>> map(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare, _Allocator>; template>, class _Allocator = allocator>, - class = _EnableIf::value, void>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>> + class = enable_if_t::value, void>, + class = enable_if_t<__is_allocator<_Allocator>::value, void>> map(initializer_list>, _Compare = _Compare(), _Allocator = _Allocator()) -> map, _Tp, _Compare, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> map(_InputIterator, _InputIterator, _Allocator) -> map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, less<__iter_key_type<_InputIterator>>, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> map(initializer_list>, _Allocator) -> map, _Tp, less>, _Allocator>; #endif @@ -2178,26 +2178,26 @@ #if _LIBCPP_STD_VER >= 17 template>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, - class = _EnableIf::value, void>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>> + class = enable_if_t::value, void>, + class = enable_if_t<__is_allocator<_Allocator>::value, void>> multimap(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare, _Allocator>; template>, class _Allocator = allocator>, - class = _EnableIf::value, void>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>> + class = enable_if_t::value, void>, + class = enable_if_t<__is_allocator<_Allocator>::value, void>> multimap(initializer_list>, _Compare = _Compare(), _Allocator = _Allocator()) -> multimap, _Tp, _Compare, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> multimap(_InputIterator, _InputIterator, _Allocator) -> multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, less<__iter_key_type<_InputIterator>>, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> multimap(initializer_list>, _Allocator) -> multimap, _Tp, less>, _Allocator>; #endif diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -691,7 +691,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default; _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} - template , is_constructible @@ -702,21 +702,21 @@ constexpr explicit optional(_InPlaceT, _Args&&... __args) : __base(in_place, _VSTD::forward<_Args>(__args)...) {} - template &, _Args...>> > _LIBCPP_INLINE_VISIBILITY constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) : __base(in_place, __il, _VSTD::forward<_Args>(__args)...) {} - template ::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY constexpr optional(_Up&& __v) : __base(in_place, _VSTD::forward<_Up>(__v)) {} - template ::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -724,7 +724,7 @@ : __base(in_place, _VSTD::forward<_Up>(__v)) {} // LWG2756: conditionally explicit conversion from const optional<_Up>& - template ::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -732,7 +732,7 @@ { this->__construct_from(__v); } - template ::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -742,7 +742,7 @@ } // LWG2756: conditionally explicit conversion from optional<_Up>&& - template ::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -750,7 +750,7 @@ { this->__construct_from(_VSTD::move(__v)); } - template ::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -771,7 +771,7 @@ // LWG2756 template , optional>, _Or< @@ -794,7 +794,7 @@ } // LWG2756 - template ::template __enable_assign<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -806,7 +806,7 @@ } // LWG2756 - template ::template __enable_assign<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY @@ -818,7 +818,7 @@ } template > @@ -833,7 +833,7 @@ } template &, _Args...> > @@ -1004,7 +1004,7 @@ // Comparisons between optionals template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() == declval()), bool>, bool @@ -1020,7 +1020,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() != declval()), bool>, bool @@ -1036,7 +1036,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() < declval()), bool>, bool @@ -1052,7 +1052,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() > declval()), bool>, bool @@ -1068,7 +1068,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() <= declval()), bool>, bool @@ -1084,7 +1084,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() >= declval()), bool>, bool @@ -1198,7 +1198,7 @@ // Comparisons with T template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() == declval()), bool>, bool @@ -1210,7 +1210,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() == declval()), bool>, bool @@ -1222,7 +1222,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() != declval()), bool>, bool @@ -1234,7 +1234,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() != declval()), bool>, bool @@ -1246,7 +1246,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() < declval()), bool>, bool @@ -1258,7 +1258,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() < declval()), bool>, bool @@ -1270,7 +1270,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() <= declval()), bool>, bool @@ -1282,7 +1282,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() <= declval()), bool>, bool @@ -1294,7 +1294,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() > declval()), bool>, bool @@ -1306,7 +1306,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() > declval()), bool>, bool @@ -1318,7 +1318,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() >= declval()), bool>, bool @@ -1330,7 +1330,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr -_EnableIf< +enable_if_t< is_convertible_v() >= declval()), bool>, bool @@ -1343,7 +1343,7 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 -_EnableIf< +enable_if_t< is_move_constructible_v<_Tp> && is_swappable_v<_Tp>, void > diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -360,15 +360,15 @@ #if _LIBCPP_STD_VER >= 17 template::value> + class = enable_if_t::value> > queue(_Container) -> queue; template::value>, - class = _EnableIf::value> + class = enable_if_t::value>, + class = enable_if_t::value> > queue(_Container, _Alloc) -> queue; @@ -587,8 +587,8 @@ #if _LIBCPP_STD_VER >= 17 template ::value>, - class = _EnableIf::value> + class = enable_if_t::value>, + class = enable_if_t::value> > priority_queue(_Compare, _Container) -> priority_queue; @@ -596,9 +596,9 @@ template>, class _Container = vector<__iter_value_type<_InputIterator>>, - class = _EnableIf<__is_cpp17_input_iterator<_InputIterator>::value>, - class = _EnableIf::value>, - class = _EnableIf::value> + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t::value>, + class = enable_if_t::value> > priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container = _Container()) -> priority_queue<__iter_value_type<_InputIterator>, _Container, _Compare>; @@ -606,16 +606,16 @@ template::value>, - class = _EnableIf::value>, - class = _EnableIf::value> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value> > priority_queue(_Compare, _Container, _Alloc) -> priority_queue; template::value>, - class = _EnableIf<__is_allocator<_Allocator>::value> + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t<__is_allocator<_Allocator>::value> > priority_queue(_InputIterator, _InputIterator, _Allocator) -> priority_queue<__iter_value_type<_InputIterator>, @@ -623,19 +623,19 @@ less<__iter_value_type<_InputIterator>>>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value> + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value> > priority_queue(_InputIterator, _InputIterator, _Compare, _Allocator) -> priority_queue<__iter_value_type<_InputIterator>, vector<__iter_value_type<_InputIterator>, _Allocator>, _Compare>; template::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value> + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value> > priority_queue(_InputIterator, _InputIterator, _Compare, _Container, _Alloc) -> priority_queue; diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -872,26 +872,26 @@ template>, class _Allocator = allocator<__iter_value_type<_InputIterator>>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>, - class = _EnableIf::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>, + class = enable_if_t::value, void>> set(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> set<__iter_value_type<_InputIterator>, _Compare, _Allocator>; template, class _Allocator = allocator<_Key>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>, - class = _EnableIf::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>, + class = enable_if_t::value, void>> set(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator()) -> set<_Key, _Compare, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> set(_InputIterator, _InputIterator, _Allocator) -> set<__iter_value_type<_InputIterator>, less<__iter_value_type<_InputIterator>>, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> set(initializer_list<_Key>, _Allocator) -> set<_Key, less<_Key>, _Allocator>; #endif @@ -1403,26 +1403,26 @@ template>, class _Allocator = allocator<__iter_value_type<_InputIterator>>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>, - class = _EnableIf::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>, + class = enable_if_t::value, void>> multiset(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> multiset<__iter_value_type<_InputIterator>, _Compare, _Allocator>; template, class _Allocator = allocator<_Key>, - class = _EnableIf<__is_allocator<_Allocator>::value, void>, - class = _EnableIf::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>, + class = enable_if_t::value, void>> multiset(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator()) -> multiset<_Key, _Compare, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> multiset(_InputIterator, _InputIterator, _Allocator) -> multiset<__iter_value_type<_InputIterator>, less<__iter_value_type<_InputIterator>>, _Allocator>; template::value, void>> + class = enable_if_t<__is_allocator<_Allocator>::value, void>> multiset(initializer_list<_Key>, _Allocator) -> multiset<_Key, less<_Key>, _Allocator>; #endif diff --git a/libcxx/include/stack b/libcxx/include/stack --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -233,15 +233,15 @@ #if _LIBCPP_STD_VER >= 17 template::value> + class = enable_if_t::value> > stack(_Container) -> stack; template::value>, - class = _EnableIf::value> + class = enable_if_t::value>, + class = enable_if_t::value> > stack(_Container, _Alloc) -> stack; diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1755,8 +1755,8 @@ template, class _Allocator = allocator<_CharT>, - class = _EnableIf<__is_cpp17_input_iterator<_InputIterator>::value>, - class = _EnableIf<__is_allocator<_Allocator>::value> + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t<__is_allocator<_Allocator>::value> > basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator()) -> basic_string<_CharT, char_traits<_CharT>, _Allocator>; @@ -1764,7 +1764,7 @@ template, - class = _EnableIf<__is_allocator<_Allocator>::value> + class = enable_if_t<__is_allocator<_Allocator>::value> > explicit basic_string(basic_string_view<_CharT, _Traits>, const _Allocator& = _Allocator()) -> basic_string<_CharT, _Traits, _Allocator>; @@ -1772,7 +1772,7 @@ template, - class = _EnableIf<__is_allocator<_Allocator>::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>, class _Sz = typename allocator_traits<_Allocator>::size_type > basic_string(basic_string_view<_CharT, _Traits>, _Sz, _Sz, const _Allocator& = _Allocator()) diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -455,6 +455,15 @@ #define _LIBCPP_BOOL_CONSTANT(__b) integral_constant #endif +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; + +#if _LIBCPP_STD_VER > 11 +template using enable_if_t = typename enable_if<_Bp, _Tp>::type; +#endif + typedef _LIBCPP_BOOL_CONSTANT(true) true_type; typedef _LIBCPP_BOOL_CONSTANT(false) false_type; @@ -472,8 +481,6 @@ using _FirstImpl _LIBCPP_NODEBUG = _First; template using _SecondImpl _LIBCPP_NODEBUG = _Second; - template - using _EnableIfImpl _LIBCPP_NODEBUG = _Tp; template using _OrImpl _LIBCPP_NODEBUG = typename _MetaBase<_First::value != true && sizeof...(_Rest) != 0>::template _OrImpl<_First, _Rest...>; }; @@ -487,8 +494,6 @@ template using _OrImpl _LIBCPP_NODEBUG = _Result; }; -template -using _EnableIf _LIBCPP_NODEBUG = typename _MetaBase<_Cond>::template _EnableIfImpl<_Ret>; template using _If _LIBCPP_NODEBUG = typename _MetaBase<_Cond>::template _SelectImpl<_IfRes, _ElseRes>; template @@ -543,13 +548,6 @@ template using conditional_t = typename conditional<_Bp, _If, _Then>::type; #endif -template struct _LIBCPP_TEMPLATE_VIS enable_if {}; -template struct _LIBCPP_TEMPLATE_VIS enable_if {typedef _Tp type;}; - -#if _LIBCPP_STD_VER > 11 -template using enable_if_t = typename enable_if<_Bp, _Tp>::type; -#endif - // is_same #if __has_keyword(__is_same) diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -473,7 +473,7 @@ size_t operator()(const _Key& __x) const {return static_cast(*this)(__x);} #if _LIBCPP_STD_VER > 17 - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY size_t operator()(const _K2& __x) const {return static_cast(*this)(__x);} @@ -508,7 +508,7 @@ size_t operator()(const _Key& __x) const {return __hash_(__x);} #if _LIBCPP_STD_VER > 17 - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY size_t operator()(const _K2& __x) const {return __hash_(__x);} @@ -557,19 +557,19 @@ bool operator()(const _Key& __x, const _Cp& __y) const {return static_cast(*this)(__x, __y.__get_value().first);} #if _LIBCPP_STD_VER > 17 - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _Cp& __x, const _K2& __y) const {return static_cast(*this)(__x.__get_value().first, __y);} - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _K2& __x, const _Cp& __y) const {return static_cast(*this)(__x, __y.__get_value().first);} - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _Key& __x, const _K2& __y) const {return static_cast(*this)(__x, __y);} - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _K2& __x, const _Key& __y) const {return static_cast(*this)(__x, __y);} @@ -607,19 +607,19 @@ bool operator()(const _Key& __x, const _Cp& __y) const {return __pred_(__x, __y.__get_value().first);} #if _LIBCPP_STD_VER > 17 - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _Cp& __x, const _K2& __y) const {return __pred_(__x.__get_value().first, __y);} - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _K2& __x, const _Cp& __y) const {return __pred_(__x, __y.__get_value().first);} - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _Key& __x, const _K2& __y) const {return __pred_(__x, __y);} - template ::value && __is_transparent<_Pred, _K2>::value>> + template ::value && __is_transparent<_Pred, _K2>::value>> _LIBCPP_INLINE_VISIBILITY bool operator()(const _K2& __x, const _Key& __y) const {return __pred_(__x, __y);} @@ -1359,11 +1359,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, iterator> find(const _K2& __k) {return __table_.find(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, const_iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, const_iterator> find(const _K2& __k) const {return __table_.find(__k);} #endif // _LIBCPP_STD_VER > 17 @@ -1372,7 +1372,7 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, size_type> + enable_if_t<__is_transparent::value && __is_transparent::value, size_type> count(const _K2& __k) const {return __table_.__count_unique(__k);} #endif // _LIBCPP_STD_VER > 17 #if _LIBCPP_STD_VER > 17 @@ -1381,7 +1381,7 @@ template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, bool> + enable_if_t<__is_transparent::value && __is_transparent::value, bool> contains(const _K2& __k) const {return find(__k) != end();} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -1393,11 +1393,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) {return __table_.__equal_range_unique(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) const {return __table_.__equal_range_unique(__k);} #endif // _LIBCPP_STD_VER > 17 @@ -1469,10 +1469,10 @@ class _Hash = hash<__iter_key_type<_InputIterator>>, class _Pred = equal_to<__iter_key_type<_InputIterator>>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Hash, _Pred, _Allocator>; @@ -1480,52 +1480,52 @@ template>, class _Pred = equal_to>, class _Allocator = allocator>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(initializer_list>, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_map, _Tp, _Hash, _Pred, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(_InputIterator, _InputIterator, _Allocator) -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Hash, equal_to<__iter_key_type<_InputIterator>>, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(initializer_list>, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_map, _Tp, hash>, equal_to>, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(initializer_list>, _Allocator) -> unordered_map, _Tp, hash>, equal_to>, _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_map(initializer_list>, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_map, _Tp, _Hash, equal_to>, _Allocator>; @@ -2170,11 +2170,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, iterator> find(const _K2& __k) {return __table_.find(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, const_iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, const_iterator> find(const _K2& __k) const {return __table_.find(__k);} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -2182,7 +2182,7 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, size_type> + enable_if_t<__is_transparent::value && __is_transparent::value, size_type> count(const _K2& __k) const {return __table_.__count_multi(__k);} #endif // _LIBCPP_STD_VER > 17 #if _LIBCPP_STD_VER > 17 @@ -2191,7 +2191,7 @@ template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, bool> + enable_if_t<__is_transparent::value && __is_transparent::value, bool> contains(const _K2& __k) const {return find(__k) != end();} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -2203,11 +2203,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) {return __table_.__equal_range_multi(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) const {return __table_.__equal_range_multi(__k);} #endif // _LIBCPP_STD_VER > 17 @@ -2268,10 +2268,10 @@ class _Hash = hash<__iter_key_type<_InputIterator>>, class _Pred = equal_to<__iter_key_type<_InputIterator>>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Hash, _Pred, _Allocator>; @@ -2279,52 +2279,52 @@ template>, class _Pred = equal_to>, class _Allocator = allocator>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(initializer_list>, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_multimap, _Tp, _Hash, _Pred, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(_InputIterator, _InputIterator, _Allocator) -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Hash, equal_to<__iter_key_type<_InputIterator>>, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(initializer_list>, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_multimap, _Tp, hash>, equal_to>, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(initializer_list>, _Allocator) -> unordered_multimap, _Tp, hash>, equal_to>, _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multimap(initializer_list>, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_multimap, _Tp, _Hash, equal_to>, _Allocator>; diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -709,11 +709,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, iterator> find(const _K2& __k) {return __table_.find(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, const_iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, const_iterator> find(const _K2& __k) const {return __table_.find(__k);} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -721,7 +721,7 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, size_type> + enable_if_t<__is_transparent::value && __is_transparent::value, size_type> count(const _K2& __k) const {return __table_.__count_unique(__k);} #endif // _LIBCPP_STD_VER > 17 #if _LIBCPP_STD_VER > 17 @@ -730,7 +730,7 @@ template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, bool> + enable_if_t<__is_transparent::value && __is_transparent::value, bool> contains(const _K2& __k) const {return find(__k) != end();} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -742,11 +742,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) {return __table_.__equal_range_unique(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) const {return __table_.__equal_range_unique(__k);} #endif // _LIBCPP_STD_VER > 17 @@ -804,10 +804,10 @@ class _Hash = hash<__iter_value_type<_InputIterator>>, class _Pred = equal_to<__iter_value_type<_InputIterator>>, class _Allocator = allocator<__iter_value_type<_InputIterator>>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_set(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_set<__iter_value_type<_InputIterator>, _Hash, _Pred, _Allocator>; @@ -815,16 +815,16 @@ template, class _Pred = equal_to<_Tp>, class _Allocator = allocator<_Tp>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_set(initializer_list<_Tp>, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_set<_Tp, _Hash, _Pred, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_set(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_set<__iter_value_type<_InputIterator>, @@ -833,9 +833,9 @@ _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_set(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_set<__iter_value_type<_InputIterator>, _Hash, @@ -843,14 +843,14 @@ _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_set(initializer_list<_Tp>, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_set(initializer_list<_Tp>, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>; #endif @@ -1375,11 +1375,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, iterator> find(const _K2& __k) {return __table_.find(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, const_iterator> + enable_if_t<__is_transparent::value && __is_transparent::value, const_iterator> find(const _K2& __k) const {return __table_.find(__k);} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -1387,7 +1387,7 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, size_type> + enable_if_t<__is_transparent::value && __is_transparent::value, size_type> count(const _K2& __k) const {return __table_.__count_multi(__k);} #endif // _LIBCPP_STD_VER > 17 #if _LIBCPP_STD_VER > 17 @@ -1396,7 +1396,7 @@ template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, bool> + enable_if_t<__is_transparent::value && __is_transparent::value, bool> contains(const _K2& __k) const {return find(__k) != end();} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY @@ -1408,11 +1408,11 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) {return __table_.__equal_range_multi(__k);} template _LIBCPP_INLINE_VISIBILITY - _EnableIf<__is_transparent::value && __is_transparent::value, pair> + enable_if_t<__is_transparent::value && __is_transparent::value, pair> equal_range(const _K2& __k) const {return __table_.__equal_range_multi(__k);} #endif // _LIBCPP_STD_VER > 17 @@ -1470,26 +1470,26 @@ class _Hash = hash<__iter_value_type<_InputIterator>>, class _Pred = equal_to<__iter_value_type<_InputIterator>>, class _Allocator = allocator<__iter_value_type<_InputIterator>>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multiset(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_multiset<__iter_value_type<_InputIterator>, _Hash, _Pred, _Allocator>; template, class _Pred = equal_to<_Tp>, class _Allocator = allocator<_Tp>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multiset(initializer_list<_Tp>, typename allocator_traits<_Allocator>::size_type = 0, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multiset(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_multiset<__iter_value_type<_InputIterator>, hash<__iter_value_type<_InputIterator>>, @@ -1497,9 +1497,9 @@ _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multiset(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_multiset<__iter_value_type<_InputIterator>, _Hash, @@ -1507,14 +1507,14 @@ _Allocator>; template::value>> + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multiset(initializer_list<_Tp>, typename allocator_traits<_Allocator>::size_type, _Allocator) -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; template::value>, - class = _EnableIf::value>, - class = _EnableIf<__is_allocator<_Allocator>::value>> + class = enable_if_t::value>, + class = enable_if_t::value>, + class = enable_if_t<__is_allocator<_Allocator>::value>> unordered_multiset(initializer_list<_Tp>, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator) -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>; #endif diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -954,14 +954,14 @@ #if _LIBCPP_STD_VER >= 17 template>, - class = _EnableIf<__is_allocator<_Alloc>::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > vector(_InputIterator, _InputIterator) -> vector<__iter_value_type<_InputIterator>, _Alloc>; template::value> + class = enable_if_t<__is_allocator<_Alloc>::value> > vector(_InputIterator, _InputIterator, _Alloc) -> vector<__iter_value_type<_InputIterator>, _Alloc>;