O
const
object, 460delete
, 460factory
program, 461initialization, 459
lifetime, 450
new
, 458order of destruction
class type object, 502
derived class object, 627
multiple inheritance, 805
virtual base classes, 815
order of initialization
object code, 252
object-oriented programming, 650
oct
, manipulator, 754
octal, literal (0
num), 38
octal escape sequence (\
nnn), 39
off-the-beginning iterator, 351, 373
off-the-end
see also
ostream
close
, 318file marker, 765
file mode, 319
initialization, 317
off_type
, 766open
, 318pos_type
, 766random access, 765
random IO program, 766
old-style, cast, 164
open
, file stream, 318
conversion, 159
operator alternative name, 46
operator delete
operator delete[]
operator new
operator new[]
operator overloading, seeoverloaded operator
operators
arithmetic, 139
bitset
, 725comma (
,
), 157compound assignment, 12
conditional (
?:
), 151input, 8
iterator
addition and subtraction, 111
arrow, 110
dereference, 107
increment and decrement, 107
relational, 111
logical, 141
member access, 150
noexcept
, 780output, 7
overloaded, arithmetic, 560
pointer
addition and subtraction, 119
equality, 120
increment and decrement, 118
subscript, 121
Sales_data
+=
(compound assignment), 564+
(addition), 560==
(equality), 561!=
(inequality), 561>>
(input operator), 558<<
(output operator), 557Sales_item
, 20scope, 82
sizeof
, 156sizeof...
, 700
string
vector
options to main
, 218
order of destruction
&&
(logical AND), 138||
(logical OR), 138,
(comma operator), 138?:
(conditional operator), 138expression, 137
pitfalls, 149
order of initialization
class type object, 289
derived class object, 598
multiple base classes, 816
multiple inheritance, 804
virtual base classes, 814
see alsocontainer
see alsoassociative container
key_type
requirements, 425lower_bound
, 438override default comparison, 425
upper_bound
, 438
ordering, strict weak, 425, 448
OrQuery
, 637
see alsomanipulator
<<
(output operator), 7precedence and associativity, 155
chained output, 7
condition state, 312
explicit
conversion tobool
, 583file marker, 765
floating-point notation, 757
flushing output buffer, 314
format state, 753
no copy or assign, 311
not flushed if program crashes, 315
off_type
, 766output format, floating-point, 755
pos_type
, 766precision
member, 756random access, 765
random IO program, 766
tie
member, 315virtual base class, 810
write
, 763
ostringstream
, 311, 321, 321–323
see also
ostream
file marker, 765
initialization, 321
off_type
, 766phone number program, 323
pos_type
, 766random access, 765
random IO program, 766
str
, 323
out
(file mode), 319
out-of-range value, signed
, 35
out_of_range
, 197
at
function, 348
out_of__stock
, 783
output, standard, 6
overflow, 140
overflow_error
, 197
overhead, function call, 238
overload resolution, seefunction matching
overloaded function, 230, 230–235, 252
see alsofunction matching
as friend, 281
compared to redeclaration, 231
compared to template specialization, 708
const
parameters, 232constructor, 262
linkage directive, 860
member function, 273
const
, 276move-enabled, 545
reference qualified, 547
virtual, 621
move-enabled, 545
namespace, 800
pointer to, 248
scope, 234
derived hides base, 619
using
declaration, 800in derived class, 621
using
directive, 801
overloaded operator, 135, 169, 500, 550, 552, 590
*
(dereference), 569StrBlobPtr
, 569&
(address-of), 554->
(arrow operator), 569StrBlobPtr
, 569[]
(subscript), 564StrVec
, 565()
(call operator), 571absInt
, 571PrintString
, 571StrVec initializer_list
, 563Sales_data
, 564+
(addition),Sales_data
, 560==
(equality), 561Sales_data
, 561!=
(inequality), 562Sales_data
, 561<
(less-than), strict weak ordering, 562Sales_data
, 558Sales_data
, 557&&
(logical AND), 554||
(logical OR), 554&
(bitwise AND),Query
, 644|
(bitwise OR),Query
, 644~
(bitwise NOT),Query
, 643,
(comma operator), 554ambiguous, 588
arithmetic operators, 560
associativity, 553
binary operators, 552
candidate function, 587
consistency between relational and equality operators, 562
equality operators, 561
explicit call to, 553
postfix operators, 568
precedence, 553
relational operators, 562
requires class-type parameter, 552
short-circuit evaluation lost, 553
unary operators, 552