Tải bản đầy đủ - 0 (trang)
B. Item Mappings Between Second and Third Editions

B. Item Mappings Between Second and Third Editions

Tải bản đầy đủ - 0trang


Operators are listed under operator. That is, operator<< is listed under

operator<<, not under <<, etc.

Example classes, structs, and class or struct templates are indexed under

example classes/templates. Example function and function templates are

indexed under example functions/templates.

Before A

.NET 7A, 81A, 135A, 145A, 194A

see also C#

=, in initialization vs. assignment 6A

1066 150A

2nd edition of this book

compared to 3rd edition, 277–279A

3rd edition of this book

compared to 2nd edition, 277–279A

80-20 rule, 139A, 168A


abstract classes, 43A


control over data members’, 95A

name, multiple inheritance and, 193A

accessing names, in templatized bases, 207–212A


inline functions, 136A

objects, 118A

aggregation, see composition

aliasing, 54A

alignment, 249–250A

allocators, in the STL, 240A

alternatives to virtual functions, 169–177A


multiple inheritance and, 192A

nested dependent names and types, 205A

argument-dependent lookup, 110A

arithmetic, mixed-mode, 103A, 222–226A

array layout, vs. object layout, 73A

array new 254–255AA

array, invalid index and, 7A



see also operator=

chaining assignments, 52A

copy-and-swap and, 56A

generalized, 220A

to self, operator= and, 53–57A

vs. initialization, 6A, 27–29A, 114A

assignment operator, copy, 5A

auto_ptr, see std::auto_ptr

automatically generated functions, 34–37A

copy constructor and copy assignment operator, 221A

disallowing, 37–39A

avoiding code duplication, 50A, 60A


Barry, Dave, allusion to, 229A

base classes

copying, 59A

duplication of data in, 193A

lookup in, this-> and, 210A

names hidden in derived classes, 263A

polymorphic, 44A

polymorphic, destructors and, 40–44A

templatized, 207–212A

virtual, 193A

basic guarantee, the, 128A

Battle of Hastings, 150A

bidirectional iterators, 227A

bidirectional_iterator_tag, 228A

binary upgradeability, inlining and, 138A


dynamic, see dynamic binding

static, see static binding

birds and penguins, 151–153A

bitwise const member functions, 21–22A


Effective STL , 273A, 275–276A

More Effective C++ , 273A, 273–274A

Some Must Watch While Some Must Sleep, 150A

Boost, 10A, 269–272A

containers, 271A

Conversion library, 270A

correctness and testing support, 272A

data structures, 272A

function objects and higher-order programming utilities, 271A

functionality not provided, 272A

generic programming support, 271A

Graph library, 270A

inter-language support, 272A

Lambda library, 271A

math and numerics utilities, 271A

memory management utilities, 272A

MPL library, 270A, 271A

noncopyable base class, 39A

Pool library, 250A, 251A

scoped_array, 65A, 216A, 272A

shared_array, 65A

implementation, costs, 83A

smart pointers, 65A, 272A

string and text utilities, 271A

template metaprogramming support, 271A

TR1 and, 9–10A, 268A, 269A

typelist support, 271A

web site, 10A, 269A, 272

boost, as synonym for std::tr1, 268A

breakpoints, and inlining, 139A

built-in types, 26–27A

efficiency and passing, 89A

incompatibilities with, 80A



C standard library and C++ standard library, 264A

C#, 43A, 76A, 97A, 100A, 116A, 118A, 190A

see also .NET

C++ standard library, 263–269A

and, 144A

array replacements and, 75A

C standard library and, 264A

C89 standard library and, 264A

header organization of, 101A

list template, 186A

logic_error and, 113A

set template, 185A

vector template, 75A

C++, as language federation, 11–13A

C++0x, 264A

C++-style casts, 117A

C, as sublanguage of C++, 12A

C99 standard library, TR1 and, 267A


and, 22A

mutable and, 22A

calling swap, 110A

calls to base classes, casting and, 119A

casting, 116–123A

see also const_cast, static_cast, dynamic_cast, and reinterpret_cast

base class calls and, 119A

constness away, 24–25A

encapsulation and, 123A

grep and, 117A

