[libcxx-commits] [libcxx] WIP [libc++][ranges] P3052R2: `view_interface::at()` (PR #205012)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 21 13:54:47 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,h -- libcxx/include/__ranges/view_interface.h libcxx/test/libcxx/ranges/range.utility/view.interface/nodiscard.verify.cpp libcxx/test/std/ranges/range.utility/view.interface/view.interface.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.utility/view.interface/view.interface.pass.cpp b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
index c170613e5..bd27ee3c6 100644
--- a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
@@ -300,12 +300,12 @@ constexpr bool testSubscript() {
   return true;
 }
 
-template<class T>
-concept AtInvocable = requires (T const& obj, std::size_t n) { obj.at(n); };
+template <class T>
+concept AtInvocable = requires(T const& obj, std::size_t n) { obj.at(n); };
 
 constexpr bool testAt() {
   static_assert(!AtInvocable<ForwardRange>);
-  static_assert( AtInvocable<RARange>);
+  static_assert(AtInvocable<RARange>);
 
   RARange randomAccess;
   assert(randomAccess.at(2) == 2);

``````````

</details>


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


More information about the libcxx-commits mailing list