absInt
, 571
()
(call operator), 571
BinaryQuery
, 643
Disc_quote
, 610
Query_base
, 636
class derivation list, 596
default inheritance access, 616
default member access, 268
derived class, 613
derived-to-base conversion, 613
design, 614
inherited members, 612
local class, 853
nested class, 844
private
, 268
public
, 268
using
declaration, 615
derived-to-base conversion, 613
Account
, 301
bookstore program, 406
Action
, 839
adaptor, 372
back_inserter
, 402
front_inserter
, 402
inserter
, 402
make_move_iterator
, 543
add
, Sales_data
, 261
add_item
, Basket
, 633
add_to_Folder
, Message
, 522
adjacent_difference
, 882
adjacent_find
, 871
advice
always initialize a pointer, 54
avoid casts, 165
avoid undefined behavior, 36
choosing a built-in type, 34
define small utility functions, 277
define variables near first use, 48
don’t create unnecessary
regex
objects, 733
forwarding parameter pattern, 706
keep lambda captures simple, 394
prefix vs. postfix operators, 148
rule of five, 541
use
move
sparingly, 544
use constructor initializer lists, 289
when to use overloading, 233
writing compound expressions, 139
initialization, 298
algorithm
header, 376
see also Appendix A
architecture
_if
versions, 414
operate on iterators not containers, 378
overloading pattern, 414
associative container and, 430
bind
as argument, 397
can’t change container size, 385
element type requirements, 377
function object arguments, 572
istream_iterator
, 404
iterator range, 376
library function object, 575
ostream_iterator
, 404
sort comparison, requires strict weak ordering, 425
function, 386
two input ranges, 413
type independence, 377
accumulate
, 379
bookstore program, 406
copy
, 382
count
, 378
equal_range
, 722
equal
, 380
fill_n
, 381
fill
, 380
find
, 376
for_each
, 391
replace_copy
, 383
replace
, 383
set_intersection
, 647
sort
, 384
stable_sort
, 387
transform
, 396
unique
, 384
alias declaration
template type, 666
type, 68
all_of
, 871
alloc_n_copy
, StrVec
, 527
allocate
, allocator
, 481
allocator
, 481, 481–483, 491, 524–531
compared to
operator new
, 823
construct
, 482
forwards to constructor, 527
compared to
operator delete
, 823
alternative operator name, 46
alternative_sum
, program, 682
ambiguous
multiple inheritance, 806
multiple inheritance, 808
overloaded operator, 588
AndQuery
, 637
class definition, 644
eval
function, 646
any
, bitset
, 726
any_of
, 871
app
(file mode), 319
append
, string
, 362
argc
, 219
buffer overflow, 215
to pointer conversion, 214
C-style string, 216
conversion, function matching, 234
default, 236
forwarding, 704
initializes parameter, 203
iterator, 216
low-level
const
, 213
main
function, 218
multidimensional array, 218
nonreference parameter, 209
uses copy constructor, 498
pointer, 214
reference to
const
, 211
top-level
const
, 212
argument list, 202
argument-dependent lookup, 797
move
andforward
, 798
argv
, 219
arithmetic
in equality and relational operators, 144
signed
tounsigned
, 34
to
bool
, 162
operators, 139
compound assignment (e.g.,
+=
), 147
function object, 574
overloaded, 560
machine-dependent, 32
arithmetic (addition and subtraction)
argument conversion, 214
auto
returns pointer, 117
begin
function, 118
compound type, 113
function arguments, 214
template argument deduction, 679
decltype
returns array type, 118
definition, 113
dimension, constant expression, 113
allocator
, 481
can’t use
begin
andend
, 477
can’t use range
for
statement, 477
delete[]
, 478
empty array, 478
new[]
, 477
shared_ptr
, 480
unique_ptr
, 479
elements and destructor, 502
end
function, 118
initialization, 114
initializer of
vector
, 125
no copy or assign, 114
of
char
initialization, 114
parameter
buffer overflow, 215
converted to pointer, 215
function template, 654
pointer to, 218
reference to, 217
return type, 204
trailing, 229
type alias, 229
decltype
, 230
sizeof
, 157
subscript range, 116
subscript type, 116
understanding complicated declarations, 115
array
see also container
see also sequential container
[]
(subscript), 347
=
(assignment), 337
assign
, 338
copy initialization, 337
default initialization, 336
definition, 336
header, 329
list initialization, 337
overview, 327
random-access iterator, 412
swap
, 339
assert
preprocessor macro, 241, 251
assign
array
, 338
invalidates iterator, 338
sequential container, 338
string
, 362
assignment, vs. initialization, 42, 288
associative array, see
map
associative container, 420, 447
and library algorithms, 430
members
begin
, 430
emplace
, 432
end
, 430
equal_range
, 439
erase
, 434
insert
, 432
override default comparison, 425
override default hash, 446
overview, 423
associativity, 134, 136–137, 168
=
(assignment), 145
?:
(conditional operator), 151
dot and dereference, 150
increment and dereference, 148
IO operator, 155
overloaded operator, 553
at
deque
, 348
map
, 435
string
, 348
unordered_map
, 435
vector
, 348
ate
(file mode), 319
of array, 117
of reference, 69
pointer to function, 249
with
new
, 459
auto_ptr
deprecated, 471
see also local variable
see also parameter
and destructor, 502
avg_price
, Sales_data
, 259