|
|
|
|
|
by psykotic
4234 days ago
|
|
> So when I see "Don't let T&& fool you here - T is not an rvalue reference" -- yes it fricking is! T&& is only an rvalue reference when T is a non-lvalue-reference type. If T = U& then T&& = U& because of the reference collapsing rules. If you're saying that you should understand how type deduction works and interacts with reference collapsing if you're going to write C++11 then I agree. Like much of C++, perfect forwarding's design is an ugly mess and is not amenable to a superficial understanding unless you like shooting yourself in the foot. |
|