-
Book Overview & Buying
-
Table Of Contents
C++ Lambda Expressions - From C++98 to C++23
By :
C++ Lambda Expressions - From C++98 to C++23
By:
Overview of this book
From C++98 to C++23, callable entities have transformed how developers write flexible, maintainable, and efficient code. The course begins with a solid foundation in function pointers, including callbacks and pointers to member functions, then moves to function objects, highlighting their strengths over raw pointers and their role in shaping the path toward lambdas.
Next, you’ll explore the game-changing arrival of lambdas in C++11. You will master their syntax, capture lists, and usage patterns, from simple inline functions to advanced techniques like immediately invoked functions and std::function wrappers. The journey continues into C++14 and C++17 with generic lambdas, generalized captures, and constexpr capabilities, unlocking even greater flexibility and performance in your code.
Finally, the course covers C++20 and C++23 innovations, including template parameters in lambdas, constrained lambdas, static call operators, and recursive lambdas. Through practical, real-world examples, you will gain an in-depth understanding of each feature and learn to combine them effectively, enabling you to write modern, expressive, and highly reusable C++ code for production environments.
Table of Contents (7 chapters)
Introduction
Function Pointers
Function Objects
Lambda Features in C++11
Lambda Features in C++14 and C++17
Lambda Features in C++20