[all-commits] [llvm/llvm-project] 275ffa: [libc++] Make sure std::allocator<void> is always ...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jun 22 09:04:54 PDT 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 275ffa580880f6e18bf9742cad8e5dcab67b1f1d
      https://github.com/llvm/llvm-project/commit/275ffa580880f6e18bf9742cad8e5dcab67b1f1d
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M libcxx/include/memory
    A libcxx/test/libcxx/memory/allocator_void.trivial.compile.pass.cpp

  Log Message:
  -----------
  [libc++] Make sure std::allocator<void> is always trivial

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)

Differential Revision: https://reviews.llvm.org/D104486




More information about the All-commits mailing list