3 ms·
> RVO are guaranteed as of C++17 and mentioned in your cppreference link. Yes, but other instances of copy-elision are still at the discretion of the compiler
by MaxBarraclough 6y ago
> RVO are guaranteed as of C++17 and mentioned in your cppreference link.
Yes, but other instances of copy-elision are still at the discretion of the compiler, right?
- pjmlp 6y agoYes, just RVO are guaranteed, because what happens in practice is the return location is already prepared before the call. So even if move semantics aren't supported for the specific type, the target type gets built inplace.