@@ -91,15 +91,15 @@ struct _IterOps<_ClassicAlgPolicy> {
91
91
// use the incoming type for returning and steer clear of negative overflows
92
92
template <class _Iter , class _Distance >
93
93
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance
94
- advance (_Iter& __iter, _Distance __count, const _Iter& __sentinel) {
95
- return _IterOps::__advance (__iter, __count, __sentinel, typename iterator_traits<_Iter>::iterator_category ());
94
+ __advance_to (_Iter& __iter, _Distance __count, const _Iter& __sentinel) {
95
+ return _IterOps::__advance_to (__iter, __count, __sentinel, typename iterator_traits<_Iter>::iterator_category ());
96
96
}
97
97
98
98
private:
99
99
// advance with sentinel, a la std::ranges::advance -- InputIterator specialization
100
100
template <class _InputIter , class _Distance >
101
101
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance
102
- __advance (_InputIter& __iter, _Distance __count, const _InputIter& __sentinel, input_iterator_tag) {
102
+ __advance_to (_InputIter& __iter, _Distance __count, const _InputIter& __sentinel, input_iterator_tag) {
103
103
_Distance __dist = _Distance ();
104
104
for (; __dist < __count && __iter != __sentinel; ++__dist)
105
105
++__iter;
@@ -109,7 +109,7 @@ struct _IterOps<_ClassicAlgPolicy> {
109
109
// advance with sentinel, a la std::ranges::advance -- BidirectionalIterator specialization
110
110
template <class _BiDirIter , class _Distance >
111
111
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance
112
- __advance (_BiDirIter& __iter, _Distance __count, const _BiDirIter& __sentinel, bidirectional_iterator_tag) {
112
+ __advance_to (_BiDirIter& __iter, _Distance __count, const _BiDirIter& __sentinel, bidirectional_iterator_tag) {
113
113
_Distance __dist = _Distance ();
114
114
if (__count >= 0 )
115
115
for (; __dist < __count && __iter != __sentinel; ++__dist)
@@ -123,7 +123,7 @@ struct _IterOps<_ClassicAlgPolicy> {
123
123
// advance with sentinel, a la std::ranges::advance -- RandomIterator specialization
124
124
template <class _RandIter , class _Distance >
125
125
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance
126
- __advance (_RandIter& __iter, _Distance __count, const _RandIter& __sentinel, random_access_iterator_tag) {
126
+ __advance_to (_RandIter& __iter, _Distance __count, const _RandIter& __sentinel, random_access_iterator_tag) {
127
127
auto __dist = _IterOps::distance (__iter, __sentinel);
128
128
_LIBCPP_ASSERT_VALID_INPUT_RANGE (
129
129
__count == 0 || (__dist < 0 ) == (__count < 0 ), " __sentinel must precede __iter when __count < 0" );
0 commit comments