|
(See also the Exceptional C++ Errata List.) This updated index applies to all printings of Exceptional C++, and is the index included in the book from the fourth printing onward (English edition). A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Abrahams, Dave, 25, 38, 59 abstract class, abstraction, 97-98
example use, 134 Adler, Darin, 136 aggregation,
Alexandrescu, Andrei, xiii algorithms,
standard library, alignment, 113, 117-118 allocation,
ambiguity, Annotated C++ Reference Manual (ARM),
arrays, misuse of, 148 polymorphism and, 147 prefer
example use, 30, 192-194
assignment avoiding by constructing in place, 53 copy assignment, 9-17 not a template, 11-13 copy construction interaction, 165-172 iterator ranges and, 14-15 self-assignment, exception safety and, 32, 37, 47, 160, 169-171 need to check for, 32, 37, 159-161, 169-171
templated, 11-17 to self, Austern, Matt, 25, 59
algorithms and, 156-157
containers and, 156-157 example use, 66 members, 153-154, 157-158 ownership, 154-155, 157 passing, 154-157 Pimpl idiom and, 153-154 returning can improve exception safety, 66-67 usefulness of, 151-153 wrapping pointer data members, 153-154, 157-158
base class,
example use, 9
Bridge pattern, C, C With Classes, 181-182 C++ Report, 25 caching precomputed values, 18
relationship with Cargill, Tom, 25-26, 30, 32 case-insensitive comparison casts, C vs. C++ casts, 183
cat, abuse of, 38
Chang, Juana,
Cheers, Mark, v
example use, 1-2 Clamage, Steve, xiii class(es), abstract, 90 base, 77 design considerations and guidelines, 69-98 empty base, interface of, member vs. nonmember functions, 125 namespaces and, 136-140 one class, one responsibility, Pimpl idiom and, private members, hiding, virtual base, code paths, code reuse, cohesion, 67, 85, 94 Colvin, Greg, 25, 59, 150 communications protocol example, 80-82 comp.lang.c++.moderated newsgroup, ix-xii, 25 comparison, case-insensitive compilation dependencies, 87 compilation firewalls,
example use, 76
composition, conditions, short-circuit evaluation and,
cast, correctness, 175-181 iterator, member functions, 177-181 return value, 72-73 const correctness,
undefined behavior and, 179 to work around absence of to work around const-incorrect third-party interfaces, 181-182
used, 46, 48, 51 constructor, conversion by, 19, 70 copy constructor, 9-17, 53-54 copy assignment interaction, 165-172 elision by compiler, 190-191 not a template, 11-13 default, 15, 27-28, 53-54 exceptions and, 28, 58, 62
failure of, 28 initialization list, 196 iterator ranges and, 14-15 templated, 11-17 containers,
destructible, 38, 59 homogeneous, 13 containment, generic, 94-95 inheritance vs., 82, 89-96, 107-108 control flow, 60-68 exceptions and, short-circuit evaluation and, 61-62 conversions, implicit, 19, 70, 162-163, 189 exceptions and, 62 explicit, 19, 70 Coplien, Jim, 109
example use, 1-2, 11-12, 30, 193 exception safety and, 15-17, 197 copy assignment, copy construction, coupling, 88, 92 declaration, definition vs., 85 forward, 85, 100-102 decoupling, default constructor
default parameters, 70, 78 example use, 75
definition vs. declaration, delegation,
array example use, 31 placement, 148-149 relationship with should never throw, 29, 57-58 virtual destructor and, dependencies,
arrays vs., 147-148 exception guarantees and, 59-60 design patterns, 84-85 Bridge pattern, 84 Pimpl idiom vs., 84 Singleton, alluded to, 115 Strategy, 87 Template Method pattern, 84 public virtual functions vs., 84
used, 49, 52 destroy-and-reconstruct idiom, 163-172 exception safety and, 168 destructor, 29
should never throw, 28-29, 55-58 virtual, Dewhurst, Steve, xiii dynamic type,
inheritance and, 185-186 dynamically allocated memory, Effective C++, Einstein, Albert, 107
empty base class optimization, 91 encapsulation, 97-98
evaluation order of function arguments, 197 exception handling, 97-98 exception neutral, 26, exception safety, 25-68 affects class design, 17, 26, 35 assignment and, 15-17, 31 casting and, 186 destroy-and-reconstruct idiom and, 164, 168 dynamically allocated resources can improve, 66-67 encapsulation and, 40 guarantees, 26, 38 basic guarantee, 38, 59 nothrow guarantee, 16, 38, 59 destructors and, 29, 55-58
strong guarantee, 16, 38, 59 iterator invalidation and, 38 multiple side effects and, 64-68 not always necessary, 67 performance overhead and, 67 history of, 25 object lifetime and, 163-165 overhead and, 60 placement return by value and, 34-37, 66-68 side effects and, 34-37, 64-68 standard library and, 26, 59-60
exception specifications, 54 Exceptional C++, exceptions, control flow and, 61-63 multiple, 56 execution flow,
extractor, using, 2
Fast Pimpl idiom, 111-118
firewall, compilation,
flow of execution, Ford Escort, 151 forward declaration, forwarding function, 190-192
relationship with free store, 142 French, gratuitous use of, 90, 102
Fulcher, Margot, Superwoman and, v function arguments, evaluation order of, 197-199 function overloading, 120 functors, alluded to, 23 garbage collection, alluded to, 98 Generic Liskov Substitution Principle, 8 generic containment/delegation, 94-95 generic programming, 1-17, 88, 97-98
Gibbons, Bill, 150 global data, 142 GLSP, GotW,
Guru of the Week (GotW), ix-xii, 25, 150, 158, 201-202 handle/body idiom, HAS-A, 107 header files, heap, 142 Henney, Kevlin, 10 hiding names, Horstmann, Cay, xiii Hyslop, Jim, xiii, 161 implicit conversions
increment operator infinite loop, inheritance, 97-98 deep hierarchies of, 81
empty base class optimization, 91 from IS-A, IS-ALMOST-A, 95-96 Liskov Substitution Principle (LSP), not for reuse, 81-82 overuse of, 88-96, 107-108 polymorphism and, 7-8 private, 44, 52-53 protected, 92 public, 80-82, 95-96 static members and, 8 virtual, 91 WORKS-LIKE-A, initialization, copy initialization, 173-174 default initialization, 173-174 direct initialization, 173-174 of base classes, 196 of global data, 192-199 list, resource acquisition is,
Interface Principle, 122-133 dependencies and, 131-133
IS-A, IS-IMPLEMENTABLE-IN-TERMS-OF, 94-95 IS-IMPLEMENTED-IN-TERMS-OF, 81-82, 89-96 private inheritance vs. containment, 44, 52-53, 89-96
iterator(s), 1-3 algorithms and, 2 assignment and, 14-15 common mistakes, 1-3
example use, 22 construction and, 14-15 dereferencing exceptions and, 59 lifetime, modifying, why ranges, 2-3 validity, 2-3 exception safety and, 38 Jagger, Jon, 10 Jones, Morgan, rituals of EMACS worship and, v Karabegovic, Justin, v Kehoe, Brendan, xiii Koenig, Andrew, 120, 162 Koenig name lookup, 119-121, 125-130 Lafferty, Debbie, xiii Lajoie, Josée, xi Lang, Marina, xiii layering,
lifetime, of iterators, of objects, of references, 21 Lippman, Stan, xi Liskov, Barbara, 8 Liskov Substitution Principle, 8, 81-82, 95-96, 107-108 IS-ALMOST-A vs., 95-96 protected inheritance and, 92
example use, 17-18, 22, 99, 103 Loi, Duk, v Long, Ian, v loop, infinite, LSP, Lukov, Violetta, v Machiavelli, Niccolo, alluded to, 159-161 macros, evils of, 74, 188
does not return
standard signatures, 77
relationship with managing dependencies, Mancl, Dennis, xiii
pointers and, 161
member functions, const, 177-181 nonmember vs., 125 templated, memory and resource management, 27, 144-150 avoiding leaks, 27 dynamically allocated resources can improve exception safety, 66-67 encapsulating for better exception safety, 40-52 fixed-size allocators, 114 Meyers, Scott, ix, xi, xiii, 25, 29, 147, 171 modules, alluded to, 97-98 Moo, Barbara, 162 multiparadigm language, 97-98 Murphy, Edward A., Jr. alluded to, 159-160
workaround using Myers Example, 128-130 Myers, Nathan, 8, 91, 128 MyList, 89-96 MySet, MySet1, MySet2, 89-96 MySet3, 94-95 name hiding, 77, 133-140 base classes and, 134-135 explicit scope resolution and, 135 name lookup, 119-140 namespaces, 119-140 class design and, 136-140 indirect interactions between, 121, 130
array default constructor and, 41 example use, 27-28, 30 placement, 42 destroy-and-reconstruct idiom, 163-172 exception from, 148-150 relationship with new-style casts,
Nguyen, Kim, tunnels and, v not this book, object(s), destructible, 38 identity, 159-161 lifetime, 163-172 exception safety and, 163-164, 168 slicing, 164, 167-170 temporary object-oriented programming, 97-98 C and, 124-125 not just about inheritance, without classes, 124-125 Occam, William of, 87 Occam's Razor, 87 one class, one responsibility, opaque pointer,
example use, 41 virtual destructor and, 147
example use, 41 operators,
example use, 133-134, 175
example use, 100 exceptions and, 62, 64 virtual
example use, 1-2 assignment, chaining, 72-73 conversion,
member vs. nonmember, 72-73
implementing related, 71-72 preincrement, postincrement,
example use, 100, 130 Overload magazine, 10 overload resolution, 187-190 overriding vs. overloading, 77-79 Palmer, Larry, Against All Odds and, v pass by reference, 190-191 pass by value, const and, 176 patterns, PeerDirect, v, xi-xiii, 103, 110, 201 Pimpl idiom, 84-85, 99-118
back pointers and, 111 Bridge pattern vs., 84 overhead, 111-118 performance, 111-118 virtual functions and, 110 pivot, during sorting, 157 placement placement pointer, opaque, Polygon, 175-181 polymorphism, 97-98 arrays and, 147 exception specifications and, 54 virtual destructor and, 8, 77 virtual functions and, 8, 82 Pop Goes the Weasel, reference to, 34 postincrement operator
precomputing values, 18, 23 pregnant, a little bit, 96 preincrement operator private inheritance, programming, generic
members, 53, 82 public inheritance,
relationship with recomputing values,
references, validity, 21
example use, 112, 117-118 reserved names, 74 resource acquisition is initialization, 46, 168 resource management,
by reference, 20-21 by value, 20-21, 34-37 exception safety and, 66-68
reuse, analyzing reusability, 53-54 benefits of, 22-23 inheritance not for, 81-82, 96 standard library and, 22-23, 70 Rumsby, Steve, 150 scope resolution, 135 self-assignment, Shakespeare, William, gratuitous quotes from, 163
Shelley, Doug, boom in global coffee industry and, v short-circuit evaluation, sink functions, 154-157 slicing, smart pointers,
alluded to, 23 source functions, 154-157
copy constructor, 30-31, 46, 51 copy assignment operator, 30-32, 47-48, 51
default constructor, 27-28, 45-46, 51 destructor, 29 eliminated, 46
division of responsibilities with Top, 36-37
requirements on contained type, 39, 53-54
stack, 142
used, 45-54 standard library, exception safety and, reusing code from, 22-23
data, 142 operators return by reference and, 21 static type,
example use, 41, 192, 195 Strategy pattern, streams, exception safety and, 64-65, 68
string(s), case-insensitive comparison, 4-9 comparison, 4-9 done in object or function, 6-7
Stroustrup, Bjarne, xi, xiii, 162, 181-182 Sumner, Jeff, 103 dazzling code magery and, v
elegant copy assignment and, 47-48 template(s), 97-98 assignment operator, 11-13 constructor, 11-13 member functions, 9-17 requirements on template parameter types, 39 Template Method pattern, temporary objects, 17-23, 71 elision by compiler, 190-191 exceptions and, 62-63 modifying, 2-3 of builtin type, 2-3 pass by value and, 18, 71 recomputation and, 18 return-by-value and, 20-21
this book,
example use, 5-6 traits, 4-9
type, dynamic, 79 static, 79
example use, 192-194 underscores, USES-A, using declarations and directives, example use, 75, 89 forwarding function vs., 92
to avoid name hiding, 135
arrays vs., 147-148 example use, 1-2, 175 exception guarantees and, 59-60 iterator, can be invalidation by is random-access, 3 virtual base class, virtual destructor, 7-8, 77, 82 example use, 80, 83
slicing and, 167 virtual functions, 7-8, 53, 75-79, 90 avoid public, 84 default parameters and, 78 exception specifications and, 54 Pimpl idiom and, 110 virtual inheritance,
casts and, 184
alluded to, 187 West, Declan, v Wilson, Eric, "in the beginning" and, v Wizard of Oz, The, reference to, 194 WORKS-LIKE-A, |
Copyright © 2009 Herb Sutter |