The Origins of C++
ANSI Committee Established
C++ as Opposed to Other Object-Oriented Languages
Aim Of the Book
Target Audience
Organization of the Book
Introduction
The Standard's Terminology
Addenda
Deprecated Feature
Conclusions
Introduction
Operator Overloading Rules of Thumb
Restrictions on Operator Overloading
Conversion Operators
Postfix and Prefix Operators
Using Function Call Syntax
Consistent Operator Overloading
Returning Objects by Value
Multiple Overloading
Overloading Operators for Other User-Defined types
Overloading the Subscripts Operator
Function Objects
Conclusions
Introduction
Constructors
Copy Constructor
Simulating Virtual Constructors
Assignment Operator
When Are User-Written Copy Constructors And Assignment Operators Needed?
Implementing Copy Constructor And Assignment Operator
Blocking Object Copying
Destructors
Constructors And Destructors Should Be Minimal
Conclusions
Introduction
Programming Paradigms
Techniques Of Object-Oriented Programming
Classes and Objects
Designing Class Hierarchies
Conclusions
Introduction
Traditional Error Handling Methods
Enter Exception Handling
Applying Exception Handling
Exceptions During Object's Construction and Destruction
Global Objects: Construction and Destruction
Advanced Exception Handling Techniques
Exception Handling Performance Overhead
Misuses of Exception Handling
Conclusions
Introduction
Structure Of This Chapter
Making Do Without RTTI
RTTI constituents
The Cost of Runtime Type Information
Conclusions
The Rationale Behind Namespaces
A Brief Historical Background
Properties of Namespaces
Namespace Utilization Policy in Large-Scale Projects
Namespaces and Version Control
The Interaction of Namespaces with Other Language Features
Restrictions on Namespaces
Conclusions
Introduction
Class Templates
Function Templates
Performance Considerations
Interaction with Other Language Features
Conclusions
Introduction
Generic Programming
Organization of STL Header Files
Containers
Iterators
Algorithms
Function Objects
Adaptors
Allocators
Specialized Containers
Associative Containers
Class auto_ptr
Nearly Containers
Class string
Conclusions
Introduction
Types of Storage
POD (Plain Old Data) and non-POD Objects
The Lifetime of a POD Object
The Lifetime of a non-POD Object
Allocation and Deallocation Functions
malloc() and free() Versus new and delete
new and delete
Exceptions During Object Construction
Alignment Considerations
The Size Of A Complete Object Can Never Be Zero
User-Defined Versions of new and delete Cannot Be Declared in a Namespace
Overloading new and delete in a Class
Guidelines for Effective Memory Usage
Explicit Initializations of POD Object
Data Pointers Versus Function Pointers
Pointer Equality
Storage Reallocation
Local Static Variables
Global Anonymous Unions
The const and volatile Properties of an Object
Conclusions
Introduction
Before Optimizing Your Software
Declaration Placement
Inline Functions
Optimizing Memory Usage
Speed Optimizations
A Last Resort
Conclusions
Introduction
Differences Between ISO C and the C Subset of ANSI/ISO C++
Quiet Differences Between C and C++
Migrating From C to C++
Designing Legacy Code Wrapper Classes
Multilingual Environments
C and C++ Linkage Conventions
Minimize the Interface Between C and C++ Code
Mixing <iostream> Classes with <stdio.h> Functions
Accessing a C++ Object in C Code
Conclusions
Some of the Features that Almost Made It into the Standard
The Evolution of C++ Compared to Other Languages
Possible Future Additions to C++
Conclusions
© Copyright 1999, Macmillan Computer Publishing. All rights reserved.