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++/56976] using braces to initialize a reference forces copy construction


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;"

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