[Bug c++/57176] copy elision with function arguments passed by value

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 6 13:44:00 GMT 2013


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

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> 2013-05-06 13:44:51 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > 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.
> 
> I couldn't find any discussion in regard to this specific issue,

I am a bit surprised that handling elision and move differently was obvious
enough not to warrant any discussion (both seem at the same level of risk to me
and mostly differ in implementation difficulty). (Finding something in the
archives of wg21 is hard...)

> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#6
> 
> it seems that they would prefer to see a paper before the committee would
> perform any further action. It seems that inline functions are possibly less
> controversial and
> 
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1049
> 
> addresses a similar problem in regard to inline functions with reference
> parameters.

Those are BIG changes (that would be great! and a lot of work to implement...),
I was only considering fixing the 1148 clarification. But yeah, that's probably
not going to happen without a paper (not much to write in there...), and
someone at the meeting, and only after C++14 is out, etc.



More information about the Gcc-bugs mailing list