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 c++/65312] Implicitly-declared default constructor must be defined as deleted


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


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