This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/19531] NRV is performed on volatile temporary



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]