Team LiB
Previous Section Next Section

S

 

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

 

class definition, 72, 268

 

combine, 259

 

compareIsbn, 425

 

with associative container, 426

 

constructors, 264266

 

converting constructor, 295

 

default constructor, 262

 

exception classes, 783

 

exception version

 

+= (compound assignment), 784

 

+ (addition), 784

 

explicit constructor, 296

 

isbn, 257

 

operations, 254

 

print, 261

 

read, 261

 

relational operators, 563

 

Sales_data.h header, 76

 

Sales_item, 20

 

+ (addition), 22

 

>> (input operator), 21

 

<< (output operator), 21

 

addition program, 21, 23

 

bookstore program, 24

 

isbn, 23

 

operations, 20

 

Sales_item.h header, 19

 

scientific manipulator, 757

 

scope, 48, 80

 

base class, 617

 

block, 48, 80, 173

 

class, 73, 282, 282287, 305

 

static member, 302

 

compared to object lifetime, 204

 

derived class, 617

 

friend, 270, 281

 

function, 204

 

global, 48, 80

 

inheritance, 617621

 

member function, 282

 

parameters and return type, 283

 

multiple inheritance, 807

 

name collisions, using directive, 795

 

namespace, 785790

 

nested class, 844

 

overloaded function, 234

 

statement, 174

 

template parameter, 668

 

template specialization, 708

 

using directive, 794

 

virtual function, 620

 

scoped enumeration, 832, 864

 

enum class, 832

 

Screen, 271

 

pos member, 272

 

concatenating operations, 275

 

do_display, 276

 

friends, 279

 

get, 273, 282

 

get_cursor, 283

 

Menu function table, 840

 

move, 841

 

move members, 275

 

set, 275

 

search, 872

 

search_n, 871

 

seed, random-number engine, 748

 

seekp, seekg, 763768

 

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

 

initialization, 334337

 

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_back, 100, 342, 545

 

push_front, 342

 

resize, 352

 

value_type, 333

 

performance characteristics, 327

 

priority_queue, 371

 

queue, 371

 

stack, 370

 

value initialization, 336

 

vector, 326

 

set, 420, 448

 

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_intersection, 647, 880

 

set_symmetric_difference, 880

 

set_union, 880

 

setfill, manipulator, 759

 

setprecision, manipulator, 756

 

setstate, stream, 313

 

setw, manipulator, 758

 

shared_ptr, 450, 450457, 464469, 491

 

* (dereference), 451

 

copy and assignment, 451

 

definition, 450

 

deleter, 469, 491

 

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

 

signed, 34, 80

 

char, 34

 

conversion to unsigned, 34, 160

 

out-of-range value, 35

 

signed type, 34

 

single-line (//), comment, 9, 26

 

size

 

container, 88, 102, 132, 340

 

priority_queue, 371

 

queue, 371

 

returns unsigned, 88

 

stack, 371

 

StrVec, 526

 

size_t, 116, 132, 727

 

array subscript, 116

 

size_type, container, 88, 102, 132, 332

 

SizeComp, 573

 

() (call operator), 573

 

sizeof, 156, 169

 

array, 157

 

data member, 157

 

sizeof..., parameter pack, 700

 

skipws, manipulator, 760

 

sliced, 603, 650

 

SmallInt

 

+ (addition), 588

 

conversion operator, 580

 

smart pointer, 450, 491

 

exception safety, 467

 

pitfalls, 469

 

smatch, 729, 733, 769, 770

 

prefix, 736

 

provide context for a match, 735

 

suffix, 736

 

sort, 384, 876

 

source file, 4, 27

 

specialization, see template specialization

 

splice, list, 416

 

splice_after, forward_list, 416

 

sregex_iterator, 733, 770

 

i before e program, 734

 

sstream

 

file marker, 765

 

header, 310, 321

 

off_type, 766

 

pos_type, 766

 

random access, 765

 

random IO program, 766

 

seek and tell, 763768

 

ssub_match, 733, 736, 770

 

example, 740

 

stable_partition, 876

 

stable_sort, 387, 876

 

stack, 370, 373

 

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 error, 6, 27

 

standard header, #include, 6, 21

 

standard input, 6, 27

 

standard library, 5, 27

 

standard output, 6, 27

 

statement, 2, 27

 

block, see block

 

break, 190, 199

 

compound, 173, 199

 

continue, 191, 199

 

do while, 189, 200

 

expression, 172, 200

 

for, 13, 27, 185, 185187, 200

 

goto, 192, 200

 

if, 17, 27, 175, 175178, 200

 

labeled, 192, 200

 

null, 172, 200

 

range for, 91, 187, 187189, 200

 

return, 222, 222228

 

scope, 174

 

switch, 178, 178182, 200

 

while, 11, 28, 183, 183185, 200

 

statement label, 192

 

static (file static), 792, 817

 

static member

 

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

 

static type, 601, 650

 

determines name lookup, 617, 619

 

multiple inheritance, 806

 

static type checking, 46

 

static_cast, 163, 163

 

lvalue to rvalue, 691

 

std, 7, 28

 

std::forward, see forward

 

std::move, see move

 

stdexcept header, 194, 197

 

stod, 368

 

stof, 368

 

stoi, 368

 

stol, 368

 

stold, 368

 

stoll, 368

 

store, free, 450, 491

 

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

 

stream

 

as condition, 15, 162, 312

 

clear, 313

 

explicit conversion to bool, 583

 

file marker, 765

 

flushing buffer, 314

 

format state, 753

 

istream_iterator, 403

 

iterator, 401, 403406, 418

 

type requirements, 406

 

not flushed if program crashes, 315

 

ostream_iterator, 403

 

random IO, 765

 

rdstate, 313

 

setstate, 313

 

strict weak ordering, 425, 448

 

string, 80, 8493, 132

 

see also container

 

see also sequential container

 

see also iterator

 

[] (subscript), 93, 132, 347

 

+= (compound assignment), 89

 

+ (addition), 89

 

>> (input operator), 85, 132

 

>> (input operator) as condition, 86

 

<< (output operator), 85, 132

 

and string literal, 8990

 

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

 

getline, 87, 321

 

header, 74, 76, 84

 

initialization, 8485, 360361

 

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

 

string literal, 7, 28, 39

 

see also C-style string

 

and string, 8990

 

concatenation, 39

 

stringstream, 321, 321323, 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

 

typical implementation, 517518

 

swap program, 223

 

swap_ranges, 875

 

switch statement, 178, 178182, 200

 

default case label, 181

 

break, 179181, 190

 

compared to if, 178

 

execution flow, 180

 

variable definition, 182

 

syntax_option_type, regex, 730

 

synthesized

 

copy assignment, 500, 550

 

copy constructor, 497, 550

 

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

 

default constructor, 263, 306

 

derived class, 623

 

members of built-in type, 263

 

destructor, 503, 550

 

move operations

 

deleted function, 538

 

not always defined, 538

 
Team LiB
Previous Section Next Section