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 @@ -234,28 +234,20 @@ _LIBCPP_HIDE_FROM_ABI duration() {} #endif - template + template ::value && + (treat_as_floating_point::value || + !treat_as_floating_point<_Rep2>::value), int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - explicit duration(const _Rep2& __r, - typename enable_if - < - is_convertible::value && - (treat_as_floating_point::value || - !treat_as_floating_point<_Rep2>::value) - >::type* = nullptr) + explicit duration(const _Rep2& __r) : __rep_(__r) {} // conversions - template + template ::value && ( + treat_as_floating_point::value || + (__no_overflow<_Period2, period>::type::den == 1 && + !treat_as_floating_point<_Rep2>::value)), int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - duration(const duration<_Rep2, _Period2>& __d, - typename enable_if - < - __no_overflow<_Period2, period>::value && ( - treat_as_floating_point::value || - (__no_overflow<_Period2, period>::type::den == 1 && - !treat_as_floating_point<_Rep2>::value)) - >::type* = nullptr) + duration(const duration<_Rep2, _Period2>& __d) : __rep_(chrono::duration_cast(__d).count()) {} // observer 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 @@ -49,13 +49,9 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit time_point(const duration& __d) : __d_(__d) {} // conversions - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 - time_point(const time_point& __t, - typename enable_if - < - is_convertible<_Duration2, duration>::value - >::type* = nullptr) + time_point(const time_point& __t) : __d_(__t.time_since_epoch()) {} // observer diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h --- a/libcxx/include/__iterator/wrap_iter.h +++ b/libcxx/include/__iterator/wrap_iter.h @@ -45,9 +45,8 @@ : __i_() { } - template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 - __wrap_iter(const __wrap_iter<_Up>& __u, - typename enable_if::value>::type* = nullptr) _NOEXCEPT + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter(const __wrap_iter<_Up>& __u) _NOEXCEPT : __i_(__u.base()) { } 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 @@ -1624,20 +1624,22 @@ public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT; - template _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0) - _NOEXCEPT; + + template::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr const& __r) _NOEXCEPT; - template _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0) - _NOEXCEPT; + + template::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr&& __r) _NOEXCEPT; - template _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0) - _NOEXCEPT; + + template::value, int> = 0> + _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r) _NOEXCEPT; + _LIBCPP_HIDE_FROM_ABI ~weak_ptr(); _LIBCPP_INLINE_VISIBILITY @@ -1709,10 +1711,9 @@ } template -template +template::value, int> > inline -weak_ptr<_Tp>::weak_ptr(shared_ptr<_Yp> const& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type) +weak_ptr<_Tp>::weak_ptr(shared_ptr<_Yp> const& __r) _NOEXCEPT : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_) @@ -1722,10 +1723,9 @@ } template -template +template::value, int> > inline -weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp> const& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type) +weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp> const& __r) _NOEXCEPT : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_) @@ -1745,10 +1745,9 @@ } template -template +template::value, int> > inline -weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp>&& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type) +weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp>&& __r) _NOEXCEPT : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_) 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 @@ -58,9 +58,9 @@ #else _LIBCPP_INLINE_VISIBILITY default_delete() {} #endif - template + template ::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 default_delete( - const default_delete<_Up>&, typename enable_if::value>::type* = 0) _NOEXCEPT {} + const default_delete<_Up>&) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) const _NOEXCEPT { static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type"); @@ -221,12 +221,10 @@ : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {} #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 - unique_ptr(auto_ptr<_Up>&& __p, - typename enable_if::value && - is_same<_Dp, default_delete<_Tp> >::value, - __nat>::type = __nat()) _NOEXCEPT + unique_ptr(auto_ptr<_Up>&& __p) _NOEXCEPT : __ptr_(__p.release(), __value_init_tag()) {} #endif 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 @@ -72,11 +72,10 @@ #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {} - template + template::value && + !is_convertible<_Sseq, _Engine>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - explicit discard_block_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, discard_block_engine>::value && - !is_convertible<_Sseq, _Engine>::value>::type* = 0) + explicit discard_block_engine(_Sseq& __q) : __e_(__q), __n_(0) {} _LIBCPP_INLINE_VISIBILITY void seed() {__e_.seed(); __n_ = 0;} 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 @@ -104,11 +104,10 @@ #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(result_type __sd) : __e_(__sd) {} - template + template::value && + !is_convertible<_Sseq, _Engine>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - explicit independent_bits_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, independent_bits_engine>::value && - !is_convertible<_Sseq, _Engine>::value>::type* = 0) + explicit independent_bits_engine(_Sseq& __q) : __e_(__q) {} _LIBCPP_INLINE_VISIBILITY void seed() {__e_.seed();} 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 @@ -246,10 +246,9 @@ seed(__s); } #endif - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - explicit linear_congruential_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = 0) + explicit linear_congruential_engine(_Sseq& __q) {seed(__q);} _LIBCPP_INLINE_VISIBILITY void seed(result_type __s = default_seed) diff --git a/libcxx/include/__random/mersenne_twister_engine.h b/libcxx/include/__random/mersenne_twister_engine.h --- a/libcxx/include/__random/mersenne_twister_engine.h +++ b/libcxx/include/__random/mersenne_twister_engine.h @@ -135,10 +135,9 @@ seed(__sd); } #endif - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - explicit mersenne_twister_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = 0) + explicit mersenne_twister_engine(_Sseq& __q) {seed(__q);} _LIBCPP_HIDE_FROM_ABI void seed(result_type __sd = default_seed); template::value, int> = 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 @@ -98,11 +98,10 @@ #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();} - template + template::value && + !is_convertible<_Sseq, _Engine>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - explicit shuffle_order_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, shuffle_order_engine>::value && - !is_convertible<_Sseq, _Engine>::value>::type* = 0) + explicit shuffle_order_engine(_Sseq& __q) : __e_(__q) {__init();} _LIBCPP_INLINE_VISIBILITY void seed() {__e_.seed(); __init();} 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 @@ -101,10 +101,9 @@ seed(__sd); } #endif - template + template::value, int> = 0> _LIBCPP_INLINE_VISIBILITY - explicit subtract_with_carry_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = 0) + explicit subtract_with_carry_engine(_Sseq& __q) {seed(__q);} _LIBCPP_INLINE_VISIBILITY void seed(result_type __sd = default_seed) 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 @@ -49,9 +49,9 @@ _LIBCPP_HIDE_FROM_ABI error_code(int __val, const error_category& __cat) _NOEXCEPT : __val_(__val), __cat_(&__cat) {} - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - error_code(_Ep __e, typename enable_if::value>::type* = nullptr) _NOEXCEPT { + error_code(_Ep __e) _NOEXCEPT { using __adl_only::make_error_code; *this = make_error_code(__e); } 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 @@ -58,9 +58,9 @@ : __val_(__val), __cat_(&__cat) {} - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - error_condition(_Ep __e, typename enable_if::value>::type* = nullptr) _NOEXCEPT { + error_condition(_Ep __e) _NOEXCEPT { using __adl_only::make_error_condition; *this = make_error_condition(__e); } diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -284,10 +284,9 @@ #endif {} - template + template ::value, int> = 0> _LIBCPP_HIDE_FROM_ABI - __deque_iterator(const __deque_iterator& __it, - typename enable_if::value>::type* = 0) _NOEXCEPT + __deque_iterator(const __deque_iterator& __it) _NOEXCEPT : __m_iter_(__it.__m_iter_), __ptr_(__it.__ptr_) {} _LIBCPP_HIDE_FROM_ABI reference operator*() const {return *__ptr_;} @@ -614,12 +613,10 @@ __append(__n, __v); } - template - _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l, - typename enable_if<__has_input_iterator_category<_InputIter>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l, const allocator_type& __a, - typename enable_if<__has_input_iterator_category<_InputIter>::value>::type* = 0); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l, const allocator_type& __a); #if _LIBCPP_STD_VER >= 23 template <_ContainerCompatibleRange<_Tp> _Range> @@ -662,13 +659,11 @@ void assign(initializer_list __il) {assign(__il.begin(), __il.end());} #endif // _LIBCPP_CXX03_LANG - template - _LIBCPP_HIDE_FROM_ABI void assign(_InputIter __f, _InputIter __l, - typename enable_if<__has_input_iterator_category<_InputIter>::value && - !__has_random_access_iterator_category<_InputIter>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI void assign(_RAIter __f, _RAIter __l, - typename enable_if<__has_random_access_iterator_category<_RAIter>::value>::type* = 0); + template ::value && + !__has_random_access_iterator_category<_InputIter>::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI void assign(_InputIter __f, _InputIter __l); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI void assign(_RAIter __f, _RAIter __l); #if _LIBCPP_STD_VER >= 23 template <_ContainerCompatibleRange<_Tp> _Range> @@ -820,15 +815,12 @@ #endif // _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, const value_type& __v); _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, size_type __n, const value_type& __v); - template - _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _InputIter __f, _InputIter __l, - typename enable_if<__has_exactly_input_iterator_category<_InputIter>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l, - typename enable_if<__has_exactly_forward_iterator_category<_ForwardIterator>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _BiIter __f, _BiIter __l, - typename enable_if<__has_bidirectional_iterator_category<_BiIter>::value>::type* = 0); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _InputIter __f, _InputIter __l); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _BiIter __f, _BiIter __l); #if _LIBCPP_STD_VER >= 23 template <_ContainerCompatibleRange<_Tp> _Range> @@ -1262,12 +1254,10 @@ _LIBCPP_HIDE_FROM_ABI iterator __insert_bidirectional(const_iterator __p, _BiIter __f, _BiIter __l, size_type __n); - template - _LIBCPP_HIDE_FROM_ABI void __append(_InpIter __f, _InpIter __l, - typename enable_if<__has_exactly_input_iterator_category<_InpIter>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI void __append(_ForIter __f, _ForIter __l, - typename enable_if<__has_forward_iterator_category<_ForIter>::value>::type* = 0); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI void __append(_InpIter __f, _InpIter __l); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI void __append(_ForIter __f, _ForIter __l); template _LIBCPP_HIDE_FROM_ABI void __append_with_size(_InputIterator __from, size_type __n); @@ -1377,9 +1367,8 @@ } template -template -deque<_Tp, _Allocator>::deque(_InputIter __f, _InputIter __l, - typename enable_if<__has_input_iterator_category<_InputIter>::value>::type*) +template ::value, int> > +deque<_Tp, _Allocator>::deque(_InputIter __f, _InputIter __l) : __start_(0), __size_(0, __default_init_tag()) { __annotate_new(0); @@ -1387,9 +1376,8 @@ } template -template -deque<_Tp, _Allocator>::deque(_InputIter __f, _InputIter __l, const allocator_type& __a, - typename enable_if<__has_input_iterator_category<_InputIter>::value>::type*) +template ::value, int> > +deque<_Tp, _Allocator>::deque(_InputIter __f, _InputIter __l, const allocator_type& __a) : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a) { __annotate_new(0); @@ -1514,11 +1502,10 @@ #endif // _LIBCPP_CXX03_LANG template -template +template ::value && + !__has_random_access_iterator_category<_InputIter>::value, int> > void -deque<_Tp, _Allocator>::assign(_InputIter __f, _InputIter __l, - typename enable_if<__has_input_iterator_category<_InputIter>::value && - !__has_random_access_iterator_category<_InputIter>::value>::type*) +deque<_Tp, _Allocator>::assign(_InputIter __f, _InputIter __l) { __assign_with_sentinel(__f, __l); } @@ -1538,10 +1525,9 @@ } template -template +template ::value, int> > void -deque<_Tp, _Allocator>::assign(_RAIter __f, _RAIter __l, - typename enable_if<__has_random_access_iterator_category<_RAIter>::value>::type*) +deque<_Tp, _Allocator>::assign(_RAIter __f, _RAIter __l) { __assign_with_size_random_access(__f, __l - __f); } @@ -2064,10 +2050,9 @@ } template -template +template ::value, int> > typename deque<_Tp, _Allocator>::iterator -deque<_Tp, _Allocator>::insert(const_iterator __p, _InputIter __f, _InputIter __l, - typename enable_if<__has_exactly_input_iterator_category<_InputIter>::value>::type*) +deque<_Tp, _Allocator>::insert(const_iterator __p, _InputIter __f, _InputIter __l) { return __insert_with_sentinel(__p, __f, __l); } @@ -2084,10 +2069,9 @@ } template -template +template ::value, int> > typename deque<_Tp, _Allocator>::iterator -deque<_Tp, _Allocator>::insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l, - typename enable_if<__has_exactly_forward_iterator_category<_ForwardIterator>::value>::type*) +deque<_Tp, _Allocator>::insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l) { return __insert_with_size(__p, __f, std::distance(__f, __l)); } @@ -2104,10 +2088,9 @@ } template -template +template ::value, int> > typename deque<_Tp, _Allocator>::iterator -deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l, - typename enable_if<__has_bidirectional_iterator_category<_BiIter>::value>::type*) +deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l) { return __insert_bidirectional(__p, __f, __l, std::distance(__f, __l)); } @@ -2190,10 +2173,9 @@ } template -template +template ::value, int> > void -deque<_Tp, _Allocator>::__append(_InpIter __f, _InpIter __l, - typename enable_if<__has_exactly_input_iterator_category<_InpIter>::value>::type*) +deque<_Tp, _Allocator>::__append(_InpIter __f, _InpIter __l) { __append_with_sentinel(__f, __l); } @@ -2211,10 +2193,9 @@ } template -template +template ::value, int> > void -deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l, - typename enable_if<__has_forward_iterator_category<_ForIter>::value>::type*) +deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l) { __append_with_size(__f, std::distance(__f, __l)); } diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -2142,18 +2142,14 @@ #endif _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v); _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v, const allocator_type& __a); - template - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, - typename enable_if<__has_exactly_input_iterator_category<_InputIterator>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a, - typename enable_if<__has_exactly_input_iterator_category<_InputIterator>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, - typename enable_if<__has_forward_iterator_category<_ForwardIterator>::value>::type* = 0); - template - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a, - typename enable_if<__has_forward_iterator_category<_ForwardIterator>::value>::type* = 0); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last); + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a); #if _LIBCPP_STD_VER >= 23 template <_ContainerCompatibleRange _Range> @@ -2685,10 +2681,9 @@ } template -template +template ::value, int> > _LIBCPP_CONSTEXPR_SINCE_CXX20 -vector::vector(_InputIterator __first, _InputIterator __last, - typename enable_if<__has_exactly_input_iterator_category<_InputIterator>::value>::type*) +vector::vector(_InputIterator __first, _InputIterator __last) : __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) @@ -2697,10 +2692,9 @@ } template -template +template ::value, int> > _LIBCPP_CONSTEXPR_SINCE_CXX20 -vector::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a, - typename enable_if<__has_exactly_input_iterator_category<_InputIterator>::value>::type*) +vector::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) @@ -2709,10 +2703,9 @@ } template -template +template ::value, int> > _LIBCPP_CONSTEXPR_SINCE_CXX20 -vector::vector(_ForwardIterator __first, _ForwardIterator __last, - typename enable_if<__has_forward_iterator_category<_ForwardIterator>::value>::type*) +vector::vector(_ForwardIterator __first, _ForwardIterator __last) : __begin_(nullptr), __size_(0), __cap_alloc_(0, __default_init_tag()) @@ -2722,10 +2715,9 @@ } template -template +template ::value, int> > _LIBCPP_CONSTEXPR_SINCE_CXX20 -vector::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a, - typename enable_if<__has_forward_iterator_category<_ForwardIterator>::value>::type*) +vector::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a) : __begin_(nullptr), __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a))