[libcxx-commits] [libcxx] [libc++] LWG4012: common_view::begin/end are missing the simple-view check (PR #153674)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 14 13:40:34 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 HEAD~1 HEAD --extensions h -- libcxx/include/__ranges/common_view.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h
index ff26a78c0..54bb8039b 100644
--- a/libcxx/include/__ranges/common_view.h
+++ b/libcxx/include/__ranges/common_view.h
@@ -58,7 +58,9 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
- _LIBCPP_HIDE_FROM_ABI constexpr auto begin() requires (!__simple_view<_View>) {
+ _LIBCPP_HIDE_FROM_ABI constexpr auto begin()
+ requires(!__simple_view<_View>)
+ {
if constexpr (random_access_range<_View> && sized_range<_View>)
return ranges::begin(__base_);
else
@@ -74,7 +76,9 @@ public:
return common_iterator<iterator_t<const _View>, sentinel_t<const _View>>(ranges::begin(__base_));
}
- _LIBCPP_HIDE_FROM_ABI constexpr auto end() requires (!__simple_view<_View>) {
+ _LIBCPP_HIDE_FROM_ABI constexpr auto end()
+ requires(!__simple_view<_View>)
+ {
if constexpr (random_access_range<_View> && sized_range<_View>)
return ranges::begin(__base_) + ranges::size(__base_);
else
``````````
</details>
https://github.com/llvm/llvm-project/pull/153674
More information about the libcxx-commits
mailing list