[libcxx-commits] [libcxx] [libc++][ranges][enumerate_view] Update `size.pass.cpp` (PR #233777)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 20 03:34:13 PDT 2026


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 cpp -- libcxx/test/std/ranges/range.adaptors/range.enumerate/size.pass.cpp --diff_from_common_commit
``````````

: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/test/std/ranges/range.adaptors/range.enumerate/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.enumerate/size.pass.cpp
index 84a2c6331..5e303ceff 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.enumerate/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.enumerate/size.pass.cpp
@@ -39,10 +39,10 @@ static_assert(!HasMemberSize<std::ranges::enumerate_view<NonSizedRangeView>>);
 static_assert(!HasMemberSize<const std::ranges::enumerate_view<NonSizedRangeView>>);
 
 struct NonConstSizedView : std::ranges::view_base {
-    using iterator = forward_iterator<int*>;
-    iterator begin() const;
-    iterator end() const;
-    std::size_t size();
+  using iterator = forward_iterator<int*>;
+  iterator begin() const;
+  iterator end() const;
+  std::size_t size();
 };
 
 // Test the pathological type where it is sized if it's const but not sized if it's const.

``````````

</details>


https://github.com/llvm/llvm-project/pull/233777


More information about the libcxx-commits mailing list