This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65312] Implicitly-declared default constructor must be defined as deleted
- 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: Wed, 04 Mar 2015 12:53:22 +0000
- Subject: [Bug c++/65312] Implicitly-declared default constructor must be defined as deleted
- Auto-submitted: auto-generated
- References: <bug-65312-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65312
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The {} means value-initialization as opposed to default-initialization.
I think value-init requires the compiler to zero out all the members first,
even though they will be given another value anyway.
I haven't checked the generated code, but that would be my guess (and I would
hope the dead stores can be optimized away).