[libcxx-commits] [libcxx] [libc++] Add __uninitialized_allocator_{fill, value_construct, move} and use them in vector (PR #207500)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 4 02:08:45 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 h -- libcxx/include/__memory/uninitialized_algorithms.h libcxx/include/__vector/vector.h --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/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h
index 5426dae7e..39064cb97 100644
--- a/libcxx/include/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__memory/uninitialized_algorithms.h
@@ -463,8 +463,8 @@ _Iter __uninitialized_allocator_fill(_Alloc& __alloc, _Iter __first, _Sent __las
 }
 
 template <class _Alloc, class _Iter, class _Sent>
-_LIBCPP_CONSTEXPR_SINCE_CXX20
-_Iter __uninitialized_allocator_value_construct(_Alloc& __alloc, _Iter __first, _Sent __last) {
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
+__uninitialized_allocator_value_construct(_Alloc& __alloc, _Iter __first, _Sent __last) {
   auto __iter = __first;
 
   auto __guard = std::__make_exception_guard([&] { std::__allocator_destroy(__alloc, __first, __iter); });

``````````

</details>


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


More information about the libcxx-commits mailing list