4 ms·
Not quite, I suggested changing the signature of “consume” to accept a reference. His example doesn’t do anything to invoke copy elision, since his named rvalue
by CyberRabbi 6y ago
Not quite, I suggested changing the signature of “consume” to accept a reference. His example doesn’t do anything to invoke copy elision, since his named rvalue reference will be function cast to a normal reference and then copy-constructed into the stack value passed to “consume”.
- AzN1337c0d3r 6y agohttps://gcc.godbolt.org/z/qd5qnhPT6 https://gcc.godbolt.org/z/qd5qnhPT6 How does any copy-construction happen here?