From Jason Turner
Watch on YouTube

Summary

This episode discusses a potential pitfall of overusing lambda expressions in C++. Jason shares a real-world example from his work on ChaiScript where removing an unnecessary lambda wrapper around callable objects resulted in a 10% reduction in binary size. He demonstrates how using lambdas that simply forward their arguments to another callable can create significant compiler overhead, especially in generic code with heavy template usage. The episode emphasizes the importance of understanding the implications of lambdas on binary size and compilation time.

Resources

Tags