Andrei Alexandrescu wrote:
...
> Now onto why ref was disallowed to bind to an rvalue. This is because 
> some functions take things by ref intending to change them. Passing an 
> rvalue is in such cases a bug.
> 
> I agree there are functions that only want to use ref for speed 
> purposes. I suggested Walter to use ref? for those. ref? means it could 
> be an rvalue or an lvalue.
> 
> 
> Andrei

Since passing by const ref cannot change the parameter, is it possible to 
allow that for rvalues?


Reply via email to