C++ Common Knowledge: Essential Intermediate Programming
內容描述
Table of
Contents:
Preface xiAcknowledgments xviiA Note
on Typographical Conventions xix
Item 1: Data Abstraction 1Item 2:
Polymorphism 3Item 3: Design Patterns 7Item 4: The Standard Template
Library 11Item 5: References Are Aliases, Not Pointers 13Item 6: Array
Formal Arguments 17Item 7: Const Pointers and Pointers to Const 21Item
8: Pointers to Pointers 25Item 9: New Cast Operators 29Item 10:
Meaning of a Const Member Function 33Item 11: The Compiler Puts Stuff in
Classes 37Item 12: Assignment and Initialization Are Different 41Item
13: Copy Operations 45Item 14: Function Pointers 49Item 15: Pointers
to Class Members Are Not Pointers 53Item 16: Pointers to Member Functions
Are Not Pointers 57Item 17: Dealing with Function and Array Declarators
61Item 18: Function Objects 63Item 19: Commands and Hollywood
67Item 20: STL Function Objects 71Item 21: Overloading and Overriding
Are Different 75Item 22: Template Method 77Item 23: Namespaces
81Item 24: Member Function Lookup 87Item 25: Argument Dependent Lookup
89Item 26: Operator Function Lookup 91Item 27: Capability Queries
93Item 28: Meaning of Pointer Comparison 97Item 29: Virtual
Constructors and Prototype 99Item 30: Factory Method 103Item 31:
Covariant Return Types 107Item 32: Preventing Copying 111Item 33:
Manufacturing Abstract Bases 113Item 34: Restricting Heap Allocation
117Item 35: Placement New 119Item 36: Class-Specific Memory Management
123Item 37: Array Allocation 127Item 38: Exception Safety Axioms
131Item 39: Exception Safe Functions 135Item 40: RAII 139Item 41:
New, Constructors, and Exceptions 143Item 42: Smart Pointers 145Item
43: auto_ptr Is Unusual 147Item 44: Pointer Arithmetic 149Item 45:
Template Terminology 153Item 46: Class Template Explicit Specialization
155Item 47: Template Partial Specialization 161Item 48: Class Template
Member Specialization 165Item 49: Disambiguating with Typename 169Item
50: Member Templates 173Item 51: Disambiguating with Template 179Item
52: Specializing for Type Information 183Item 53: Embedded Type
Information 189Item 54: Traits 193Item 55: Template Template
Parameters 199Item 56: Policies 205Item 57: Template Argument
Deduction 209Item 58: Overloading Function Templates 213Item 59:
SFINAE 217Item 60: Generic Algorithms 221Item 61: You Instantiate What
You Use 225Item 62: Include Guards 229Item 63: Optional Keywords
231
Bibliography 235Index 237Index of Code
Examples 245