S
Sales_data
compareIsbn
, 387+=
(compound assignment), 564+
(addition), 560==
(equality), 561!=
(inequality), 561>>
(input operator), 558<<
(output operator), 557add
, 261addition program, 74
avg_price
, 259bookstore program, 255
using algorithms, 406
combine
, 259compareIsbn
, 425with associative container, 426
converting constructor, 295
default constructor, 262
exception classes, 783
exception version
+=
(compound assignment), 784+
(addition), 784explicit
constructor, 296isbn
, 257operations, 254
print
, 261read
, 261relational operators, 563
Sales_data.h
header, 76
Sales_item
, 20
+
(addition), 22>>
(input operator), 21<<
(output operator), 21bookstore program, 24
isbn
, 23operations, 20
Sales_item.h
header, 19
scientific
manipulator, 757
base class, 617
static
member, 302compared to object lifetime, 204
derived class, 617
function, 204
member function, 282
parameters and return type, 283
multiple inheritance, 807
name collisions,
using
directive, 795nested class, 844
overloaded function, 234
statement, 174
template parameter, 668
template specialization, 708
using
directive, 794virtual function, 620
enum class
, 832
Screen
, 271
pos
member, 272concatenating operations, 275
do_display
, 276friends, 279
get_cursor
, 283Menu
function table, 840move
, 841move
members, 275set
, 275
search
, 872
search_n
, 871
seed, random-number engine, 748
self-assignment
HasPtr
semicolon (;
), 3
separate compilation, 44, 80, 252
sequential container, 326, 373
array
, 326deque
, 326forward_list
, 326list
, 326list initialization, 336
members
assign
, 338back
, 346clear
, 350emplace
, 345emplace_back
, 345emplace_front
, 345erase
, 349front
, 346insert
, 343pop_back
, 348pop_front
, 348push_back
, 132push_front
, 342resize
, 352value_type
, 333performance characteristics, 327
priority_queue
, 371queue
, 371stack
, 370value initialization, 336
vector
, 326
see alsoordered container
bitset
, 727header, 420
insert
, 431iterator
, 429key_type
requirements, 425list initialization, 423
lower_bound
, 438TextQuery
class, 485upper_bound
, 438word_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), 451copy 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, 453initialization, 464
make_shared
, 451pitfalls, 469
reset
, 466StrBlob
, 455TextQuery
class, 485with
new
, 464
short
, 33
short-circuit evaluation, 142, 169
ShorterString
, 573
()
(call operator), 573
shorterString
, 224
showbase
, manipulator, 755
showpoint
, manipulator, 758
shrink_to_fit
shuffle
, 878
signed type, 34
single-line (//
), comment, 9, 26
size
array subscript, 116
size_type
, container, 88, 102, 132, 332
SizeComp
, 573
()
(call operator), 573
sizeof...
, parameter pack, 700
skipws
, manipulator, 760
SmallInt
specialization, seetemplate specialization
splice
, list
, 416
splice_after
, forward_list
, 416
i before e program, 734
sstream
example, 740
stable_partition
, 876
emplace
, 371empty
, 371equality and relational operators, 370
header, 370
initialization, 369
pop
, 371push
, 371sequential container, 370
size
, 371swap
, 371top
, 371
stack unwinding, exception handling, 773, 818
standard header, #include
, 6, 21
statement label, 192
static
(file static), 792, 817
Account
, 301class template, 667
accessed through an instantiation, 667
definition, 667
const
data member, initialization, 302data 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
static type checking, 46
lvalue to rvalue, 691
std::forward
, seeforward
std::move
, seemove
stod
, 368
stof
, 368
stoi
, 368
stol
, 368
stold
, 368
stoll
, 368
stoul
, 368
stoull
, 368
str
, string streams, 323
StrBlob
, 456
StrBlobPtr
, 474
++
(increment), 566--
(decrement), 566*
(dereference), 569->
(arrow operator), 569check
, 474constructor, 474
deref
, 475incr
, 475weak_ptr
, 474
strcat
, 123
strcmp
, 123
strcpy
, 123
clear
, 313explicit
conversion tobool
, 583file marker, 765
flushing buffer, 314
format state, 753
istream_iterator
, 403type requirements, 406
not flushed if program crashes, 315
ostream_iterator
, 403random IO, 765
rdstate
, 313setstate
, 313
strict weak ordering, 425, 448
see alsocontainer
see alsosequential container
see alsoiterator
+=
(compound assignment), 89+
(addition), 89>>
(input operator) as condition, 86append
, 362assign
, 362at
, 348C-style string, 124
c_str
, 124capacity
, 356case sensitive, 365
compare
, 366concatenation, 89
default initialization, 44
difference_type
, 112equality and relational operators, 88
erase
, 362find
, 364find_first_not_of
, 365find_last_not_of
, 366find_last_of
, 366initialization from string literal, 84
insert
, 362move constructor, 529
numeric conversions, 367
random-access iterator, 412
replace
, 362reserve
, 356rfind
, 366subscript range, 95
substr
, 361TextQuery
class, 485
see alsoC-style string
concatenation, 39
stringstream
, 321, 321–323, 324
initialization, 321
strlen
, 122
struct
StrVec
, 525
[]
(subscript), 565=
(assignment),initializer_list
, 563alloc_n_copy
, 527begin
, 526capacity
, 526chk_n_alloc
, 526copy assignment, 528
copy constructor, 528
default constructor, 526
design, 525
destructor, 528
emplace_back
, 704end
, 526free
, 528memory allocation strategy, 525
move assignment, 536
move constructor, 535
push_back
, 526move-enabled, 545
reallocate
, 530move iterator version, 543
size
, 526
subexpression, 770
subscript range, 93
substr
, string
, 361
suffix
, smatch
, 736
sum
, program, 682
swap
, 516
array
, 339container, 339
container nonmember version, 339
copy and swap assignment operator, 518
priority_queue
, 371queue
, 371stack
, 371
swap
program, 223
swap_ranges
, 875
switch
statement, 178, 178–182, 200
syntax_option_type
, regex
, 730
synthesized