Sales_data
compareIsbn
, 387
+=
(compound assignment), 564
+
(addition), 560
==
(equality), 561
!=
(inequality), 561
>>
(input operator), 558
<<
(output operator), 557
add
, 261
addition program, 74
avg_price
, 259
bookstore program, 255
using algorithms, 406
combine
, 259
compareIsbn
, 425
with associative container, 426
converting constructor, 295
default constructor, 262
exception classes, 783
exception version
+=
(compound assignment), 784
+
(addition), 784
explicit
constructor, 296
isbn
, 257
operations, 254
read
, 261
relational operators, 563
Sales_data.h
header, 76
Sales_item
, 20
+
(addition), 22
>>
(input operator), 21
<<
(output operator), 21
bookstore program, 24
isbn
, 23
operations, 20
Sales_item.h
header, 19
scientific
manipulator, 757
base class, 617
static
member, 302
compared to object lifetime, 204
derived class, 617
function, 204
member function, 282
parameters and return type, 283
multiple inheritance, 807
name collisions,
using
directive, 795
nested class, 844
overloaded function, 234
statement, 174
template parameter, 668
template specialization, 708
using
directive, 794
virtual function, 620
enum class
, 832
Screen
, 271
pos
member, 272
concatenating operations, 275
do_display
, 276
friends, 279
get_cursor
, 283
Menu
function table, 840
move
, 841
move
members, 275
set
, 275
search
, 872
search_n
, 871
seed, random-number engine, 748
self-assignment
copy and swap assignment, 519
copy assignment, 512
explicit check, 542
HasPtr
reference counted, 515
valuelike, 512
Message
, 523
move assignment, 537
pitfalls, 512
StrVec
, 528
semicolon (;
), 3
class definition, 73
null statement, 172
separate compilation, 44, 80, 252
compiler options, 207
declaration vs. definition, 44
templates, 656
sequential container, 326, 373
array
, 326
deque
, 326
forward_list
, 326
list
, 326
list initialization, 336
members
assign
, 338
back
, 346
clear
, 350
emplace
, 345
emplace_back
, 345
emplace_front
, 345
erase
, 349
front
, 346
insert
, 343
pop_back
, 348
pop_front
, 348
push_back
, 132
push_front
, 342
resize
, 352
value_type
, 333
performance characteristics, 327
priority_queue
, 371
queue
, 371
stack
, 370
value initialization, 336
vector
, 326
see also ordered container
bitset
, 727
header, 420
insert
, 431
iterator
, 429
key_type
requirements, 425
list initialization, 423
lower_bound
, 438
TextQuery
class, 485
upper_bound
, 438
word_count
program, 422
set_difference
, 880
set_symmetric_difference
, 880
set_union
, 880
setfill
, manipulator, 759
setprecision
, manipulator, 756
setstate
, stream, 313
setw
, manipulator, 758
shared_ptr
, 450, 450–457, 464–469, 491
*
(dereference), 451
copy and assignment, 451
definition, 450
bound at run time, 677
derived-to-base conversion, 630
destructor, 453
dynamically allocated array, 480
exception safety, 467
factory
program, 453
initialization, 464
make_shared
, 451
pitfalls, 469
reset
, 466
StrBlob
, 455
TextQuery
class, 485
with
new
, 464
short
, 33
short-circuit evaluation, 142, 169
&&
(logical AND), 142
||
(logical OR), 142
not in overloaded operator, 553
ShorterString
, 573
()
(call operator), 573
shorterString
, 224
showbase
, manipulator, 755
showpoint
, manipulator, 758
shrink_to_fit
deque
, 357
string
, 357
vector
, 357
shuffle
, 878
char
, 34
out-of-range value, 35
signed type, 34
single-line (//
), comment, 9, 26
size
priority_queue
, 371
queue
, 371
returns
unsigned
, 88
stack
, 371
StrVec
, 526
array subscript, 116
size_type
, container, 88, 102, 132, 332
SizeComp
, 573
()
(call operator), 573
array, 157
data member, 157
sizeof...
, parameter pack, 700
skipws
, manipulator, 760
SmallInt
+
(addition), 588
conversion operator, 580
exception safety, 467
pitfalls, 469
prefix
, 736
provide context for a match, 735
suffix
, 736
specialization, see template specialization
splice
, list
, 416
splice_after
, forward_list
, 416
i before e program, 734
sstream
file marker, 765
off_type
, 766
pos_type
, 766
random access, 765
random IO program, 766
example, 740
stable_partition
, 876
emplace
, 371
empty
, 371
equality and relational operators, 370
header, 370
initialization, 369
pop
, 371
push
, 371
sequential container, 370
size
, 371
swap
, 371
top
, 371
stack unwinding, exception handling, 773, 818
standard header, #include
, 6, 21
block, see block
scope, 174
statement label, 192
static
(file static), 792, 817
Account
, 301
class template, 667
accessed through an instantiation, 667
definition, 667
const
data member, initialization, 302
data member, 300
definition, 302
default argument, 304
definition, 302
inheritance, 599
instantiation, 667
member function, 301
nested class, 845
scope, 302
static
object, local, 205, 252
multiple inheritance, 806
static type checking, 46
lvalue to rvalue, 691
std::forward
, see
forward
std::move
, see
move
stod
, 368
stof
, 368
stoi
, 368
stol
, 368
stold
, 368
stoll
, 368
stoul
, 368
stoull
, 368
str
, string streams, 323
StrBlob
, 456
back
, 457
begin
, 475
check
, 457
constructor, 456
end
, 475
front
, 457
pop_back
, 457
shared_ptr
, 455
StrBlobPtr
, 474
++
(increment), 566
--
(decrement), 566
*
(dereference), 569
->
(arrow operator), 569
check
, 474
constructor, 474
deref
, 475
incr
, 475
weak_ptr
, 474
strcat
, 123
strcmp
, 123
strcpy
, 123
clear
, 313
explicit
conversion tobool
, 583
file marker, 765
flushing buffer, 314
format state, 753
istream_iterator
, 403
type requirements, 406
not flushed if program crashes, 315
ostream_iterator
, 403
random IO, 765
rdstate
, 313
setstate
, 313
strict weak ordering, 425, 448
see also container
see also sequential container
see also iterator
+=
(compound assignment), 89
+
(addition), 89
>>
(input operator) as condition, 86
append
, 362
assign
, 362
at
, 348
C-style string, 124
c_str
, 124
capacity
, 356
case sensitive, 365
compare
, 366
concatenation, 89
default initialization, 44
difference_type
, 112
equality and relational operators, 88
erase
, 362
find
, 364
find_first_not_of
, 365
find_last_not_of
, 366
find_last_of
, 366
initialization from string literal, 84
insert
, 362
move constructor, 529
numeric conversions, 367
random-access iterator, 412
replace
, 362
reserve
, 356
rfind
, 366
subscript range, 95
substr
, 361
TextQuery
class, 485
see also C-style string
concatenation, 39
stringstream
, 321, 321–323, 324
initialization, 321
strlen
, 122
struct
see also class
default access specifier, 268
default inheritance specifier, 616
StrVec
, 525
[]
(subscript), 565
=
(assignment),initializer_list
, 563
alloc_n_copy
, 527
begin
, 526
capacity
, 526
chk_n_alloc
, 526
copy assignment, 528
copy constructor, 528
default constructor, 526
design, 525
destructor, 528
emplace_back
, 704
end
, 526
free
, 528
memory allocation strategy, 525
move assignment, 536
move constructor, 535
push_back
, 526
move-enabled, 545
reallocate
, 530
move iterator version, 543
size
, 526
subexpression, 770
subscript range, 93
array, 116
string
, 95
validating, 104
vector
, 105
substr
, string
, 361
suffix
, smatch
, 736
sum
, program, 682
swap
, 516
array
, 339
container, 339
container nonmember version, 339
copy and swap assignment operator, 518
priority_queue
, 371
queue
, 371
stack
, 371
swap
program, 223
swap_ranges
, 875
switch
statement, 178, 178–182, 200
default case
label, 181
compared to
if
, 178
execution flow, 180
variable definition, 182
syntax_option_type
, regex
, 730
synthesized
copy control, 267
as deleted function, 508
as deleted in derived class, 624
Bulk_quote
, 623
multiple inheritance, 805
virtual base class, 815
virtual base classes, 815
volatile
, 857
derived class, 623
members of built-in type, 263
move operations
deleted function, 538
not always defined, 538