[Bug middle-end/102209] NRVO for function parameters

2022-03-08 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102209 --- Comment #2 from Federico Kircheis --- Isn't the compiler allowed to do copy/move elision even if observable since before c++17?

[Bug middle-end/102209] NRVO for function parameters

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