This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58051] [DR1579] No named return value optimization when returned object is implicitly converted
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jun 2014 09:44:23 +0000
- Subject: [Bug c++/58051] [DR1579] No named return value optimization when returned object is implicitly converted
- Auto-submitted: auto-generated
- References: <bug-58051-4 at http dot gcc dot gnu dot org/bugzilla/>
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