This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]