C++ Lambda Story

Thank you for buying my Book about Lambda Expressions!

On this website you can find issues that were found after the publication.

Book Versions  

  • 25th March 2019 - The First Edition is live!
  • 5th January 2020 - Grammar, better examples, wording, IIFE section C++20 updates,
  • 17th April 2020 - The C++20 chapter is rewritten, grammar, wording, layout,
  • 30th April 2020 - Deriving from lambdas, in C++11, C++17 and C++20,
  • 19th June 2020 - Major update:
    • Improved C++98/03 chapter, added sections about helper functional objects from the Standard Library,
    • Added a new section on how to convert from deprecated bind1st into modern alternatives in the C++14 chapter,
    • Improved and extended IFFE section in C++11 and C++17 chapters,
    • New Appendix with a list of lambda techniques,
    • New Appendix with a list of “Top 5 Lambda Features”, adapted from a blog article,
    • New title image with updated subtitle,
    • Lots of smaller improvements across the whole book,
  • 3rd August 2020 - Major Update, also the Kindle Version available:
    • Most code samples have now a link to an online compiler version in the title,
    • Improved description of the syntax of lambdas, showed differences in C++17 and C++20 chapters,
    • New sections: how to store lambdas in a container, Lambdas and Asynchronous Execution, recursive lambdas, Exception Specification in Type System,
    • New section on variadic generic lambdas in C++14 and C++17,
    • New section on variadic packs in C++11, C++20,
    • Use const and noexcept in longer examples if possible,
    • Lots of smaller changes, improvements, layout across the whole book.
  • 30 November 2020 - Corrections, typos, grammar:
    • Wording for data members, function objects (why not a functor),
    • Clarification about capturing, initialisation and generated compiler code),
  • 1st February 2021 - Print Version of the book!
    • An extended version of the Appendix “Top 6 Lambda Features”,
    • Refactoring with IIFE, diagrams for the lambda syntax, index, layout fixes.

Issues and Fixes  

After 1st February 2021, the print version.

Page Notes Fix
iii, “About the book” Link not working https://leanpub.com/cpplambda/feedback use this link https://www.cppstories.com/p/cpplambda/
14 typo - “definiiotn” definition
33 Again, if you state the capture explicitly ([s]): If you state the capture explicitly ([s]) you’ll get a compiler error.
41 typo //__la is __lambda_4_18 in cppinights should be cppinsights
46, Ex2_22 consistency with previous examples, std::forward added, see updated example @Github
58 invokable Should be any_invocable
110 C++20 Syntax changes, missing consteval keyword See the updated diagram here
116 “The above lambda resolves to a templated call operator: " missing template in the code example Should be template <typename T> void operator()
117 “there’s not need for that: " Should be “there’s no need for that. See below:”
127 “Passing C++ a captureless lambda” “Passing a C++ captureless lambda”