[libcxx-commits] [libcxx] [libc++] Add support for bounded iterators in std::array (PR #110729)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 1 12:55:45 PDT 2024


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 5366bf5b6642f826b2f69a3083a63727d9de771b 1dd4f9adb888a80ad6fea1448953adf27b020a2f --extensions ,h,cpp -- libcxx/include/__iterator/static_bounded_iter.h libcxx/test/std/containers/sequences/array/assert.indexing.pass.cpp libcxx/test/std/containers/sequences/array/assert.iterators.pass.cpp libcxx/include/__configuration/abi.h libcxx/include/__iterator/bounded_iter.h libcxx/include/array libcxx/test/std/containers/sequences/array/assert.back.pass.cpp libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp b/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp
index c20b0c9a80..b9dec01033 100644
--- a/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp
@@ -20,14 +20,14 @@
 int main(int, char**) {
   {
     typedef std::array<int, 0> C;
-    C c = {};
+    C c         = {};
     C const& cc = c;
     TEST_LIBCPP_ASSERT_FAILURE(c.back(), "cannot call array<T, 0>::back() on a zero-sized array");
     TEST_LIBCPP_ASSERT_FAILURE(cc.back(), "cannot call array<T, 0>::back() on a zero-sized array");
   }
   {
     typedef std::array<const int, 0> C;
-    C c = {{}};
+    C c         = {{}};
     C const& cc = c;
     TEST_LIBCPP_ASSERT_FAILURE(c.back(), "cannot call array<T, 0>::back() on a zero-sized array");
     TEST_LIBCPP_ASSERT_FAILURE(cc.back(), "cannot call array<T, 0>::back() on a zero-sized array");
diff --git a/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp b/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
index 7dbbd6f0ab..67a70a1d63 100644
--- a/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
@@ -20,14 +20,14 @@
 int main(int, char**) {
   {
     typedef std::array<int, 0> C;
-    C c = {};
+    C c         = {};
     C const& cc = c;
     TEST_LIBCPP_ASSERT_FAILURE(c.front(), "cannot call array<T, 0>::front() on a zero-sized array");
     TEST_LIBCPP_ASSERT_FAILURE(cc.front(), "cannot call array<T, 0>::front() on a zero-sized array");
   }
   {
     typedef std::array<const int, 0> C;
-    C c = {{}};
+    C c         = {{}};
     C const& cc = c;
     TEST_LIBCPP_ASSERT_FAILURE(c.front(), "cannot call array<T, 0>::front() on a zero-sized array");
     TEST_LIBCPP_ASSERT_FAILURE(cc.front(), "cannot call array<T, 0>::front() on a zero-sized array");

``````````

</details>


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


More information about the libcxx-commits mailing list