Essays on Modern C++ released
Way back in 2022, I got the idea to do the Martin Gardner thing — to collect a few of the best posts I’d written for this blog and publish them as a proper paper book. I chickened out at the time, but this month I decided the stars were right to revisit that old project and finally publish my first collection of Essays on Modern C++.
Okay, “proper paper book” is an exaggeration: At least for now the book is available only in PDF/ePub format through Leanpub.com. (This is the same platform used for direct sales by Jason Turner and Nicolai Josuttis, among others.) But I’ve got a print version ready to go, if Leanpub ever starts offering print sales or if a publisher reaches out.
I see this collection of my old blog posts as perhaps of little interest to someone
who already has ready access to my blog; just as
Gardner’s collections might have been
of little interest to someone who already had a full back catalog of his Scientific American columns.
But if you were just waiting for a nicely typeset PDF to convince your coworker of a particular
pet peeve — well, maybe this book is for you. Also, to give a little extra incentive even to regular
readers of this blog (who are, after all, the most likely buyers of such an e-book), I
round out the baker’s dozen with one previously unpublished chapter — a quick five pages
on the implementation of std::tuple_cat
.
The essays collected in this first book are:
- “
const
is a contract” (2019-01-03) - “How to erase from an STL container” (2020-07-08)
- “What
=delete
means” (2021-10-17) - “Value category is not lifetime” (2019-03-11)
- “What is ADL?” (2019-04-26)
- “What is the
std::swap
two-step?” (2020-07-11) - “How do
using namespace
directives work?” (2020-12-21) - “SCARY metafunctions” (2018-07-09)
- “Iteration is better than recursion” (2018-07-23)
- “How is
tuple_cat
implemented?” (previously unpublished) - “Why don’t Concepts do definition checking?” (2019-07-22)
- “Why do we require
requires requires
?” (2019-01-15) - “Concepts can’t do quantifiers” (2020-08-10)
Each essay has been “remastered” for the 2020s (specifically, for 2022); for example, outdated references to “C++2a” have been replaced with “C++20.” The essays have also been remastered for print; for example, inline code snippets replace the original posts’ Godbolt links, and informative footnotes replace or augment many of the blog’s simple hyperlinks. The book also includes an exhaustive four-page subject index.
Errata and comments are of course welcome: send me an email!