This is the mail archive of the gcc-patches@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] |
On 10/03/2014 10:35 AM, Mark Wielaard wrote:
Say you have a user defined copy constructor. The DWARF consumer will see the declaration and can assume the class won't have a default constructor (unless that one is explicitly declared too). But currently the DWARF consumer cannot know whether that move constructor was really a user defined. If it was declared with = default; then it will see the move constructor and erroneously conclude that it was user defined and so the class won't have a default constructor generated for it.
That's not erroneous, a declaration with =default still suppresses the default constructor. "If there is no user-declared constructor for class X, a constructor having no parameters is implicitly declared as defaulted."
"user-declared" includes declarations that are defaulted in the class body. "user-provided" is the category that does not include such declarations.
Jason
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |