[libcxx-commits] [libcxx] [libc++] Fix {deque, vector}::append_range assuming too much about the types (PR #162438)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 8 01:25:45 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,,cpp -- libcxx/include/__vector/vector.h libcxx/include/deque libcxx/test/std/containers/sequences/deque/deque.modifiers/append_range.pass.cpp libcxx/test/std/containers/sequences/deque/deque.modifiers/prepend_range.pass.cpp libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/prepend_range.pass.cpp libcxx/test/std/containers/sequences/insert_range_sequence_containers.h libcxx/test/std/containers/sequences/list/list.modifiers/append_range.pass.cpp libcxx/test/std/containers/sequences/list/list.modifiers/prepend_range.pass.cpp libcxx/test/std/containers/sequences/vector/vector.modifiers/append_range.pass.cpp
``````````

: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/containers/sequences/insert_range_sequence_containers.h b/libcxx/test/std/containers/sequences/insert_range_sequence_containers.h
index 4212c43ed..3da5e23c9 100644
--- a/libcxx/test/std/containers/sequences/insert_range_sequence_containers.h
+++ b/libcxx/test/std/containers/sequences/insert_range_sequence_containers.h
@@ -644,17 +644,17 @@ constexpr void test_sequence_assign_range_move_only() {
 }
 
 struct InPlaceOnly {
-  InPlaceOnly(const InPlaceOnly&) = delete;
-  InPlaceOnly(InPlaceOnly&&) = delete;
+  InPlaceOnly(const InPlaceOnly&)            = delete;
+  InPlaceOnly(InPlaceOnly&&)                 = delete;
   InPlaceOnly& operator=(const InPlaceOnly&) = delete;
-  InPlaceOnly& operator=(InPlaceOnly&&) = delete;
+  InPlaceOnly& operator=(InPlaceOnly&&)      = delete;
   constexpr InPlaceOnly() {}
 };
 
 struct MoveConstructOnly {
-  MoveConstructOnly(const MoveConstructOnly&) = delete;
+  MoveConstructOnly(const MoveConstructOnly&)            = delete;
   MoveConstructOnly& operator=(const MoveConstructOnly&) = delete;
-  MoveConstructOnly& operator=(MoveConstructOnly&&) = delete;
+  MoveConstructOnly& operator=(MoveConstructOnly&&)      = delete;
   constexpr MoveConstructOnly(MoveConstructOnly&&) {}
   constexpr MoveConstructOnly(const InPlaceOnly&) {}
 };

``````````

</details>


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


More information about the libcxx-commits mailing list