ptg10564057
Section 1.1.2 Basic Facilities 5
Chapter 7 Pointers, Arrays, and References
Chapter 8 Structures, Unions, and Enumerations
Chapter 9 Statements: Declarations as statements, selection statements (if and switch), itera-
tion statements (for, while, and do), goto, and comments
Chapter 10 Expressions: A desk calculator example, survey of operators, constant expres-
sions, and implicit type conversion.
Chapter 11 Select Operations: Logical operators, the conditional expression, increment and
decrement, free store (new and delete), {}-lists, lambda expressions, and explicit
type conversion (static_cast and const_cast)
Chapter 12 Functions: Function declarations and definitions, inline functions, constexpr
functions, argument passing, overloaded functions, pre- and postconditions,
pointers to functions, and macros
Chapter 13 Exception Handling: Styles of error handling, exception guarantees, resource
management, enforcing invariants, throw and catch,avector implementation
Chapter 14 Namespaces: namespace, modularization and interface, composition using name-
spaces
Chapter 15 Source Files and Programs: Separate compilation, linkage, using header files,
and program start and termination
I assume that you are familiar with most of the programming concepts used in Part I. For example,
I explain the C++ facilities for expressing recursion and iteration, but I do not go into technical
details or spend much time explaining how these concepts are useful.
The exception to this rule is exceptions. Many programmers lack experience with exceptions or
got their experience from languages (such as Java) where resource management and exception han-
dling are not integrated. Consequently, the chapter on exception handling (Chapter 13) presents the
basic philosophy of C++ exception handling and resource management. It goes into some detail
about strategy with a focus on the ‘‘Resource Acquisition Is Initialization’’ technique (RAII).
1.1.3 Abstraction Mechanisms
Part III describes the C++ facilities supporting various forms of abstraction, including object-ori-
ented and generic programming. The chapters fall into three rough categories: classes, class hierar-
chies, and templates.
The first four chapters concentrate of the classes themselves:
Chapter 16 Classes: The notion of a user-defined type, a class, is the foundation of all C++
abstraction mechanisms.
Chapter 17 Construction, Cleanup, Copy, and Move shows how a programmer can define the
meaning of creation and initialization of objects of a class. Further, the meaning
of copy, move, and destruction can be specified.
Chapter 18 Operator Overloading presents the rules for giving meaning to operators for
user-defined types with an emphasis on conventional arithmetic and logical oper-
ators, such as +, ∗, and &.
Chapter 19 Special Operators discusses the use of user-defined operator for non-arithmetic
purposes, such as [] for subscripting, () for function objects, and > for ‘‘smart
pointers.’’