From Jason Turner
Watch on YouTube

Summary

This episode is a follow-up to a previous exploration of lambdas on the heap, correcting a mistake from the earlier video. Jason demonstrates how to handle lambdas that can't be moved or copied by creating them directly on the heap. He introduces the 'new auto' syntax, a C++11 feature that allows automatic type deduction when allocating objects on the heap. The episode shows how to capture non-movable objects in lambdas and still return them through smart pointers, effectively creating heap-allocated lambdas that circumvent move restrictions.

Resources

Tags