[libcxx-commits] [PATCH] D104486: [libc++] Make sure std::allocator<void> is always trivial

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 17 13:19:10 PDT 2021


ldionne created this revision.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

When we removed the allocator<void> specialization, the triviality of
std::allocator<void> changed because the primary template had a
non-trivial default constructor and the specialization didn't
(so std::allocator<void> went from trivial to non-trivial).

This commit fixes that oversight by giving a trivial constructor to
the primary template when instantiated on cv-void.

This was reported in https://llvm.org/PR50299.

(cherry picked from commit 71e4d434dc83b02a853712a5cb026ee2fa9ba67f <https://reviews.llvm.org/rG71e4d434dc83b02a853712a5cb026ee2fa9ba67f>)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104486

Files:
  libcxx/include/memory
  libcxx/test/libcxx/memory/allocator_void.trivial.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104486.352832.patch
Type: text/x-patch
Size: 4002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210617/8ff8b8b0/attachment.bin>


More information about the libcxx-commits mailing list