[Bug libstdc++/64865] std::allocator::construct/destroy not called for specialization of std::allocator<trivialtype>

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 13 17:17:00 GMT 2017


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.


More information about the Gcc-bugs mailing list