Send additional errata to rules@henricson.se.
Thanks to Kevlin Henney, Scott Meyers, Lars Petrus, Anders Sanne, Al
Chou and Anders Wångby for helping us finding the glitches.
The word "will" should be "may".
Insert this additional text before the text starting with "This means that we have a potential..."
A big problem is that even though there is a standard for how templates should be compiled, there are still many compilers that do not follow the standard. Some compilers require the complete template definition to be visible, even though that is not required by the standard.
The declaration of p should be changed from:
char *p;to:
char p[100]; // must specify size
Change the first two lines of this example from:
const unsigned large = 456789;to:
const int size = static_cast<int>(large);
unsigned large = 456789;
int size = static_cast<int>(large);
Change the first paragraph from
This requires that the copy construtor returns a non-cont reference to an object of the class.to:
This requires that the copy assignment operator returns a non-const reference to an object of the class.
Change the title of this example from:
const-declared parametersmto:
const-declared parameter
The text incorrectly says max() is a member function - it is not. Remove
the word "member" from the text.
This example should be removed since old style access declaration only
worked with non-public base classes.
Replace the declaration of instanceM from:
static EmcSingleton* instanceM;to:
static auto_ptr<EmcSingleton> instanceM;
The first comment on this page claims that operator
new() throws bad_alloc. It should
be operator new[].
Typo:
uncaught_ exceptionshould be
uncaught_exception
Typo:
void flush(); throw(CouldNotOpenFile);should be:
void flush() throw(CouldNotOpenFile);
The call to exit() may not always be
appropriate for terminating the program, since it will completely bypass
cleanup through the call of destructors for objects on the stack. Sometimes
rethrowing the exception is a better choice, unless it was an utterly fatal
exception, in which case it would be best to terminate as fast as possible
by using either abort() or terminate()
to bypass the call of all destructors.
Unintentional line break on second paragraph.
We no longer recommend you to follow rule 14.2. Most compilers of today
have no problem with virtual destructors.
Add an extra "to" so that it reads:
Do not depend on extensions to the language or to the standard library.
The current list now contains 63 keywords, since "export" was recently
added.
Remove the sentence:
Let's look at the list class in the standard library.
The second "Chapter 3" should be "Chapter 4", and "Chapter 4" should
be "Chapter 5".
In Rec. 5.7, "this" should be in the monospaced font.
In Rule 5.9, "reference" should be "references".
"Red. 7.4" should be "Rec. 7.4".
There should be a period at the end of the statement of Rule 7.11.
In Rules 7.16 and 7.17, each occurrence of the "o-tilde" character should
be an apostrophe instead.
In Rec. 10.3, each occurrence of the "o-tilde" character should be an apostrophe instead.
In Rec. 10.6, "precondition" should be "preconditions".
Rec. 10.8 should read "derived class wherever a".
In Rule 12.8, the "o-tilde" character should be an apostrophe instead.
In Rec. 12.15, "your" should be "you".
In Rule 13.5, the "s" in "enums" should be in the body text font.
Rule 14.2 is incorrecly quoted from page 160. It should read:
When a public base class has a virtual destructor, each derived class should declare and implement a destructor.
In Rule 15.2, add an extra "to" so that it reads:
Do not depend on extensions to the language or to the standard library.
In Rec. 15.3, "an" should be "and".