[libcxx-commits] [libcxx] [libc++] Use __alloc_traits whenever it is available for consistency (PR #126595)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 10 12:47:18 PST 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 ced23aa5403240f26cba4d99b59bf5d31d6035ac 03a0f0ebe36186d3db9e5f81f77165ad23b70423 --extensions  -- libcxx/include/deque libcxx/include/forward_list libcxx/include/list
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/deque b/libcxx/include/deque
index 6b46283458..ce29286445 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -677,7 +677,7 @@ public:
   _LIBCPP_HIDE_FROM_ABI deque& operator=(deque&& __c) noexcept(
       (__alloc_traits::propagate_on_container_move_assignment::value &&
        is_nothrow_move_assignable<allocator_type>::value) ||
-       __alloc_traits::is_always_equal::value);
+      __alloc_traits::is_always_equal::value);
 
   _LIBCPP_HIDE_FROM_ABI void assign(initializer_list<value_type> __il) { assign(__il.begin(), __il.end()); }
 #  endif // _LIBCPP_CXX03_LANG
@@ -1382,7 +1382,7 @@ template <class _Tp, class _Allocator>
 inline deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(deque&& __c) noexcept(
     (__alloc_traits::propagate_on_container_move_assignment::value &&
      is_nothrow_move_assignable<allocator_type>::value) ||
-     __alloc_traits::is_always_equal::value) {
+    __alloc_traits::is_always_equal::value) {
   __move_assign(__c, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
   return *this;
 }

``````````

</details>


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


More information about the libcxx-commits mailing list