[Bug c++/19531] NRV is performed on volatile temporary
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 23 17:13:00 GMT 2007
------- Comment #3 from bangerth at dealii dot org 2007-09-23 17:13 -------
Confirmed indeed. Core DR 20 added the following text to 12.8/15:
This elision of copy operations is permitted in the following
circumstances (which may be combined to eliminate multiple copies):
-- in a return statement in a function with a class return type, when
the expression is the name of a non-volatile automatic object with
the same cv-unqualified type as the function return type, the copy
operation can be omitted by constructing the automatic object
directly into the function's return value
Note that the return expression is specifically restricted to the name of
a *non-volatile automatic object*.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19531
More information about the Gcc-bugs
mailing list