diff --git a/libcxx/include/__algorithm/copy_n.h b/libcxx/include/__algorithm/copy_n.h --- a/libcxx/include/__algorithm/copy_n.h +++ b/libcxx/include/__algorithm/copy_n.h @@ -21,14 +21,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template +template::value && + !__has_random_access_iterator_category<_InputIterator>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_input_iterator_category<_InputIterator>::value && - !__has_random_access_iterator_category<_InputIterator>::value, - _OutputIterator ->::type +_OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; @@ -47,13 +44,10 @@ return __result; } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_random_access_iterator_category<_InputIterator>::value, - _OutputIterator ->::type +_OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::difference_type difference_type; diff --git a/libcxx/include/__algorithm/half_positive.h b/libcxx/include/__algorithm/half_positive.h --- a/libcxx/include/__algorithm/half_positive.h +++ b/libcxx/include/__algorithm/half_positive.h @@ -22,25 +22,17 @@ // Perform division by two quickly for positive integers (llvm.org/PR39129) -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - is_integral<_Integral>::value, - _Integral ->::type +_Integral __half_positive(_Integral __value) { return static_cast<_Integral>(static_cast<__make_unsigned_t<_Integral> >(__value) / 2); } -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - !is_integral<_Tp>::value, - _Tp ->::type +_Tp __half_positive(_Tp __value) { return __value / 2; diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h --- a/libcxx/include/__atomic/atomic.h +++ b/libcxx/include/__atomic/atomic.h @@ -505,25 +505,17 @@ // atomic_fetch_and -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_and(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT { return __o->fetch_and(__op); } -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_and(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT { return __o->fetch_and(__op); @@ -531,25 +523,17 @@ // atomic_fetch_and_explicit -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT { return __o->fetch_and(__op, __m); } -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_and_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT { return __o->fetch_and(__op, __m); @@ -557,25 +541,17 @@ // atomic_fetch_or -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_or(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT { return __o->fetch_or(__op); } -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_or(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT { return __o->fetch_or(__op); @@ -583,25 +559,17 @@ // atomic_fetch_or_explicit -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT { return __o->fetch_or(__op, __m); } -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_or_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT { return __o->fetch_or(__op, __m); @@ -609,25 +577,17 @@ // atomic_fetch_xor -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_xor(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT { return __o->fetch_xor(__op); } -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_xor(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT { return __o->fetch_xor(__op); @@ -635,25 +595,17 @@ // atomic_fetch_xor_explicit -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT { return __o->fetch_xor(__op, __m); } -template +template ::value && !is_same<_Tp, bool>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if -< - is_integral<_Tp>::value && !is_same<_Tp, bool>::value, - _Tp ->::type +_Tp atomic_fetch_xor_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT { return __o->fetch_xor(__op, __m); diff --git a/libcxx/include/__atomic/cxx_atomic_impl.h b/libcxx/include/__atomic/cxx_atomic_impl.h --- a/libcxx/include/__atomic/cxx_atomic_impl.h +++ b/libcxx/include/__atomic/cxx_atomic_impl.h @@ -32,14 +32,12 @@ // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because // the default operator= in an object is not volatile, a byte-by-byte copy // is required. -template _LIBCPP_HIDE_FROM_ABI -typename enable_if::value>::type -__cxx_atomic_assign_volatile(_Tp& __a_value, _Tv const& __val) { +template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI +void __cxx_atomic_assign_volatile(_Tp& __a_value, _Tv const& __val) { __a_value = __val; } -template _LIBCPP_HIDE_FROM_ABI -typename enable_if::value>::type -__cxx_atomic_assign_volatile(_Tp volatile& __a_value, _Tv volatile const& __val) { +template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI +void __cxx_atomic_assign_volatile(_Tp volatile& __a_value, _Tv volatile const& __val) { volatile char* __to = reinterpret_cast(std::addressof(__a_value)); volatile char* __end = __to + sizeof(_Tp); volatile const char* __from = reinterpret_cast(std::addressof(__val)); diff --git a/libcxx/include/__chrono/duration.h b/libcxx/include/__chrono/duration.h --- a/libcxx/include/__chrono/duration.h +++ b/libcxx/include/__chrono/duration.h @@ -116,14 +116,10 @@ } }; -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - _ToDuration ->::type +_ToDuration duration_cast(const duration<_Rep, _Period>& __fd) { return __duration_cast, _ToDuration>()(__fd); @@ -147,13 +143,9 @@ }; #if _LIBCPP_STD_VER >= 17 -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - _ToDuration ->::type +_ToDuration floor(const duration<_Rep, _Period>& __d) { _ToDuration __t = chrono::duration_cast<_ToDuration>(__d); @@ -162,13 +154,9 @@ return __t; } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - _ToDuration ->::type +_ToDuration ceil(const duration<_Rep, _Period>& __d) { _ToDuration __t = chrono::duration_cast<_ToDuration>(__d); @@ -177,13 +165,9 @@ return __t; } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - _ToDuration ->::type +_ToDuration round(const duration<_Rep, _Period>& __d) { _ToDuration __lower = chrono::floor<_ToDuration>(__d); @@ -462,14 +446,11 @@ // Duration * -template +template ::type>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, - duration::type, _Period> ->::type +duration::type, _Period> operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) { typedef typename common_type<_Rep1, _Rep2>::type _Cr; @@ -477,14 +458,11 @@ return _Cd(_Cd(__d).count() * static_cast<_Cr>(__s)); } -template +template ::type>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - is_convertible<_Rep1, typename common_type<_Rep1, _Rep2>::type>::value, - duration::type, _Period> ->::type +duration::type, _Period> operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) { return __d * __s; @@ -492,15 +470,11 @@ // Duration / -template +template ::value && is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - !__is_duration<_Rep2>::value && - is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, - duration::type, _Period> ->::type +duration::type, _Period> operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) { typedef typename common_type<_Rep1, _Rep2>::type _Cr; @@ -520,15 +494,11 @@ // Duration % -template +template ::value && is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - !__is_duration<_Rep2>::value && - is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, - duration::type, _Period> ->::type +duration::type, _Period> operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) { typedef typename common_type<_Rep1, _Rep2>::type _Cr; diff --git a/libcxx/include/__chrono/time_point.h b/libcxx/include/__chrono/time_point.h --- a/libcxx/include/__chrono/time_point.h +++ b/libcxx/include/__chrono/time_point.h @@ -93,49 +93,33 @@ } #if _LIBCPP_STD_VER >= 17 -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - time_point<_Clock, _ToDuration> ->::type +time_point<_Clock, _ToDuration> floor(const time_point<_Clock, _Duration>& __t) { return time_point<_Clock, _ToDuration>{chrono::floor<_ToDuration>(__t.time_since_epoch())}; } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - time_point<_Clock, _ToDuration> ->::type +time_point<_Clock, _ToDuration> ceil(const time_point<_Clock, _Duration>& __t) { return time_point<_Clock, _ToDuration>{chrono::ceil<_ToDuration>(__t.time_since_epoch())}; } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - __is_duration<_ToDuration>::value, - time_point<_Clock, _ToDuration> ->::type +time_point<_Clock, _ToDuration> round(const time_point<_Clock, _Duration>& __t) { return time_point<_Clock, _ToDuration>{chrono::round<_ToDuration>(__t.time_since_epoch())}; } -template +template ::is_signed, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - numeric_limits<_Rep>::is_signed, - duration<_Rep, _Period> ->::type +duration<_Rep, _Period> abs(duration<_Rep, _Period> __d) { return __d >= __d.zero() ? +__d : -__d; diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h --- a/libcxx/include/__filesystem/path.h +++ b/libcxx/include/__filesystem/path.h @@ -76,9 +76,9 @@ using __char_type = char32_t; }; -template +template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI -typename enable_if<__can_convert_char<_ECharT>::value, bool>::type +bool __is_separator(_ECharT __e) { #if defined(_LIBCPP_WIN32API) return __e == _ECharT('/') || __e == _ECharT('\\'); @@ -305,17 +305,17 @@ template <> struct _PathCVT<__path_value> { - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - static typename enable_if<__has_exactly_input_iterator_category<_Iter>::value>::type + static void __append_range(__path_string& __dest, _Iter __b, _Iter __e) { for (; __b != __e; ++__b) __dest.push_back(*__b); } - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - static typename enable_if<__has_forward_iterator_category<_Iter>::value>::type + static void __append_range(__path_string& __dest, _Iter __b, _Iter __e) { __dest.append(__b, __e); } @@ -350,17 +350,17 @@ __char_to_wide(__str, const_cast<__path_value*>(__dest.data()) + __pos, __size); } - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - static typename enable_if<__has_exactly_input_iterator_category<_Iter>::value>::type + static void __append_range(__path_string& __dest, _Iter __b, _Iter __e) { basic_string __tmp(__b, __e); __append_string(__dest, __tmp); } - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - static typename enable_if<__has_forward_iterator_category<_Iter>::value>::type + static void __append_range(__path_string& __dest, _Iter __b, _Iter __e) { basic_string __tmp(__b, __e); __append_string(__dest, __tmp); @@ -678,9 +678,9 @@ return *this; } - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - typename enable_if<__can_convert_char<_ECharT>::value, path&>::type + path& operator+=(_ECharT __x) { _PathCVT<_ECharT>::__append_source(__pn_, basic_string_view<_ECharT>(&__x, 1)); @@ -1040,21 +1040,19 @@ iterator end() const; #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) - template + template ::value && + is_same<_Traits, char_traits >::value, int> = 0> _LIBCPP_HIDE_FROM_ABI friend - typename enable_if::value && - is_same<_Traits, char_traits >::value, - basic_ostream<_CharT, _Traits>&>::type + basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { __os << _VSTD::__quoted(__p.native()); return __os; } - template + template ::value || + !is_same<_Traits, char_traits >::value, int> = 0> _LIBCPP_HIDE_FROM_ABI friend - typename enable_if::value || - !is_same<_Traits, char_traits >::value, - basic_ostream<_CharT, _Traits>&>::type + basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { __os << _VSTD::__quoted(__p.string<_CharT, _Traits>()); return __os; diff --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h --- a/libcxx/include/__filesystem/u8path.h +++ b/libcxx/include/__filesystem/u8path.h @@ -32,9 +32,9 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T - typename enable_if<__is_pathable<_InputIt>::value, path>::type + path u8path(_InputIt __f, _InputIt __l) { static_assert( #ifndef _LIBCPP_HAS_NO_CHAR8_T @@ -56,9 +56,9 @@ } #if defined(_LIBCPP_WIN32API) -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T - typename enable_if<__is_pathable<_InputIt>::value, path>::type + path u8path(_InputIt __f, _NullSentinel) { static_assert( #ifndef _LIBCPP_HAS_NO_CHAR8_T @@ -79,9 +79,9 @@ } #endif /* _LIBCPP_WIN32API */ -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T - typename enable_if<__is_pathable<_Source>::value, path>::type + path u8path(const _Source& __s) { static_assert( #ifndef _LIBCPP_HAS_NO_CHAR8_T 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 @@ -120,28 +120,20 @@ typedef typename tuple_element::value - 1, _Uj>::type type; }; -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - 0 < is_placeholder<_Ti>::value, - typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type ->::type +typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type __mu(_Ti&, _Uj& __uj) { const size_t __indx = is_placeholder<_Ti>::value - 1; return _VSTD::forward::type>(_VSTD::get<__indx>(__uj)); } -template +template ::value && + is_placeholder<_Ti>::value == 0 && + !__is_reference_wrapper<_Ti>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - !is_bind_expression<_Ti>::value && - is_placeholder<_Ti>::value == 0 && - !__is_reference_wrapper<_Ti>::value, - _Ti& ->::type +_Ti& __mu(_Ti& __ti, _Uj&) { return __ti; @@ -329,28 +321,20 @@ : base(_VSTD::forward<_Gp>(__f), _VSTD::forward<_BA>(__bound_args)...) {} - template + template >::type, + result_type>::value || is_void<_Rp>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - typename enable_if - < - is_convertible >::type, - result_type>::value || is_void<_Rp>::value, - result_type - >::type + result_type operator()(_Args&& ...__args) { typedef __invoke_void_return_wrapper<_Rp> _Invoker; return _Invoker::__call(static_cast(*this), _VSTD::forward<_Args>(__args)...); } - template + template >::type, + result_type>::value || is_void<_Rp>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - typename enable_if - < - is_convertible >::type, - result_type>::value || is_void<_Rp>::value, - result_type - >::type + result_type operator()(_Args&& ...__args) const { typedef __invoke_void_return_wrapper<_Rp> _Invoker; diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h --- a/libcxx/include/__iterator/next.h +++ b/libcxx/include/__iterator/next.h @@ -24,9 +24,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 - typename enable_if<__has_input_iterator_category<_InputIter>::value, _InputIter>::type + _InputIter next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) { _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value, "Attempt to next(it, n) with negative n on a non-bidirectional iterator"); diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h --- a/libcxx/include/__iterator/prev.h +++ b/libcxx/include/__iterator/prev.h @@ -24,9 +24,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 - typename enable_if<__has_input_iterator_category<_InputIter>::value, _InputIter>::type + _InputIter prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) { _LIBCPP_ASSERT_UNCATEGORIZED(__n <= 0 || __has_bidirectional_iterator_category<_InputIter>::value, "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator"); 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 @@ -1642,33 +1642,18 @@ _LIBCPP_INLINE_VISIBILITY weak_ptr& operator=(weak_ptr const& __r) _NOEXCEPT; - template - typename enable_if - < - __compatible_with<_Yp, _Tp>::value, - weak_ptr& - >::type - _LIBCPP_INLINE_VISIBILITY + template::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY weak_ptr& operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY weak_ptr& operator=(weak_ptr&& __r) _NOEXCEPT; - template - typename enable_if - < - __compatible_with<_Yp, _Tp>::value, - weak_ptr& - >::type - _LIBCPP_INLINE_VISIBILITY + template::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY weak_ptr& operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT; - template - typename enable_if - < - __compatible_with<_Yp, _Tp>::value, - weak_ptr& - >::type - _LIBCPP_INLINE_VISIBILITY + template::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY weak_ptr& operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY @@ -1786,13 +1771,9 @@ } template -template +template::value, int> > inline -typename enable_if -< - __compatible_with<_Yp, _Tp>::value, - weak_ptr<_Tp>& ->::type +weak_ptr<_Tp>& weak_ptr<_Tp>::operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT { weak_ptr(__r).swap(*this); @@ -1809,13 +1790,9 @@ } template -template +template::value, int> > inline -typename enable_if -< - __compatible_with<_Yp, _Tp>::value, - weak_ptr<_Tp>& ->::type +weak_ptr<_Tp>& weak_ptr<_Tp>::operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT { weak_ptr(_VSTD::move(__r)).swap(*this); @@ -1823,13 +1800,9 @@ } template -template +template::value, int> > inline -typename enable_if -< - __compatible_with<_Yp, _Tp>::value, - weak_ptr<_Tp>& ->::type +weak_ptr<_Tp>& weak_ptr<_Tp>::operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT { weak_ptr(__r).swap(*this); diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h --- a/libcxx/include/__memory/unique_ptr.h +++ b/libcxx/include/__memory/unique_ptr.h @@ -247,11 +247,10 @@ } #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) - template + template ::value && + is_same<_Dp, default_delete<_Tp> >::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if::value && - is_same<_Dp, default_delete<_Tp> >::value, - unique_ptr&>::type + unique_ptr& operator=(auto_ptr<_Up> __p) { reset(__p.release()); return *this; @@ -490,10 +489,9 @@ return __t; } - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 - typename enable_if< _CheckArrayPointerConversion<_Pp>::value >::type - reset(_Pp __p) _NOEXCEPT { + void reset(_Pp __p) _NOEXCEPT { pointer __tmp = __ptr_.first(); __ptr_.first() = __p; if (__tmp) @@ -512,9 +510,9 @@ } }; -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 - typename enable_if< __is_swappable<_Dp>::value, void >::type + void swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT { __x.swap(__y); } diff --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h --- a/libcxx/include/__random/discard_block_engine.h +++ b/libcxx/include/__random/discard_block_engine.h @@ -82,13 +82,9 @@ void seed() {__e_.seed(); __n_ = 0;} _LIBCPP_INLINE_VISIBILITY void seed(result_type __sd) {__e_.seed(__sd); __n_ = 0;} - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __is_seed_sequence<_Sseq, discard_block_engine>::value, - void - >::type + void seed(_Sseq& __q) {__e_.seed(__q); __n_ = 0;} // generating functions diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h --- a/libcxx/include/__random/independent_bits_engine.h +++ b/libcxx/include/__random/independent_bits_engine.h @@ -114,13 +114,9 @@ void seed() {__e_.seed();} _LIBCPP_INLINE_VISIBILITY void seed(result_type __sd) {__e_.seed(__sd);} - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __is_seed_sequence<_Sseq, independent_bits_engine>::value, - void - >::type + void seed(_Sseq& __q) {__e_.seed(__q);} // generating functions @@ -166,24 +162,16 @@ result_type __eval(false_type); _LIBCPP_HIDE_FROM_ABI result_type __eval(true_type); - template + template = 0> _LIBCPP_INLINE_VISIBILITY static - typename enable_if - < - __count < _Dt, - result_type - >::type + result_type __lshift(result_type __x) {return __x << __count;} - template + template = _Dt), int> = 0> _LIBCPP_INLINE_VISIBILITY static - typename enable_if - < - (__count >= _Dt), - result_type - >::type + result_type __lshift(result_type) {return result_type(0);} }; diff --git a/libcxx/include/__random/linear_congruential_engine.h b/libcxx/include/__random/linear_congruential_engine.h --- a/libcxx/include/__random/linear_congruential_engine.h +++ b/libcxx/include/__random/linear_congruential_engine.h @@ -255,13 +255,9 @@ void seed(result_type __s = default_seed) {seed(integral_constant(), integral_constant(), __s);} - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __is_seed_sequence<_Sseq, linear_congruential_engine>::value, - void - >::type + void seed(_Sseq& __q) {__seed(__q, integral_constant::value>::type* = 0) {seed(__q);} _LIBCPP_HIDE_FROM_ABI void seed(result_type __sd = default_seed); - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __is_seed_sequence<_Sseq, mersenne_twister_engine>::value, - void - >::type + void seed(_Sseq& __q) {__seed(__q, integral_constant());} @@ -202,44 +198,28 @@ template _LIBCPP_HIDE_FROM_ABI void __seed(_Sseq& __q, integral_constant); - template + template = 0> _LIBCPP_INLINE_VISIBILITY static - typename enable_if - < - __count < __w, - result_type - >::type + result_type __lshift(result_type __x) {return (__x << __count) & _Max;} - template + template = __w), int> = 0> _LIBCPP_INLINE_VISIBILITY static - typename enable_if - < - (__count >= __w), - result_type - >::type + result_type __lshift(result_type) {return result_type(0);} - template + template = 0> _LIBCPP_INLINE_VISIBILITY static - typename enable_if - < - __count < _Dt, - result_type - >::type + result_type __rshift(result_type __x) {return __x >> __count;} - template + template = _Dt), int> = 0> _LIBCPP_INLINE_VISIBILITY static - typename enable_if - < - (__count >= _Dt), - result_type - >::type + result_type __rshift(result_type) {return result_type(0);} }; diff --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h --- a/libcxx/include/__random/shuffle_order_engine.h +++ b/libcxx/include/__random/shuffle_order_engine.h @@ -108,13 +108,9 @@ void seed() {__e_.seed(); __init();} _LIBCPP_INLINE_VISIBILITY void seed(result_type __sd) {__e_.seed(__sd); __init();} - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __is_seed_sequence<_Sseq, shuffle_order_engine>::value, - void - >::type + void seed(_Sseq& __q) {__e_.seed(__q); __init();} // generating functions @@ -174,23 +170,15 @@ _LIBCPP_INLINE_VISIBILITY result_type __eval2(true_type) {return __evalf<__k, 0>();} - template + template ::num > 0xFFFFFFFFFFFFFFFFull / (_Max - _Min)), int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - (__uratio<_Np, _Dp>::num > 0xFFFFFFFFFFFFFFFFull / (_Max - _Min)), - result_type - >::type + result_type __eval(__uratio<_Np, _Dp>) {return __evalf<__uratio<_Np, _Dp>::num, __uratio<_Np, _Dp>::den>();} - template + template ::num <= 0xFFFFFFFFFFFFFFFFull / (_Max - _Min), int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __uratio<_Np, _Dp>::num <= 0xFFFFFFFFFFFFFFFFull / (_Max - _Min), - result_type - >::type + result_type __eval(__uratio<_Np, _Dp>) { const size_t __j = static_cast(__uratio<_Np, _Dp>::num * (__y_ - _Min) diff --git a/libcxx/include/__random/subtract_with_carry_engine.h b/libcxx/include/__random/subtract_with_carry_engine.h --- a/libcxx/include/__random/subtract_with_carry_engine.h +++ b/libcxx/include/__random/subtract_with_carry_engine.h @@ -109,13 +109,9 @@ _LIBCPP_INLINE_VISIBILITY void seed(result_type __sd = default_seed) {seed(__sd, integral_constant());} - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __is_seed_sequence<_Sseq, subtract_with_carry_engine>::value, - void - >::type + void seed(_Sseq& __q) {__seed(__q, integral_constant());} diff --git a/libcxx/include/__system_error/error_code.h b/libcxx/include/__system_error/error_code.h --- a/libcxx/include/__system_error/error_code.h +++ b/libcxx/include/__system_error/error_code.h @@ -61,9 +61,8 @@ __cat_ = &__cat; } - template - _LIBCPP_HIDE_FROM_ABI typename enable_if< is_error_code_enum<_Ep>::value, error_code& >::type - operator=(_Ep __e) _NOEXCEPT { + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI error_code& operator=(_Ep __e) _NOEXCEPT { using __adl_only::make_error_code; *this = make_error_code(__e); return *this; diff --git a/libcxx/include/__system_error/error_condition.h b/libcxx/include/__system_error/error_condition.h --- a/libcxx/include/__system_error/error_condition.h +++ b/libcxx/include/__system_error/error_condition.h @@ -70,9 +70,8 @@ __cat_ = &__cat; } - template - _LIBCPP_HIDE_FROM_ABI typename enable_if< is_error_condition_enum<_Ep>::value, error_condition& >::type - operator=(_Ep __e) _NOEXCEPT { + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI error_condition& operator=(_Ep __e) _NOEXCEPT { using __adl_only::make_error_condition; *this = make_error_condition(__e); return *this; diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h --- a/libcxx/include/__type_traits/is_swappable.h +++ b/libcxx/include/__type_traits/is_swappable.h @@ -47,10 +47,9 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value); -template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - typename enable_if<__is_swappable<_Tp>::value>::type swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) - _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value); +template ::value, int> = 0> +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) + _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value); namespace __detail { // ALL generic swap overloads MUST already have a declaration available at this point. diff --git a/libcxx/include/__utility/convert_to_integral.h b/libcxx/include/__utility/convert_to_integral.h --- a/libcxx/include/__utility/convert_to_integral.h +++ b/libcxx/include/__utility/convert_to_integral.h @@ -39,9 +39,9 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unsigned long long __convert_to_integral(unsigned long long __val) {return __val; } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if::value, long long>::type +long long __convert_to_integral(_Fp __val) { return __val; } #ifndef _LIBCPP_HAS_NO_INT128 diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h --- a/libcxx/include/__utility/pair.h +++ b/libcxx/include/__utility/pair.h @@ -688,14 +688,9 @@ }; #endif // _LIBCPP_STD_VER >= 23 -template +template ::value && __is_swappable<_T2>::value, int> = 0> inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __is_swappable<_T1>::value && - __is_swappable<_T2>::value, - void ->::type +void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) _NOEXCEPT_((__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value)) diff --git a/libcxx/include/__utility/swap.h b/libcxx/include/__utility/swap.h --- a/libcxx/include/__utility/swap.h +++ b/libcxx/include/__utility/swap.h @@ -44,9 +44,9 @@ __y = _VSTD::move(__t); } -template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 typename enable_if<__is_swappable<_Tp>::value>::type -swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { +template ::value, int> > +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) + _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { for (size_t __i = 0; __i != _Np; ++__i) { swap(__a[__i], __b[__i]); } diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -569,9 +569,9 @@ } #endif -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR typename enable_if::value, bool>::type +_LIBCPP_CONSTEXPR bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT { #if __has_builtin(__builtin_isnan) @@ -581,17 +581,17 @@ #endif } -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR typename enable_if::value, bool>::type +_LIBCPP_CONSTEXPR bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT { return std::isnan(__lcpp_x); } -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR typename enable_if::value, bool>::type +_LIBCPP_CONSTEXPR bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT { #if __has_builtin(__builtin_isinf) @@ -601,17 +601,17 @@ #endif } -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR typename enable_if::value, bool>::type +_LIBCPP_CONSTEXPR bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT { return std::isinf(__lcpp_x); } -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR typename enable_if::value, bool>::type +_LIBCPP_CONSTEXPR bool __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT { #if __has_builtin(__builtin_isfinite) @@ -621,9 +621,9 @@ #endif } -template +template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR typename enable_if::value, bool>::type +_LIBCPP_CONSTEXPR bool __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT { return __builtin_isfinite(__lcpp_x); diff --git a/libcxx/include/complex b/libcxx/include/complex --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -942,35 +942,25 @@ return std::atan2(__c.imag(), __c.real()); } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if< - is_same<_Tp, long double>::value, - long double ->::type +long double arg(_Tp __re) { return std::atan2l(0.L, __re); } -template +template::value || is_same<_Tp, double>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_integral<_Tp>::value || is_same<_Tp, double>::value, - double ->::type +double arg(_Tp __re) { return std::atan2(0., __re); } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if< - is_same<_Tp, float>::value, - float ->::type +float arg(_Tp __re) { return std::atan2f(0.F, __re); @@ -1033,13 +1023,9 @@ return __r; } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_floating_point<_Tp>::value, - typename __libcpp_complex_overload_traits<_Tp>::_ComplexType ->::type +typename __libcpp_complex_overload_traits<_Tp>::_ComplexType proj(_Tp __re) { if (std::__constexpr_isinf(__re)) @@ -1047,13 +1033,9 @@ return complex<_Tp>(__re); } -template +template ::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_integral<_Tp>::value, - typename __libcpp_complex_overload_traits<_Tp>::_ComplexType ->::type +typename __libcpp_complex_overload_traits<_Tp>::_ComplexType proj(_Tp __re) { typedef typename __libcpp_complex_overload_traits<_Tp>::_ComplexType _ComplexType; @@ -1173,26 +1155,18 @@ return _VSTD::pow(result_type(__x), result_type(__y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_arithmetic<_Up>::value, - complex::type> ->::type +complex::type> pow(const complex<_Tp>& __x, const _Up& __y) { typedef complex::type> result_type; return _VSTD::pow(result_type(__x), result_type(__y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_arithmetic<_Tp>::value, - complex::type> ->::type +complex::type> pow(const _Tp& __x, const complex<_Up>& __y) { typedef complex::type> result_type; diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -1117,15 +1117,17 @@ return __os << __p.get(); } -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_same&>() << std::declval::pointer>()))> >::value, - basic_ostream<_CharT, _Traits>& ->::type -operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p) -{ +template < + class _CharT, + class _Traits, + class _Yp, + class _Dp, + __enable_if_t&>() + << std::declval::pointer>()))> >::value, + int> = 0> +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& +operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p) { return __os << __p.get(); } diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -2776,9 +2776,9 @@ flag_type __f = regex_constants::ECMAScript) {return assign(__s.begin(), __s.end(), __f);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__has_exactly_input_iterator_category<_InputIterator>::value, basic_regex&>::type + basic_regex& assign(_InputIterator __first, _InputIterator __last, flag_type __f = regex_constants::ECMAScript) { @@ -2798,13 +2798,9 @@ } public: - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - __has_forward_iterator_category<_ForwardIterator>::value, - basic_regex& - >::type + basic_regex& assign(_ForwardIterator __first, _ForwardIterator __last, flag_type __f = regex_constants::ECMAScript) { diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -920,13 +920,13 @@ _LIBCPP_INLINE_VISIBILITY const_iterator find(const key_type& __k) const {return __tree_.find(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type + iterator find(const _K2& __k) {return __tree_.find(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type + const_iterator find(const _K2& __k) const {return __tree_.find(__k);} #endif @@ -934,18 +934,18 @@ size_type count(const key_type& __k) const {return __tree_.__count_unique(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type + size_type count(const _K2& __k) const {return __tree_.__count_multi(__k);} #endif #if _LIBCPP_STD_VER >= 20 _LIBCPP_INLINE_VISIBILITY bool contains(const key_type& __k) const {return find(__k) != end();} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value, bool>::type + bool contains(const _K2& __k) const { return find(__k) != end(); } #endif // _LIBCPP_STD_VER >= 20 @@ -956,14 +956,14 @@ const_iterator lower_bound(const key_type& __k) const {return __tree_.lower_bound(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type + iterator lower_bound(const _K2& __k) {return __tree_.lower_bound(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type + const_iterator lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);} #endif @@ -974,13 +974,13 @@ const_iterator upper_bound(const key_type& __k) const {return __tree_.upper_bound(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type + iterator upper_bound(const _K2& __k) {return __tree_.upper_bound(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type + const_iterator upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);} #endif @@ -991,13 +991,13 @@ pair equal_range(const key_type& __k) const {return __tree_.__equal_range_unique(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,pair>::type + pair equal_range(const _K2& __k) {return __tree_.__equal_range_multi(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,pair>::type + pair equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);} #endif }; @@ -1511,13 +1511,13 @@ _LIBCPP_INLINE_VISIBILITY const_iterator find(const key_type& __k) const {return __tree_.find(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type + iterator find(const _K2& __k) {return __tree_.find(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type + const_iterator find(const _K2& __k) const {return __tree_.find(__k);} #endif @@ -1525,18 +1525,18 @@ size_type count(const key_type& __k) const {return __tree_.__count_multi(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type + size_type count(const _K2& __k) const {return __tree_.__count_multi(__k);} #endif #if _LIBCPP_STD_VER >= 20 _LIBCPP_INLINE_VISIBILITY bool contains(const key_type& __k) const {return find(__k) != end();} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value, bool>::type + bool contains(const _K2& __k) const { return find(__k) != end(); } #endif // _LIBCPP_STD_VER >= 20 @@ -1547,14 +1547,14 @@ const_iterator lower_bound(const key_type& __k) const {return __tree_.lower_bound(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type + iterator lower_bound(const _K2& __k) {return __tree_.lower_bound(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type + const_iterator lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);} #endif @@ -1565,13 +1565,13 @@ const_iterator upper_bound(const key_type& __k) const {return __tree_.upper_bound(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type + iterator upper_bound(const _K2& __k) {return __tree_.upper_bound(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type + const_iterator upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);} #endif @@ -1582,13 +1582,13 @@ pair equal_range(const key_type& __k) const {return __tree_.__equal_range_multi(__k);} #if _LIBCPP_STD_VER >= 14 - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,pair>::type + pair equal_range(const _K2& __k) {return __tree_.__equal_range_multi(__k);} - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - typename enable_if<__is_transparent<_Compare, _K2>::value,pair>::type + pair equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);} #endif }; diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -971,94 +971,44 @@ _LIBCPP_INLINE_VISIBILITY valarray& operator>>=(const value_type& __x); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator*= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator/= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator%= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator+= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator-= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator^= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator|= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator&= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator<<= (const _Expr& __v); - template - typename enable_if - < - __is_val_expr<_Expr>::value, - valarray& - >::type - _LIBCPP_INLINE_VISIBILITY + template ::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY valarray& operator>>= (const _Expr& __v); // member functions: @@ -1219,102 +1169,58 @@ size_t __stride_; public: - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator*=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator/=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator%=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator+=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator-=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator^=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator&=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator|=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator<<=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator>>=(const _Expr& __v) const; @@ -1353,13 +1259,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1377,13 +1279,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator*=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1392,13 +1290,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator/=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1407,13 +1301,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator%=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1422,13 +1312,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator+=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1437,13 +1323,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator-=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1452,13 +1334,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator^=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1467,13 +1345,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator&=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1482,13 +1356,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator|=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1497,13 +1367,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator<<=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1512,13 +1378,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void slice_array<_Tp>::operator>>=(const _Expr& __v) const { value_type* __t = __vp_; @@ -1610,102 +1472,58 @@ valarray __1d_; public: - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator*=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator/=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator%=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator+=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator-=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator^=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator&=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator|=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator<<=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator>>=(const _Expr& __v) const; @@ -1734,13 +1552,9 @@ }; template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1750,13 +1564,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator*=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1766,13 +1576,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator/=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1782,13 +1588,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator%=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1798,13 +1600,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator+=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1814,13 +1612,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator-=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1830,13 +1624,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator^=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1846,13 +1636,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator&=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1862,13 +1648,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator|=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1878,13 +1660,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator<<=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1894,13 +1672,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void gslice_array<_Tp>::operator>>=(const _Expr& __v) const { typedef const size_t* _Ip; @@ -1945,102 +1719,58 @@ valarray __1d_; public: - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator*=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator/=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator%=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator+=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator-=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator^=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator&=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator|=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator<<=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator>>=(const _Expr& __v) const; @@ -2068,13 +1798,9 @@ }; template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2083,13 +1809,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator*=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2098,13 +1820,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator/=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2113,13 +1831,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator%=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2128,13 +1842,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator+=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2143,13 +1853,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator-=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2158,13 +1864,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator^=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2173,13 +1875,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator&=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2188,13 +1886,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator|=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2203,13 +1897,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator<<=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2218,13 +1908,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, void ->::type mask_array<_Tp>::operator>>=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2301,102 +1987,58 @@ valarray __1d_; public: - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator*=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator/=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator%=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator+=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator-=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator^=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator&=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator|=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator<<=(const _Expr& __v) const; - template - typename enable_if - < - __is_val_expr<_Expr>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_INLINE_VISIBILITY operator>>=(const _Expr& __v) const; @@ -2429,13 +2071,9 @@ }; template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2444,13 +2082,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator*=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2459,13 +2093,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator/=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2474,13 +2104,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator%=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2489,13 +2115,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator+=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2504,13 +2126,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator-=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2519,13 +2137,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator^=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2534,13 +2148,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator&=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2549,13 +2159,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator|=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2564,13 +2170,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator<<=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -2579,13 +2181,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, - void ->::type +void indirect_array<_Tp>::operator>>=(const _Expr& __v) const { size_t __n = __1d_.size(); @@ -3456,13 +3054,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator*=(const _Expr& __v) { size_t __i = 0; @@ -3472,13 +3066,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator/=(const _Expr& __v) { size_t __i = 0; @@ -3488,13 +3078,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator%=(const _Expr& __v) { size_t __i = 0; @@ -3504,13 +3090,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator+=(const _Expr& __v) { size_t __i = 0; @@ -3520,13 +3102,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator-=(const _Expr& __v) { size_t __i = 0; @@ -3536,13 +3114,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator^=(const _Expr& __v) { size_t __i = 0; @@ -3552,13 +3126,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator|=(const _Expr& __v) { size_t __i = 0; @@ -3568,13 +3138,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator&=(const _Expr& __v) { size_t __i = 0; @@ -3584,13 +3150,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator<<=(const _Expr& __v) { size_t __i = 0; @@ -3600,13 +3162,9 @@ } template -template +template ::value, int> > inline -typename enable_if -< - __is_val_expr<_Expr>::value, valarray<_Tp>& ->::type valarray<_Tp>::operator>>=(const _Expr& __v) { size_t __i = 0; @@ -3789,13 +3347,9 @@ __x.swap(__y); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator*(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -3803,14 +3357,10 @@ return __val_expr<_Op>(_Op(multiplies(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator*(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -3819,14 +3369,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator*(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -3835,13 +3381,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator/(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -3849,14 +3391,10 @@ return __val_expr<_Op>(_Op(divides(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator/(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -3865,14 +3403,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator/(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -3881,13 +3415,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator%(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -3895,14 +3425,10 @@ return __val_expr<_Op>(_Op(modulus(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator%(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -3911,14 +3437,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator%(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -3927,13 +3449,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator+(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -3941,14 +3459,10 @@ return __val_expr<_Op>(_Op(plus(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator+(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -3957,14 +3471,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator+(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -3973,13 +3483,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator-(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -3987,14 +3493,10 @@ return __val_expr<_Op>(_Op(minus(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator-(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4003,14 +3505,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator-(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4019,13 +3517,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator^(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4033,14 +3527,10 @@ return __val_expr<_Op>(_Op(bit_xor(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator^(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4049,14 +3539,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator^(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4065,13 +3551,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator&(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4079,14 +3561,10 @@ return __val_expr<_Op>(_Op(bit_and(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator&(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4095,14 +3573,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator&(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4111,13 +3585,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator|(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4125,14 +3595,10 @@ return __val_expr<_Op>(_Op(bit_or(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator|(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4141,14 +3607,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator|(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4157,13 +3619,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__bit_shift_left, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp<__bit_shift_left, _Expr1, _Expr2> > operator<<(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4171,14 +3629,10 @@ return __val_expr<_Op>(_Op(__bit_shift_left(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_left, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp<__bit_shift_left, + _Expr, __scalar_expr > > operator<<(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4187,14 +3641,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_left, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp<__bit_shift_left, + __scalar_expr, _Expr> > operator<<(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4203,13 +3653,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__bit_shift_right, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp<__bit_shift_right, _Expr1, _Expr2> > operator>>(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4217,14 +3663,10 @@ return __val_expr<_Op>(_Op(__bit_shift_right(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_right, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp<__bit_shift_right, + _Expr, __scalar_expr > > operator>>(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4233,14 +3675,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_right, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp<__bit_shift_right, + __scalar_expr, _Expr> > operator>>(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4249,13 +3687,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator&&(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4263,14 +3697,10 @@ return __val_expr<_Op>(_Op(logical_and(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator&&(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4279,14 +3709,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator&&(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4295,13 +3721,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator||(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4309,14 +3731,10 @@ return __val_expr<_Op>(_Op(logical_or(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator||(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4325,14 +3743,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator||(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4341,13 +3755,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator==(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4355,14 +3765,10 @@ return __val_expr<_Op>(_Op(equal_to(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator==(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4371,14 +3777,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator==(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4387,13 +3789,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator!=(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4401,14 +3799,10 @@ return __val_expr<_Op>(_Op(not_equal_to(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator!=(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4417,14 +3811,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator!=(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4433,13 +3823,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator<(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4447,14 +3833,10 @@ return __val_expr<_Op>(_Op(less(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator<(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4463,14 +3845,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator<(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4479,13 +3857,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator>(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4493,14 +3867,10 @@ return __val_expr<_Op>(_Op(greater(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator>(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4509,14 +3879,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator>(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4525,13 +3891,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator<=(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4539,14 +3901,10 @@ return __val_expr<_Op>(_Op(less_equal(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator<=(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4555,14 +3913,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator<=(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4571,13 +3925,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp, _Expr1, _Expr2> > operator>=(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4585,14 +3935,10 @@ return __val_expr<_Op>(_Op(greater_equal(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp, + _Expr, __scalar_expr > > operator>=(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4601,14 +3947,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp, + __scalar_expr, _Expr> > operator>=(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4617,13 +3959,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__abs_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__abs_expr, _Expr> > abs(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4631,13 +3969,9 @@ return __val_expr<_Op>(_Op(__abs_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__acos_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__acos_expr, _Expr> > acos(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4645,13 +3979,9 @@ return __val_expr<_Op>(_Op(__acos_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__asin_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__asin_expr, _Expr> > asin(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4659,13 +3989,9 @@ return __val_expr<_Op>(_Op(__asin_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__atan_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__atan_expr, _Expr> > atan(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4673,13 +3999,9 @@ return __val_expr<_Op>(_Op(__atan_expr(), __x)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__atan2_expr, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp<__atan2_expr, _Expr1, _Expr2> > atan2(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4687,14 +4009,10 @@ return __val_expr<_Op>(_Op(__atan2_expr(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_BinaryOp<__atan2_expr, _Expr, __scalar_expr > > ->::type atan2(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4703,14 +4021,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_BinaryOp<__atan2_expr, __scalar_expr, _Expr> > ->::type atan2(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4719,13 +4033,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__cos_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__cos_expr, _Expr> > cos(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4733,13 +4043,9 @@ return __val_expr<_Op>(_Op(__cos_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__cosh_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__cosh_expr, _Expr> > cosh(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4747,13 +4053,9 @@ return __val_expr<_Op>(_Op(__cosh_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__exp_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__exp_expr, _Expr> > exp(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4761,13 +4063,9 @@ return __val_expr<_Op>(_Op(__exp_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__log_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__log_expr, _Expr> > log(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4775,13 +4073,9 @@ return __val_expr<_Op>(_Op(__log_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__log10_expr, _Expr> > ->::type +__val_expr<_UnaryOp<__log10_expr, _Expr> > log10(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4789,13 +4083,9 @@ return __val_expr<_Op>(_Op(__log10_expr(), __x)); } -template +template::value && __is_val_expr<_Expr2>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__pow_expr, _Expr1, _Expr2> > ->::type +__val_expr<_BinaryOp<__pow_expr, _Expr1, _Expr2> > pow(const _Expr1& __x, const _Expr2& __y) { typedef typename _Expr1::value_type value_type; @@ -4803,14 +4093,10 @@ return __val_expr<_Op>(_Op(__pow_expr(), __x, __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__pow_expr, - _Expr, __scalar_expr > > ->::type +__val_expr<_BinaryOp<__pow_expr, + _Expr, __scalar_expr > > pow(const _Expr& __x, const typename _Expr::value_type& __y) { typedef typename _Expr::value_type value_type; @@ -4819,14 +4105,10 @@ __x, __scalar_expr(__y, __x.size()))); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__pow_expr, - __scalar_expr, _Expr> > ->::type +__val_expr<_BinaryOp<__pow_expr, + __scalar_expr, _Expr> > pow(const typename _Expr::value_type& __x, const _Expr& __y) { typedef typename _Expr::value_type value_type; @@ -4835,13 +4117,9 @@ __scalar_expr(__x, __y.size()), __y)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_UnaryOp<__sin_expr, _Expr> > ->::type sin(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4849,13 +4127,9 @@ return __val_expr<_Op>(_Op(__sin_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_UnaryOp<__sinh_expr, _Expr> > ->::type sinh(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4863,13 +4137,9 @@ return __val_expr<_Op>(_Op(__sinh_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_UnaryOp<__sqrt_expr, _Expr> > ->::type sqrt(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4877,13 +4147,9 @@ return __val_expr<_Op>(_Op(__sqrt_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_UnaryOp<__tan_expr, _Expr> > ->::type tan(const _Expr& __x) { typedef typename _Expr::value_type value_type; @@ -4891,13 +4157,9 @@ return __val_expr<_Op>(_Op(__tan_expr(), __x)); } -template +template::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, __val_expr<_UnaryOp<__tanh_expr, _Expr> > ->::type tanh(const _Expr& __x) { typedef typename _Expr::value_type value_type; diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -2198,17 +2198,11 @@ vector& operator=(vector&& __v) _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)); - template - typename enable_if <__has_exactly_input_iterator_category<_InputIterator>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_InputIterator __first, _InputIterator __last); - template - typename enable_if - < - __has_forward_iterator_category<_ForwardIterator>::value, - void - >::type + template ::value, int> = 0> + void _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_ForwardIterator __first, _ForwardIterator __last); #if _LIBCPP_STD_VER >= 23 @@ -2332,17 +2326,11 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, const value_type& __x); _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, size_type __n, const value_type& __x); - template - typename enable_if <__has_exactly_input_iterator_category<_InputIterator>::value, - iterator - >::type + template ::value, int> = 0> + iterator _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert(const_iterator __position, _InputIterator __first, _InputIterator __last); - template - typename enable_if - < - __has_forward_iterator_category<_ForwardIterator>::value, - iterator - >::type + template ::value, int> = 0> + iterator _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); #if _LIBCPP_STD_VER >= 23 @@ -2924,10 +2912,9 @@ } template -template -_LIBCPP_CONSTEXPR_SINCE_CXX20 typename enable_if <__has_exactly_input_iterator_category<_InputIterator>::value, - void ->::type +template ::value, int> > +_LIBCPP_CONSTEXPR_SINCE_CXX20 +void vector::assign(_InputIterator __first, _InputIterator __last) { __assign_with_sentinel(__first, __last); @@ -2943,13 +2930,9 @@ } template -template +template ::value, int> > _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_forward_iterator_category<_ForwardIterator>::value, - void ->::type +void vector::assign(_ForwardIterator __first, _ForwardIterator __last) { __assign_with_size(__first, __last, std::distance(__first, __last)); @@ -3090,10 +3073,9 @@ } template -template -_LIBCPP_CONSTEXPR_SINCE_CXX20 typename enable_if <__has_exactly_input_iterator_category<_InputIterator>::value, - typename vector::iterator ->::type +template ::value, int> > +_LIBCPP_CONSTEXPR_SINCE_CXX20 +typename vector::iterator vector::insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { return __insert_with_sentinel(__position, __first, __last); @@ -3140,13 +3122,9 @@ } template -template +template ::value, int> > _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_forward_iterator_category<_ForwardIterator>::value, - typename vector::iterator ->::type +typename vector::iterator vector::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) { return __insert_with_size(__position, __first, __last, std::distance(__first, __last));