Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 26s8 days 9 hours 54 minutes 26 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 26s8 days 9 hours 54 minutes 26 seconds.

Sign in to watch this lesson
Value Categories, Move and Perfect Forwarding · 3:29
Two ampersands don't always mean rvalue reference. On a deduced template parameter written exactly as T&&, they make a forwarding reference that binds to anything. We spot the impostors (vector<T>&&, const T&&, a class template's push_back), ask clang what T becomes for lvalues and rvalues, watch Widget& && collapse to Widget&, and see that auto&& follows the same rules.