@@ -47,15 +47,9 @@ struct _RangeAlgPolicy {};
4747
4848template <>
4949struct _IterOps <_RangeAlgPolicy> {
50- template <class _Iter >
51- using __value_type _LIBCPP_NODEBUG = iter_value_t <_Iter>;
52-
5350 template <class _Iter >
5451 using __iterator_category _LIBCPP_NODEBUG = ranges::__iterator_concept<_Iter>;
5552
56- template <class _Iter >
57- using __difference_type _LIBCPP_NODEBUG = iter_difference_t <_Iter>;
58-
5953 static constexpr auto advance = ranges::advance;
6054 static constexpr auto distance = ranges::distance;
6155 static constexpr auto __iter_move = ranges::iter_move;
@@ -71,15 +65,9 @@ struct _ClassicAlgPolicy {};
7165
7266template <>
7367struct _IterOps <_ClassicAlgPolicy> {
74- template <class _Iter >
75- using __value_type _LIBCPP_NODEBUG = typename iterator_traits<_Iter>::value_type;
76-
7768 template <class _Iter >
7869 using __iterator_category _LIBCPP_NODEBUG = typename iterator_traits<_Iter>::iterator_category;
7970
80- template <class _Iter >
81- using __difference_type _LIBCPP_NODEBUG = typename iterator_traits<_Iter>::difference_type;
82-
8371 // advance
8472 template <class _Iter , class _Distance >
8573 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void advance (_Iter& __iter, _Distance __count) {
@@ -164,30 +152,30 @@ struct _IterOps<_ClassicAlgPolicy> {
164152
165153 // advance with sentinel, a la std::ranges::advance
166154 template <class _Iter >
167- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type <_Iter>
168- __advance_to (_Iter& __iter, __difference_type <_Iter> __count, const _Iter& __sentinel) {
155+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __iter_difference_t <_Iter>
156+ __advance_to (_Iter& __iter, __iter_difference_t <_Iter> __count, const _Iter& __sentinel) {
169157 return _IterOps::__advance_to (__iter, __count, __sentinel, typename iterator_traits<_Iter>::iterator_category ());
170158 }
171159
172160private:
173161 // advance with sentinel, a la std::ranges::advance -- InputIterator specialization
174162 template <class _InputIter >
175- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type <_InputIter> __advance_to (
176- _InputIter& __iter, __difference_type <_InputIter> __count, const _InputIter& __sentinel, input_iterator_tag) {
177- __difference_type <_InputIter> __dist = 0 ;
163+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __iter_difference_t <_InputIter> __advance_to (
164+ _InputIter& __iter, __iter_difference_t <_InputIter> __count, const _InputIter& __sentinel, input_iterator_tag) {
165+ __iter_difference_t <_InputIter> __dist = 0 ;
178166 for (; __dist < __count && __iter != __sentinel; ++__dist)
179167 ++__iter;
180168 return __count - __dist;
181169 }
182170
183171 // advance with sentinel, a la std::ranges::advance -- BidirectionalIterator specialization
184172 template <class _BiDirIter >
185- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type <_BiDirIter>
173+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __iter_difference_t <_BiDirIter>
186174 __advance_to (_BiDirIter& __iter,
187- __difference_type <_BiDirIter> __count,
175+ __iter_difference_t <_BiDirIter> __count,
188176 const _BiDirIter& __sentinel,
189177 bidirectional_iterator_tag) {
190- __difference_type <_BiDirIter> __dist = 0 ;
178+ __iter_difference_t <_BiDirIter> __dist = 0 ;
191179 if (__count >= 0 )
192180 for (; __dist < __count && __iter != __sentinel; ++__dist)
193181 ++__iter;
@@ -199,9 +187,9 @@ struct _IterOps<_ClassicAlgPolicy> {
199187
200188 // advance with sentinel, a la std::ranges::advance -- RandomIterator specialization
201189 template <class _RandIter >
202- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __difference_type <_RandIter>
190+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static __iter_difference_t <_RandIter>
203191 __advance_to (_RandIter& __iter,
204- __difference_type <_RandIter> __count,
192+ __iter_difference_t <_RandIter> __count,
205193 const _RandIter& __sentinel,
206194 random_access_iterator_tag) {
207195 auto __dist = _IterOps::distance (__iter, __sentinel);
@@ -216,9 +204,6 @@ struct _IterOps<_ClassicAlgPolicy> {
216204 }
217205};
218206
219- template <class _AlgPolicy , class _Iter >
220- using __policy_iter_diff_t _LIBCPP_NODEBUG = typename _IterOps<_AlgPolicy>::template __difference_type<_Iter>;
221-
222207_LIBCPP_END_NAMESPACE_STD
223208
224209_LIBCPP_POP_MACROS
0 commit comments