Errata for the 1st edition


Here is the errata, i.e. the list of known typographical and other errors in the 1st edition (published on September 2017) of the book Clean C++. If you should find further errors beyond that, I would be pleased to hear from you.

Page 10, 6th paragraph [typo/spelling]
“If we board an elevator, we give our lives are in the hands of software.”
must be: “If we board an elevator, we give our lives in the hands of software.”

Other noteworthy things

At this point in the errata I would like to mention a few more points which are not errors, but which seem to be worth mentioning due to reader feedback.

No return 0 required

Many code examples show an int main() function, from which I return consistently with a return 0 statement. This is basically OK, but one reader reminds me that a return 0; is not necessary anymore. If the program flow reaches the end of main() without encountering a return statement, the effect is that a return 0; is executed implicitely.

Thread-safe smart pointers

In the last paragraph on page 87 (chapter 5 about “Advanced concepts of modern C++”) I write that the smart pointers of the C++ Standard Library are thread-safe by default. This is basically correct, but Rainer Grimm reminds me to emphasize that this statement is only valid for the pointer’s control code, and not for the resource (object) that is managed by these pointers. The developer is of course completely responsible for the thread-safety of the managed resource.