public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43223] New: c++0x: Cannot init a R-value reference with L-value
@ 2010-03-01 23:08 rodrigorivascosta at gmail dot com
2010-03-02 0:00 ` [Bug c++/43223] " paolo dot carlini at oracle dot com
0 siblings, 1 reply; 2+ messages in thread
From: rodrigorivascosta at gmail dot com @ 2010-03-01 23:08 UTC (permalink / raw)
To: gcc-bugs
The following function fails to compile with C++0x:
int main()
{
int i = 3;
int &&x = i;
}
$ g++ -std=gnu++0x test.cpp -o test
test.cpp:4:15: error: invalid initialization of reference of type 'int&&' from
expression of type 'int'
--
Summary: c++0x: Cannot init a R-value reference with L-value
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rodrigorivascosta at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43223
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/43223] c++0x: Cannot init a R-value reference with L-value
2010-03-01 23:08 [Bug c++/43223] New: c++0x: Cannot init a R-value reference with L-value rodrigorivascosta at gmail dot com
@ 2010-03-02 0:00 ` paolo dot carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-03-02 0:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2010-03-02 00:00 -------
Yes, this is intended. For details see, for example:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2831.html
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43223
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-02 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-01 23:08 [Bug c++/43223] New: c++0x: Cannot init a R-value reference with L-value rodrigorivascosta at gmail dot com
2010-03-02 0:00 ` [Bug c++/43223] " paolo dot carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).