[Bug libstdc++/71788] is_trivially_copy_constructible gives false for types with user defined destructors

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 7 10:20:00 GMT 2016


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

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

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Your non-trivial destructor means that is_trivially_xxx_constructible is false,
because that trait is based on an expression that creates and destroys an
object.

That's by design, because simply asking whether the type *has* a trivial
constructor doesn't actually help, in typical generic code you want to know if
a particular operation is trivial.


More information about the Gcc-bugs mailing list