https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64865
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- DR 2218 gave me what I want, which means there's no guarantee that your specialization is used for calls to construct/destroy. The container could rebind the allocator to std::allocator<__super_secret_type> which you haven't specialized, and then use its construct/destroy. So I think these optimizations are allowed.