On Thu, 16 Feb 2012 00:46:35 +0100, Trass3r <[email protected]> wrote:
I posted this question several times already and no answer yet, why is allowing temporaries bind to ref const params bad again?
You'd want to pass temporaries by value, because then they can be constructed saving you a copy. If you want a function that avoids copies for lvalues and rvalues then you need auto ref :(.
C++'s 'const &' is very easy to get wrong.
