This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66537] An explicit default constructor is accepted when initializing from empty braces
- From: "ville.voutilainen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 14 Jun 2015 20:12:31 +0000
- Subject: [Bug c++/66537] An explicit default constructor is accepted when initializing from empty braces
- Auto-submitted: auto-generated
- References: <bug-66537-4 at http dot gcc dot gnu dot org/bugzilla/>
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.