[libcxx-commits] [libcxx] Replace ::new with construct_at in allocator. (PR #105593)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 21 16:40:24 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 c557d8520413476221a4f3bf2b7b3fed17681691 bf96c2517f7f6a725363afa55f65779254629de9 --extensions h -- libcxx/include/__memory/allocator.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h
index 937b1f06c7..475f7a77b3 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -151,9 +151,7 @@ public:
     std::construct_at(__p, std::forward<Args>(args)...);
   }
 
-  _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) {
-    std::destroy_at(__p);
-  }
+  _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) { std::destroy_at(__p); }
 #endif
 };
 

``````````

</details>


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


More information about the libcxx-commits mailing list