News for hackers. Stuff that matters.
Re:Perfect forwarding and universal references in C++ by psykotic on Monday November 10, 2014 @01:52PM (#8585441)
> 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.

There are no comments on this comment yet.