This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/71788] is_trivially_copy_constructible gives false for types with user defined destructors
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 07 Jul 2016 10:20:44 +0000
- Subject: [Bug libstdc++/71788] is_trivially_copy_constructible gives false for types with user defined destructors
- Auto-submitted: auto-generated
- References: <bug-71788-4@http.gcc.gnu.org/bugzilla/>
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.