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

Sign in to watch this lesson
Value Categories, Move and Perfect Forwarding · 3:37
A move is cheap only when there is a heap pointer to steal. We time a vector move against a std::array move (about a nanosecond against several microseconds on a Mac), look inside a std::string to see the small-string optimization keep short names in the handle itself, and catch the cases where a move silently becomes a copy: a user-declared destructor, a const source, and a move constructor that isn't noexcept.