This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56976] using braces to initialize a reference forces copy construction
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 May 2013 13:55:28 +0000
- Subject: [Bug c++/56976] using braces to initialize a reference forces copy construction
- Auto-submitted: auto-generated
- References: <bug-56976-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56976
--- Comment #3 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
(In reply to Akim Demaille from comment #2)
You are right, I misread your code example in the haste. I agree that this is
not related to CWG 1604 (we have no mixed case) and I think it is clear that
both initializations should be accepted, it should be a direct binding, because
we fall into 8.5.4 p3 b5:
"Otherwise, if the initializer list has a single element of type E and [..] its
referenced type is reference-related to E, the object or reference is
initialized from that element;"