The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Minimum price
$12.99
$19.99
About the Book
You want to finally understand C++ lambdas? Once you understand them, your C++ code will never be the same. In a good way.
The Anatomy of C++ Lambdas is a focused, example-rich guide to what lambdas really are, how they work under the hood, and how to use them effectively. It starts with why lambdas exist and what a lambda is (an unnamed function object that can capture variables in scope), and then builds up to practical use.
Inside you will find:
Lambda syntax, piece by piece: captures by value and by reference, capture-all, the most common pitfall, capturing this, init-capture, mutable and static captures, parameters (including auto, template parameters and the explicit object parameter), the body, the return value, specifiers and the extended lambda form.
Passing lambdas to other code, as a template or as a std::function, and what that means for performance and memory.
Lambdas in practice: algorithms, callbacks, nesting lambdas, immediately invoked function expressions, little helpers, converting a lambda to a C function pointer, std::visit and custom deleters.
The book is a compact PDF of over 40 pages, and the source code of all examples is free on GitHub.
Who is it for? Anyone who is unfamiliar with lambdas and wants to know what all the possibilities are, and anyone who already uses them and wants to understand what the compiler really does with them.
Consider this book your multi-vitamin subscription, the gut-healing medicine that gives your code the boost you were looking for. The doctor is in.
Follow C++ Doctor at cppdoctor.com
About the Author
Jelle has been a C++ engineer for over a decade, contributing to a wide range of commercial products. He’s driven by a passion for writing high-quality code, and when he realized how many developers struggle to write good C++ code he founded C++ Doctor. Aiming to help others write clean, bug-free C++ through educational content delivered via newsletters, LinkedIn, eBooks and other products.
Jelle has spoken at the Audio Developer Conference, and is the author of The Anatomy of C++ Lambdas and 25 C++ Cases That Will Humble You. He’s also the founder of MPE HUB, a tool that brings MPE MIDI support to any synth.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.