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



--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> 2013-05-06 12:52:41 
UTC ---

(In reply to comment #1)

> Unless I'm misunderstanding your suggestion I think that a compiler is not

> allowed to apply copy-elision here, because that case was explicitly excluded

> from 12.8 p31 by

> 

> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1148



Really? Apart from the fact that no compiler implements it so it probably

didn't look like a huge sacrifice at the time, it is in my opinion moving in

the wrong direction (less elision, when we actually need a lot more). Do you

have a link to the discussion, or happen to remember the arguments? I can see

that there are more possible issues with the parameter (it lives a little

longer in the caller, which gives more chances to reuse it), but the permission

to move probably already breaks most such examples.



Thanks for the notice.

Reply via email to