[Bug c++/65312] Implicitly-declared default constructor must be defined as deleted

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 4 12:53:00 GMT 2015


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).



More information about the Gcc-bugs mailing list