[libcxx-commits] [libcxx] [libc++] Make std::allocator always trivially default constructible (PR #169914)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 9 07:55:41 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 origin/main HEAD --extensions h,cpp -- libcxx/test/libcxx/memory/allocator_triviality.compile.pass.cpp libcxx/test/libcxx/memory/allocator_triviality.deprecated_abi.compile.pass.cpp libcxx/include/__memory/allocator.h libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.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/allocator.h b/libcxx/include/__memory/allocator.h
index 30bfc267d..1c96a2ab6 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -62,7 +62,7 @@ template <class _Tp>
class allocator
// TODO(LLVM 24): Remove the opt-out
#ifdef _LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR
- : __non_trivially_default_constructible_if<!is_void<_Tp>::value, allocator<_Tp> >
+ : __non_trivially_default_constructible_if<!is_void<_Tp>::value, allocator<_Tp> >
#endif
{
static_assert(!is_const<_Tp>::value, "std::allocator does not support const types");
``````````
</details>
https://github.com/llvm/llvm-project/pull/169914
More information about the libcxx-commits
mailing list