16 Mar
2005
16 Mar
'05
12:06 p.m.
Ian McCulloch wrote:
Yes, if you want to forward to a function but you don't know if it takes arguments by value or const reference.
It doesn't matter. When you forward, you pass to result_of the exact types
of the arguments you are supplying in the function (object) call, with a
reference when the argument is an lvalue.
int x;
long y;
int const z;
int g();
int & h();
f(x, y); // result_of