On 3/14/12, Alex Rønne Petersen <xtzgzo...@gmail.com> wrote:
> void foo(S s) // compiler decides to pass by ref
> {
>      s = S(2);
> }

Well in this case it wouldn't pass by ref since it sees an assignment.
But I can see how this would become tricky business (e.g. "why is my
code slow all of a sudden"). const ref has it's uses then. :p

Reply via email to