File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
libcxx/include/__iterator Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -43,25 +43,25 @@ next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n =
43
43
namespace ranges {
44
44
struct __next {
45
45
template <input_or_output_iterator _Ip>
46
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x) const {
46
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x) const {
47
47
++__x;
48
48
return __x;
49
49
}
50
50
51
51
template <input_or_output_iterator _Ip>
52
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n) const {
52
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n) const {
53
53
ranges::advance (__x, __n);
54
54
return __x;
55
55
}
56
56
57
57
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
58
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, _Sp __bound_sentinel) const {
58
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, _Sp __bound_sentinel) const {
59
59
ranges::advance (__x, __bound_sentinel);
60
60
return __x;
61
61
}
62
62
63
63
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
64
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n, _Sp __bound_sentinel) const {
64
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n, _Sp __bound_sentinel) const {
65
65
ranges::advance (__x, __n, __bound_sentinel);
66
66
return __x;
67
67
}
Original file line number Diff line number Diff line change @@ -42,19 +42,19 @@ prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n =
42
42
namespace ranges {
43
43
struct __prev {
44
44
template <bidirectional_iterator _Ip>
45
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x) const {
45
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x) const {
46
46
--__x;
47
47
return __x;
48
48
}
49
49
50
50
template <bidirectional_iterator _Ip>
51
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n) const {
51
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n) const {
52
52
ranges::advance (__x, -__n);
53
53
return __x;
54
54
}
55
55
56
56
template <bidirectional_iterator _Ip>
57
- _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n, _Ip __bound_iter) const {
57
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator ()(_Ip __x, iter_difference_t <_Ip> __n, _Ip __bound_iter) const {
58
58
ranges::advance (__x, -__n, __bound_iter);
59
59
return __x;
60
60
}
You can’t perform that action at this time.
0 commit comments