This is errata for the 9th printing. All but the last few corrections at the end of the list are fixed for the current printing.
You find the printing number as the first number on the last line of the copyright page.
I only list things that can affect understanding. Spelling mistakes you can fix yourself if you spot them.
I very much appreciate reports of errors and constructive comments on the contents in general.
For brevity, I use the old replacement syntax: s/old/new/
- Bjarne
pg54: s/char* q = p;/const char* q = p;/
pg55: s/sec7.10/sec7.11/
pg80: s/look(const char*)/look(const char*, int =0)/
pg113: s/#define "myheade.h"/#include "myheade.h"/
pp154-155: look() and insert() takes const char* arguments.
pg156: s/delete n->string;/delete[] n->string;/
s/delete tbl;/delete[] tbl;/
s/char* pp = p;/const char* pp = p;/
pg158: s/ok(int&/ok(const int&/
pg194: s/#include
s/#include
pg227: fourth line from bottom: s/increment/decrement/
pg230: += and *= should return complex&
pg254: s/sec5.3/sec7.14.3/
pg265: top line: add template
pg279: The 2nd sentence of sec8.6 should read: ``In addition to type arguments,
variable names, function names, and constant expressions can be used.
pg286: the definition of Map should read:
pg289: add template
pg305: s/MININT -/MININT +/
pg316: delete comment on get()
pg354: s/char alloc;/short alloc;/
pg409: s/X::a/C::a/
pg418: s/i
pg445: s/Base_iterator/base_iterator/
pg447: add to the declaration of base_iterator:
s/static_type()/get_info()/
pg467: s/(*pf)()/(*pf)(void*)/
pg472: s/r.count/r.pcount/
pg474: s/(chunk_size-esize)/chunk_size/
pg219: s/left =/left = (s->left) ? s->left->clone() : 0;
pg219: s/right =/right = (s->right) ? s->right->clone() : 0;
pg241: s/for (pp=/if (free) for(pp=/
template
pg287: s/8.10 [2]/8.9 [4]/
base_iterator(const base_iterator&);
base_iterator& operator=(const base_iterator&);
replace base_iterator::base_iterator() definition with:
base_iterator::base_iterator(const Type_info* bb, int direct)
{
i = 0;
if (direct) { // use list of direct bases
b = bb;
alloc = 0;
return;
}
// create list of all bases:
// int n = number of bases
b = new (Type_info*)[n+1];
alloc = 1;
// put bases into b
}
pg448: replace definition of ptr_cast() and ref_cast() with:
#define ptr_cast(T,p) \
(T::info().get_type_info()->can_cast((p)) ? (T*)(p) : 0)
#define ref_cast(T,r) \
(T::info().get_type_info()->can_cast((r)) ? 0 : \
throw Bad_cast(T::info().get_type_info()->name()), (T&)(r))
pg449: s/dynamic_type()/info()/
New errata, not reflected in printings: