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

Sign in to watch this lesson
Value Categories, Move and Perfect Forwarding · 4:00
std::move is an unconditional cast for rvalue references; std::forward<T> is a conditional cast for forwarding references, used once at the last use. We watch std::move on a forwarding reference empty the caller's string, then count constructions to show why `return std::move(w)` only adds a move that the return value optimization would have avoided.