syntactic forms, 116–117A

type systems and, 116A

undefined behavior and, 119A

chaining assignments, 52A

class definitions

artificial client dependencies, eliminating, 143A

class declarations vs., 143A

object sizes and, 141A

class design, see type design

class names, explicitly specifying, 162A

class, vs. typename, 203A


see also class definitions, interfaces

abstract, 43A, 162A


see also base classes

duplication of data in, 193A

polymorphic, 44A

templatized, 207–212A

virtual, 193A

defining, 4A


see also inheritance


virtual base initialization of, 194A

Handle, 144–145A

Interface, 145–147A

meaning of no virtual functions, 41A


specification, see interfaces

traits, 226–232A

client, 7A

clustering objects, 251A


bloat, 24A, 135A, 230A

avoiding, in templates, 212–217A

copy assignment operator, 60A

duplication, see duplication

exception-safe, 127–134A

factoring out of templates, 212–217A

incorrect, efficiency and, 90A

reuse, 195A

sharing, see duplication, avoiding

common features and inheritance, 164A

commonality and variability analysis, 212A

compatibility, vptrs and, 42A

compatible types, accepting, 218–222A

compilation dependencies, 140–148A

minimizing, 140–148A, 190A

pointers, references, and objects and, 143A

compiler warnings, 262–263A

calls to virtuals and, 50A

inlining and, 136A

partial copies and, 58A

compiler-generated functions, 34–37A

disallowing, 37–39A

functions compilers may generate, 221A


parsing nested dependent names, 204A

programs executing within, see template metaprogramming

register usage and, 89A

reordering operations, 76A

typename and, 207A

when errors are diagnosed, 212A

compile-time polymorphism, 201A

composition, 184–186A

meanings of, 184A

replacing private inheritance with, 189A

synonyms for, 184A

vs. private inheritance, 188A

conceptual constness, see const, logical

consistency with the built-in types, 19A, 86A

const, 13A, 17–26A

bitwise, 21–22A

caching and, 22A

casting away, 24–25A

function declarations and, 18A

logical, 22–23A

member functions, 19–25A

duplication and, 23–25A

members, initialization of, 29A

overloading on, 19–20A

pass by reference and, 86–90A

passing std::auto_ptr and, 220A

pointers, 17A

return value, 18A

uses, 17A

vs. #define 13–14A

const_cast, 25A, 117A

see also casting

, vs. iterators, 18A

constants, see const

constraints on interfaces, from inheritance, 85A

constructors, 84A

copy, 5A

default, 4A

empty, illusion of, 137A

explicit, 5A, 85A, 104A

implicitly generated, 34A

inlining and, 137–138A

operator new and, 137A

possible implementation in derived classes, 138A

relationship to new, 73A

static functions and, 52A

virtual, 146A, 147A

virtual functions and, 48–52A

with vs. without arguments, 114A

containers, in Boost, 271A

containment, see composition

continue, delete and, 62A

control over data members’ accessibility, 95A

convenience functions, 100A

Conversion library, in Boost, 270A

conversions, type, see type conversions

copies, partial, 58A

copy assignment operator, 5A

code in copy constructor and, 60A

derived classes and, 60A

copy constructors

default definition, 35A

derived classes and, 60A

generalized, 219A

how used, 5A


implicitly generated, 34A

pass-by-value and, 6A

copy-and-swap, 131A

assignment and, 56A

exception-safe code and, 132A


base class parts, 59A

behavior, resource management and, 66–69A

functions, the, 57A

objects, 57–60A


designing interfaces for, 78–83A

testing and, Boost support, 272A

corresponding forms of new and delete, 73–75A

corrupt data structures, exception-safe code and, 127A

cows, coming home, 139A

crimes against English, 39A, 204A

cross-DLL problem, 82A

CRTP, 246A

C-style casts, 116A

ctor, 8A

curiously recurring template pattern, 246A


dangling handles, 126A

data members

adding, copying functions and, 58A

control over accessibility, 95A

protected, 97A

static, initialization of, 242A

why private, 94–98A

data structures

exception-safe code and, 127A

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

B. Item Mappings Between Second and Third Editions

Tải bản đầy đủ ngay(0 tr)