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

Sign in to watch this lesson
Value Categories, Move and Perfect Forwarding · 3:37
A function template taking a forwarding reference matches almost any argument exactly, so in overload resolution it beats promotions, added const and derived-to-base conversions. We watch it steal a short from an int overload, hijack copying a non-const Person and a derived class's copy, then fix it with a C++20 requires-clause.