Preface

This book provides a complete language reference for the expert C++ user.
It consists of the C++ reference manual plus annotations and commentary
sections.

The C++ reference manual alone provides a complete definition of C++,
but the terse reference manual style leaves many reasonable questions
unanswered.
Discussions of what is
not
in the language,
why
certain features are defined as they are, and
how
one might implement some particular feature have no place in a reference manual
but are nevertheless of interest to most users.
Such discussions are presented as annotations and in the commentary sections.

The commentary also helps the reader appreciate the relationships
among different parts of the language and emphasizes points and implications
that might have been overlooked in the reference manual itself.
Examples and comparisons with C also make this book more approachable
than the bare reference manual.

This book does not provide information about standard libraries beyond discussion
of the library functions providing the most basic run-time support
nor does it discuss C++ programming styles or techniques.
Furthermore, this book does not attempt to teach C++ programming; it explains
what the language is - not how to use it.

The index and the cross references embedded in the commentary and in the
reference manual itself are important and integral parts of the book.

We hope that this reference manual will provide a firm base for the further
evolution of C++.
It has been chosen by ANSI to serve as a starting point for the formal
standardization of C++.

Murray Hill, New Jersey, Margaret A. Ellis and Bjarne Stroustrup

Organization

The C++ reference manual consists of 16 major sections and two appendices
each of which is used as the nucleus of a chapter of this book.
The C++ reference manual proper is presented in
10 point Times Roman font.

Embedded annotations are presented in
9 point Times Roman font
indented and bracketed, as this sentence is.

Examples in the manual proper are presented using a constant width font:

int a; // manual example

An italicized constant width font is used for examples in the commentary:

int b; // commentary example

Major discussions are placed after the manual sections.
Thus, each chapter consists of an abstract followed by an annotated manual section
optionally followed by a commentary section.
The heading

__________________________________________________
COMMENTARY

separates the manual and the commentary parts of a chapter.

Commentary subsections contain the suffix `c'
to distinguish them from reference manual sections.
Except for the chapter prefix, the numbering of commentary sections is unrelated
to the section numbering of the manual proper.

Acknowledgements

C++ could never have matured without the constant use, suggestions,
and constructive criticism of many friends and colleagues.
In particular, we would like to thank
Andrew Koenig and Doug McIlroy.

Brian Kernighan provided constant support and encouragement to us while we wrote
this book; he read and commented on more drafts than anyone else.

Ravi Sethi showed us how to write the cross referencing software and Brian
Kernighan helped us through the mysteries of
troff,
pic,
tbl,
eqn,
pj,
and his indexing software.
Doris Ellis provided valuable editorial input.

Special thanks to Dennis Ritchie for C and for the original C manual that became
the starting point for the C++ manual.

Further acknowledgements of people who specifically helped with the review of
this manual can be found in section 1.2c.