⚡ Build the skills to land top-paying quant jobs. Offer ends in 23d 14h 03m 12s23 days 14 hours 3 minutes 12 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 23d 14h 03m 12s23 days 14 hours 3 minutes 12 seconds.

Sign in to watch this lesson
Templates and Generic Programming · 4:29
How do you hand an algorithm a piece of behaviour? We build a function object, see why the compiler can inline it where a function pointer gets in the way, and then open up a lambda to find the ordinary class the compiler writes for it: captures become members, the body becomes a const call operator. We finish with init captures, generic and constexpr lambdas, and the classic dangling captured-this bug, caught by AddressSanitizer and fixed with [*this].