Nicolai M. Josuttis: solutions in time  The C++ Standard Library: Errata for 22nd and later printings

The C++ Standard Library - A Tutorial and Reference

Errata for the 22nd and later printings
Last update: March 11, 2010

This is the errata for the 22nd and later printings of the book The C++ Standard Library by Nicolai M. Josuttis. It extends the errata for the previous printings.
Please, note the
- hints for Visual C++ users.
- hints for GCC/G++ users.

The errata is organized in the following way:
- The first part lists technical errors
- The second part lists typos

Please note: This list may portray the book as containing many errors but keep in mind it has about 800 pages with about 240.000 words along with numerous tables and code examples. I am not perfect and it is unreasonable to expect significantly fewer bugs. To cite one reader: "Thanks again and I'm going to write a short review of the book for Amazon contradicting whoever said it had lots of errors."


Errors

Page 471, Chapter 11
Saying that the type of string literals is const char* is not quite right. Strictly speaking, the original type of a literal such as "hello" is const char[6]. However, this type automatically converts ("decays") to const char*, so that you can almost always use (and see) const char* in declarations. However, when working with templates the difference might matter because for reference template parameters decay doesn't occur (see our template book ;-).


Page 514, Section 11.3.7
I left out the version of string::assign() that takes two InputIterator types, similar to the string::append() method you have on page 516:

string& string::assign (InputIterator beg, InputIterator end)


Page 747, Index

Insert:

Note: Page numbers in bold indicate the location of the definition of the
item. Page numbers in the normal type face are other pages of interest. If
the entry appears in source code the page numbers are in the italic type
face.


Typos

Page 151: in Table 6.3: s/c.reserve()/c.reserve(num)/


Home of the C++ Library book