[libcxx-commits] [libcxx] [libc++] Make the naming of the iterator_traits aliases consistent (PR #161661)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 2 06:19:29 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions ,h -- libcxx/include/__algorithm/copy.h libcxx/include/__algorithm/copy_backward.h libcxx/include/__algorithm/count.h libcxx/include/__algorithm/is_permutation.h libcxx/include/__algorithm/lexicographical_compare_three_way.h libcxx/include/__algorithm/make_heap.h libcxx/include/__algorithm/mismatch.h libcxx/include/__algorithm/move.h libcxx/include/__algorithm/move_backward.h libcxx/include/__algorithm/pstl.h libcxx/include/__algorithm/radix_sort.h libcxx/include/__algorithm/sift_down.h libcxx/include/__algorithm/stable_sort.h libcxx/include/__debug_utils/strict_weak_ordering_check.h libcxx/include/__flat_set/flat_multiset.h libcxx/include/__flat_set/flat_set.h libcxx/include/__iterator/bounded_iter.h libcxx/include/__iterator/cpp17_iterator_concepts.h libcxx/include/__iterator/iterator_traits.h libcxx/include/__iterator/static_bounded_iter.h libcxx/include/__iterator/wrap_iter.h libcxx/include/__numeric/pstl.h libcxx/include/__pstl/backends/default.h libcxx/include/__pstl/backends/libdispatch.h libcxx/include/__pstl/cpu_algos/find_if.h libcxx/include/__pstl/cpu_algos/transform.h libcxx/include/__pstl/cpu_algos/transform_reduce.h libcxx/include/__vector/vector.h libcxx/include/deque libcxx/include/forward_list libcxx/include/list libcxx/include/queue libcxx/include/set libcxx/include/stack libcxx/include/string libcxx/include/unordered_set
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__algorithm/count.h b/libcxx/include/__algorithm/count.h
index aceff06d6..8529d110a 100644
--- a/libcxx/include/__algorithm/count.h
+++ b/libcxx/include/__algorithm/count.h
@@ -82,8 +82,7 @@ __count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __l
}
template <class _InputIterator, class _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX20 __iterator_difference_type<_InputIterator>
+[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __iterator_difference_type<_InputIterator>
count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
__identity __proj;
return std::__count<_ClassicAlgPolicy>(__first, __last, __value, __proj);
diff --git a/libcxx/include/__iterator/cpp17_iterator_concepts.h b/libcxx/include/__iterator/cpp17_iterator_concepts.h
index 815684274..ecd30d8e1 100644
--- a/libcxx/include/__iterator/cpp17_iterator_concepts.h
+++ b/libcxx/include/__iterator/cpp17_iterator_concepts.h
@@ -68,7 +68,8 @@ concept __cpp17_default_constructible = is_default_constructible_v<_Tp>;
template <class _Iter>
concept __cpp17_iterator =
__cpp17_copy_constructible<_Iter> && __cpp17_copy_assignable<_Iter> && __cpp17_destructible<_Iter> &&
- (is_signed_v<__iterator_difference_type<_Iter>> || is_void_v<__iterator_difference_type<_Iter>>) && requires(_Iter __iter) {
+ (is_signed_v<__iterator_difference_type<_Iter>> || is_void_v<__iterator_difference_type<_Iter>>) &&
+ requires(_Iter __iter) {
{ *__iter };
{ ++__iter } -> same_as<_Iter&>;
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/161661
More information about the libcxx-commits
mailing list