A Free Ebook on C++ Smart Pointers

To write expressive code in C++, mastering smart pointers is a necessity! Without them, our code becomes littered with memory management, new s and delete , and unclear semantics about who owns what resources.

If you’re part of my mailing list (which you can join at the bottom of this post), you will get as a Christmas gift a free ebook of more than 50 pages of selected contents of Fluent C++ about smart pointers. Of course, you also get access to the ebook if you’re a Patron of Fluent C++.

The ebook starts with the basics, explaining what a smart pointer is to begin with. Then it presents the various types of smart pointers at our disposal, and how to choose the one that fits your need in a given situation.

It then moves on to aspects of medium difficulty: how smart pointers integrate with other features of the language: how to handle them with the STL, in particular with std::set s, and how they can benefit the pimpl idiom.

Finally the ebook explains in detail advanced aspects of smart pointers. This includes custom deleters: how they work, when they’re useful, and how to keep your code expressive when using them. The ebook also covers how to use smart pointers and benefit from the covariance that C++ offers with raw pointers.

With this, you’ll be equipped to make the most of smart pointers in your code!

To get the ebook, use the form at the bottom of this page. By downloading the PDF, you will also get subscribed to the Fluent C++ mailing-list. It allows you to receive updates I send on how to make your code more expressive. But if you don’t like being on the mailing list, you can unsubscribe at any time.

Hope you’ll enjoy the ebook! Have a good read, and a merry Christmas.

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

Share this post! Don't want to miss out ?