llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.84k stars 11.47k forks source link

LWG3315: Correct Allocator Default Behavior #100426

Closed cjdb closed 2 weeks ago

cjdb commented 1 month ago

Link: https://wg21.link/lwg3315

llvmbot commented 1 month ago

@llvm/issue-subscribers-c-20

Author: Christopher Di Bella (cjdb)

**Link:** https://wg21.link/lwg3315
ldionne commented 2 weeks ago

Per https://github.com/llvm/llvm-project/pull/105593#issuecomment-2303310801:

IIUC LWG3315 can only be considered as a patch for P0784R7/C++20, not to earlier standard revisions, and the operations in "Default" are specified for allocator_traits, which has been implemented in LLVM 12.0.

So IMO we've already implemented this issue by making sure that we call construct_at and destroy_at inside allocator_traits. This is a subtle one.