From Jason Turner
Watch on YouTube

Summary

This episode demonstrates how C++23's 'deducing this' feature enables a clean implementation of recursive lambdas, a capability that was awkward to achieve in previous C++ versions. Jason shows how combining C++20's explicit template parameters for lambdas with C++23's deducing this creates an elegant solution for self-referencing lambdas. The example uses a factorial implementation to illustrate how a lambda can now call itself recursively without complex workarounds.

Resources

Tags