https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671

--- Comment #2 from Liu Hao <lh_mouse at 126 dot com> ---
在 2018/5/7 20:13, redi at gcc dot gnu.org 写道:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671
> 
> Jonathan Wakely <redi at gcc dot gnu.org> changed:
> 
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|UNCONFIRMED                 |ASSIGNED
>     Last reconfirmed|                            |2018-05-07
>             Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot 
> gnu.org
>       Ever confirmed|0                           |1
> 
> --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> It would be better to do:
> 
>    path __tmp(__lhs);
>    __tmp /= __rhs;
>    return __tmp;
> 
> That allows a copy to be elided.
> 

There is no difference in implementation as long as NRVO is in effect.

Reply via email to