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++/66537] An explicit default constructor is accepted when initializing from empty braces


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66537

--- Comment #2 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
(In reply to Daniel KrÃgler from comment #1)
> Isn't that similar to bug 54835? As far as I remember Jason interprets the
> standard that the code should be valid, see his comments in above mentioned
> issue.

I think there's a difference. The _temporary_ initialized from {}
is expected to not be allowed when the default constructor is explicit. What
happens after that in returning from a function or passing an argument
is separate.

Implementations disagree, so perhaps the specification needs to be clarified.

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