3 ms·
Copy elision should only be thought of in terms of prvalues. As soon as you give something an l-value, all bets are off. And I don’t really like the “consume” e
by opportune 6y ago
Copy elision should only be thought of in terms of prvalues. As soon as you give something an l-value, all bets are off. And I don’t really like the “consume” example since if you want to avoid copies into functions like that you should really be defining the function as taking Widget& and not rely on what you think is copy elision.