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.