Skip to content

Commit 2d66073

Browse files
committed
clang-format
1 parent cc436df commit 2d66073

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

libcxx/include/__iterator/advance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ template < class _InputIter,
6565
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void advance(_InputIter& __i, _Distance __orig_n) {
6666
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
6767
_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.
6969
_LIBCPP_ASSERT_PEDANTIC(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
7070
"Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
7171
std::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());

libcxx/include/__iterator/next.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2727
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
2828
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
2929
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");
3434

35-
std::advance(__x, __n);
36-
return __x;
35+
std::advance(__x, __n);
36+
return __x;
3737
}
3838

3939
#if _LIBCPP_STD_VER >= 20

libcxx/include/__iterator/prev.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2727
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
2828
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
2929
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");
3434
std::advance(__x, -__n);
3535
return __x;
3636
}

libcxx/include/__ranges/filter_view.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ class _LIBCPP_ABI_2023_OVERLAPPING_SUBOBJECT_FIX_TAG filter_view : public view_i
8383
_LIBCPP_HIDE_FROM_ABI constexpr _Pred const& pred() const { return *__pred_; }
8484

8585
_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.");
8989
if constexpr (_UseCache) {
9090
if (!__cached_begin_.__has_value()) {
9191
__cached_begin_.__emplace(ranges::find_if(__base_, std::ref(*__pred_)));

0 commit comments

Comments
 (0)