File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ template < class _InputIter,
65
65
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void advance (_InputIter& __i, _Distance __orig_n) {
66
66
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
67
67
_Difference __n = static_cast <_Difference>(std::__convert_to_integral (__orig_n));
68
- // Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
68
+ // Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
69
69
_LIBCPP_ASSERT_PEDANTIC (__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
70
70
" Attempt to advance(it, n) with negative n on a non-bidirectional iterator" );
71
71
std::__advance (__i, __n, typename iterator_traits<_InputIter>::iterator_category ());
Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
27
27
template <class _InputIter , __enable_if_t <__has_input_iterator_category<_InputIter>::value, int > = 0 >
28
28
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
29
29
next (_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1 ) {
30
- // Calling `advance` with a negative value on a non-bidirectional iterator in the current implementation. Note that
31
- // this check duplicates the similar check in `std::advance`.
32
- _LIBCPP_ASSERT_PEDANTIC (__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
33
- " Attempt to next(it, n) with negative n on a non-bidirectional iterator" );
30
+ // Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
31
+ // Note that this check duplicates the similar check in `std::advance`.
32
+ _LIBCPP_ASSERT_PEDANTIC (__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
33
+ " Attempt to next(it, n) with negative n on a non-bidirectional iterator" );
34
34
35
- std::advance (__x, __n);
36
- return __x;
35
+ std::advance (__x, __n);
36
+ return __x;
37
37
}
38
38
39
39
#if _LIBCPP_STD_VER >= 20
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
27
27
template <class _InputIter , __enable_if_t <__has_input_iterator_category<_InputIter>::value, int > = 0 >
28
28
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
29
29
prev (_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1 ) {
30
- // Calling `advance` with a negative value on a non-bidirectional iterator in the current implementation. Note that
31
- // this check duplicates the similar check in `std::advance`.
32
- _LIBCPP_ASSERT_PEDANTIC (__n <= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
33
- " Attempt to prev(it, n) with a positive n on a non-bidirectional iterator" );
30
+ // Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation.
31
+ // Note that this check duplicates the similar check in `std::advance`.
32
+ _LIBCPP_ASSERT_PEDANTIC (__n <= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
33
+ " Attempt to prev(it, n) with a positive n on a non-bidirectional iterator" );
34
34
std::advance (__x, -__n);
35
35
return __x;
36
36
}
Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ class _LIBCPP_ABI_2023_OVERLAPPING_SUBOBJECT_FIX_TAG filter_view : public view_i
83
83
_LIBCPP_HIDE_FROM_ABI constexpr _Pred const & pred () const { return *__pred_; }
84
84
85
85
_LIBCPP_HIDE_FROM_ABI constexpr __iterator begin () {
86
- // Note: this duplicates a check in `optional` but provides a better error message.
87
- _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (
88
- __pred_.__has_value (), " Trying to call begin() on a filter_view that does not have a valid predicate." );
86
+ // Note: this duplicates a check in `optional` but provides a better error message.
87
+ _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (
88
+ __pred_.__has_value (), " Trying to call begin() on a filter_view that does not have a valid predicate." );
89
89
if constexpr (_UseCache) {
90
90
if (!__cached_begin_.__has_value ()) {
91
91
__cached_begin_.__emplace (ranges::find_if (__base_, std::ref (*__pred_)));
You can’t perform that action at this time.
0 commit comments