https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102209
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- The standard does not permit copy elision for function parameters. The call to the move constructor is observable, and cannot be elided.