[libcxx-commits] [libcxx] [libc++] Optimize vector::emplace (PR #218665)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 25 05:11:46 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/__memory/uninitialized_algorithms.h libcxx/include/__type_traits/is_relocatable.h libcxx/include/__vector/vector.h libcxx/test/std/containers/sequences/vector/vector.modifiers/destroy_elements.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/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h
index 5a69632b8..ca18fac96 100644
--- a/libcxx/include/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__memory/uninitialized_algorithms.h
@@ -347,8 +347,8 @@ __uninitialized_relocate(_ContiguousIterator __first, _ContiguousIterator __last
// doesn't contain any objects.
// [__first, __last) doesn't contain any objects.
template <class _ContiguousIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
-__uninitialized_relocate_backward(_ContiguousIterator __first, _ContiguousIterator __last, _ContiguousIterator __result) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __uninitialized_relocate_backward(
+ _ContiguousIterator __first, _ContiguousIterator __last, _ContiguousIterator __result) {
static_assert(__libcpp_is_contiguous_iterator<_ContiguousIterator>::value, "");
using _ValueType = typename iterator_traits<_ContiguousIterator>::value_type;
``````````
</details>
https://github.com/llvm/llvm-project/pull/218665
More information about the libcxx-commits
mailing list