https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58051
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-06-26
Summary|No named return value |[DR1579] No named return
|optimization when returned |value optimization when
|object is implicitly |returned object is
|converted |implicitly converted
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Ryan Johnson from comment #0)
> RVO works properly if go() returns A() or std::move(rval).
RVO is already working properly, C++11 did not allow the expression in the
return statement to be treated as an rvalue when it is a different type to the
function's return type.
However the standard changed:
http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579