------- Comment #1 from dgregor at gcc dot gnu dot org  2008-01-15 05:38 -------
This is not a bug. In the line that prints "L-value ref" where the reporter
expected "R-value ref", the call to the lvalue reference constructor that we're
seeing comes from inside the body of the source() function, which is returning
a reference to a static variable. Since the variable is static, it is treated
as an lvalue, and therefore we do a construction with S's lvalue constructor
(which prints out "L-value ref"). Then, we don't actually need to perform
another construction to build "u" (since we constructed the result of the call
to source() in place), so there is no "R-value ref" at the end of the output/


-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34700

Reply via email to