Rvalue ref and perfect forwarding
问题 I've read few papers about && and I'm just curious if having: void fnc_1(int&& p) { //... } void fnc(int&& r) { fnc_1(r);//am I suppose to/should I? call it like so:fnc_1(std::forward(r)) } or just passing 'r' is enough? 回答1: fnc_1(r) won't compile, because r is an lvalue, just like any other variable, regardless of type. Yes, that's right, named rvalue references are lvalues, not rvalues. fnc_1(std::forward(r)) also won't compile, because std::forward is specifically designed not to infer