[Bug libstdc++/80553] std::vector allows instantiation with type having a deleted destructor

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 28 10:17:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80553

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Marco Arena from comment #0)
> This compiles just fine, although it shouldn't because 'Foo' is not Erasable.

If you fail to meet the requirements for a container then your code has
undefined behaviour. No compiler error is required.


More information about the Gcc-bugs mailing list