Team LiB
Previous Section Next Section

C

 

.C file, 4

 

.cc file, 4

 

.cpp file, 4

 

.cp file, 4

 

C library header, 91

 

C-style cast, 164

 

C-style string, 114, 122, 122123, 131

 

buffer overflow, 123

 

initialization, 122

 

parameter, 216

 

string, 124

 

c_str, 124

 

call by reference, 208, 210, 251

 

call by value, 209, 251

 

uses copy constructor, 498

 

uses move constructor, 539

 

call signature, 576, 590

 

callable object, 388, 417, 571572

 

absInt, 571

 

bind, 397

 

call signature, 576

 

function and function pointers, 388

 

function objects, 572

 

pointer to member

 

and bind, 843

 

and function, 842

 

and mem_fn, 843

 

not callable, 842

 

PrintString, 571

 

ShorterString, 573

 

SizeComp, 573

 

with function, 576579

 

with algorithms, 390

 

candidate function, 243, 251

 

see also function matching

 

function template, 695

 

namespace, 800

 

overloaded operator, 587

 

capacity

 

string, 356

 

StrVec, 526

 

vector, 356

 

capture list, see lambda expression

 

case label, 179, 179182, 199

 

default, 181

 

constant expression, 179

 

case sensitive, string, 365

 

cassert header, 241

 

cast, see also named cast, 168

 

checked, see dynamic_cast

 

old-style, 164

 

to rvalue reference, 691

 

catch, 193, 195, 199, 775, 816

 

catch(...), 777, 816

 

exception declaration, 195, 200, 775, 816

 

exception object, 775

 

matching, 776

 

ordering of, 776

 

runtime_error, 195

 

catch all (catch(...)), 777, 816

 

caution

 

ambiguous conversion operator, 581

 

conversions to unsigned, 37

 

dynamic memory pitfalls, 462

 

exception safety, 196

 

IO buffers, 315

 

overflow, 140

 

overloaded operator misuse, 555

 

overloaded operators and conversion operators, 586

 

smart pointer, pitfalls, 469

 

uninitialized variables, 45

 

using directives cause pollution, 795

 

cbegin

 

auto, 109, 379

 

decltype, 109, 379

 

container, 109, 333, 334, 372

 

cctype

 

functions, 9193

 

header, 91

 

cend

 

auto, 109, 379

 

decltype, 109, 379

 

container, 109, 333, 334, 372

 

cerr, 6, 26

 

chained input, 8

 

chained output, 7

 

char, 32

 

signed, 34

 

unsigned, 34

 

array initialization, 114

 

literal, 39

 

representation, 34

 

char16_t, 33

 

char32_t, 33

 

character

 

newline (\n), 39

 

nonprintable, 39, 79

 

null (\0), 39

 

tab (\t), 39

 

character string literal, see string literal

 

check

 

StrBlob, 457

 

StrBlobPtr, 474

 

check_size, 398

 

bind, 398

 

checked cast, see dynamic_cast

 

children’s story program, 383391

 

chk_n_alloc, StrVec, 526

 

cin, 6, 26

 

tied to cout, 315

 

cl, 5

 

class, 19, 26, 72, 305

 

see also constructor

 

see also destructor

 

see also member function

 

see also static member

 

access specifier, 268

 

default, 268

 

private, 268, 306

 

public, 268, 306

 

aggregate, 298, 305

 

assignment operator

 

see copy assignment

 

see move assignment

 

base, see base class, 649

 

data member, 73, 78

 

const vs. mutable, 274

 

const, initialization, 289

 

in-class initializer, 274

 

initialization, 263, 274

 

must be complete type, 279

 

mutable, 274, 306

 

order of destruction, 502

 

order of initialization, 289

 

pointer, not deleted, 503

 

reference, initialization, 289

 

sizeof, 157

 

declaration, 278, 305

 

default inheritance specifier, 616

 

definition, 72, 256267

 

ends with semicolon, 73

 

derived, see derived class, 649

 

exception, 193, 200

 

final specifier, 600

 

forward declaration, 279, 306

 

friend, 269, 280

 

class, 280

 

function, 269

 

member function, 280

 

overloaded function, 281

 

scope, 270, 281

 

template class or function, 664

 

implementation, 254

 

interface, 254

 

literal, 299

 

local, see local class

 

member, 73, 78

 

member access, 282

 

member new and delete, 822

 

member:constant expression, see bit-field

 

multiple base classes, see multiple inheritance

 

name lookup, 284

 

nested, see nested class

 

pointer to member, see pointer to member

 

preventing copies, 507

 

scope, 73, 282, 282287, 305

 

synthesized, copy control, 267, 497, 500, 503, 537

 

template member, see member template

 

type member, 271

 

:: (scope operator), 282

 

user of, 255

 

valuelike, 512

 

without move constructor, 540

 

class

 

compared to typename, 654

 

default access specifier, 268

 

default inheritance specifier, 616

 

template parameter, 654

 

class derivation list, 596

 

access control, 612

 

default access specifier, 616

 

direct base class, 600

 

indirect base class, 600

 

multiple inheritance, 803

 

virtual base class, 812

 

class template, 96, 131, 658, 659, 658667, 713

 

see also template parameter

 

see also instantiation

 

Blob, 659

 

declaration, 669

 

default template argument, 671

 

definition, 659

 

error detection, 657

 

explicit instantiation, 675, 675676

 

explicit template argument, 660

 

friend, 664

 

all instantiations, 665

 

declaration dependencies, 665

 

same instantiation, 664

 

specific instantiation, 665

 

instantiation, 660

 

member function

 

defined outside class body, 661

 

instantiation, 663

 

member template, see member template

 

specialization, 707, 709712, 714

 

hash<key_type>, 709, 788

 

member, 711

 

namespace, 788

 

partial, 711, 714

 

static member, 667

 

accessed through an instantiation, 667

 

definition, 667

 

template argument, 660

 

template parameter, used in definition, 660

 

type parameter as friend, 666

 

type-dependent code, 658

 

class type, 19, 26

 

conversion, 162, 305, 590

 

ambiguities, 587

 

conversion operator, 579

 

converting constructor, 294

 

impact on function matching, 584

 

overloaded function, 586

 

with standard conversion, 581

 

default initialization, 44

 

initialization, 73, 84, 262

 

union member of, 848

 

variable vs. function declaration, 294

 

clear

 

sequential container, 350

 

stream, 313

 

clog, 6, 26

 

close, file stream, 318

 

cmatch, 733

 

cmath header, 751, 757

 

collapsing rule, reference, 688

 

combine, Sales_data, 259

 

comma (,) operator, 157

 

comment, 9, 26

 

block (/* */), 9, 26

 

single-line (//), 9, 26

 

compare

 

default template argument, 670

 

function template, 652

 

default template argument, 670

 

explicit template argument, 683

 

specialization, 706

 

string literal version, 654

 

template argument deduction, 680

 

string, 366

 

compareIsbn

 

and associative container, 426

 

Sales_data, 387

 

compilation

 

common errors, 16

 

compiler options, 207

 

conditional, 240

 

declaration vs. definition, 44

 

mixing C and C++, 860

 

needed when class changes, 270

 

templates, 656

 

error detection, 657

 

explicit instantiation, 675676

 

compiler

 

extension, 114, 131

 

GNU, 5

 

Microsoft, 5

 

options for separate compilation, 207

 

composition vs. inheritance, 637

 

compound assignment (e.g., +=)

 

arithmetic operators, 147

 

bitwise operators, 147

 

compound expression, see expression

 

compound statement, 173, 199

 

compound type, 50, 5058, 78

 

array, 113

 

declaration style, 57

 

understanding complicated declarations, 115

 

concatenation

 

string, 89

 

string literal, 39

 

condition, 12, 26

 

= (assignment) in, 146

 

conversion, 159

 

do while statement, 189

 

for statement, 13, 185

 

if statement, 18, 175

 

in IO expression, 156

 

logical operators, 141

 

smart pointer as, 451

 

stream type as, 15, 162, 312

 

while statement, 12, 183

 

condition state, IO classes, 312, 324

 

conditional compilation, 240

 

conditional operator (?:), 151

 

connection, 468

 

console window, 6

 

const, 59, 78

 

and typedef, 68

 

conversion, 162

 

template argument deduction, 679

 

dynamically allocated

 

destruction, 461

 

initialization, 460

 

initialization, 59

 

class type object, 262

 

low-level const, 64

 

argument and parameter, 213

 

conversion from, 163

 

conversion to, 162

 

overloaded function, 232

 

template argument deduction, 693

 

member function, 258, 305

 

() (call operator), 573

 

not constructors, 262

 

overloaded function, 276

 

reference return, 276

 

parameter, 212

 

function matching, 246

 

overloaded function, 232

 

pointer, 63, 78

 

pointer to, 62, 79

 

conversion from nonconst, 162

 

initialization from nonconst, 62

 

overloaded parameter, 232

 

reference, see reference to const

 

top-level const, 64

 

and auto, 69

 

argument and parameter, 212

 

decltype, 71

 

parameter, 232

 

template argument deduction, 679

 

variable, 59

 

declared in header files, 76

 

extern, 60

 

local to file, 60

 

const_cast, 163, 163

 

const_iterator, container, 108, 332

 

const_reference, container, 333

 

const_reverse_iterator, container, 332, 407

 

constant expression, 65, 78

 

array dimension, 113

 

bit-field, 854

 

case label, 179

 

enumerator, 833

 

integral, 65

 

nontype template parameter, 655

 

sizeof, 156

 

static data member, 303

 

constexpr, 66, 78

 

constructor, 299

 

declared in header files, 76

 

function, 239, 251

 

nonconstant return value, 239

 

function template, 655

 

pointer, 67

 

variable, 66

 

construct

 

allocator, 482

 

forwards to constructor, 527

 

constructor, 262, 264, 262266, 305

 

see also default constructor

 

see also copy constructor

 

see also move constructor

 

calls to virtual function, 627

 

constexpr, 299

 

converting, 294, 305

 

function matching, 585

 

Sales_data, 295

 

with standard conversion, 580

 

default argument, 290

 

delegating, 291, 306

 

derived class, 598

 

initializes direct base class, 610

 

initializes virtual base, 813

 

explicit, 296, 306

 

function try block, 778, 817

 

inherited, 628

 

initializer list, 265, 288292, 305

 

class member initialization, 274

 

compared to assignment, 288

 

derived class, 598

 

function try block, 778, 817

 

sometimes required, 288

 

virtual base class, 814

 

initializer_list parameter, 662

 

not const, 262

 

order of initialization, 289

 

derived class object, 598, 623

 

multiple inheritance, 804

 

virtual base classes, 814

 

overloaded, 262

 

StrBlob, 456

 

StrBlobPtr, 474

 

TextQuery, 488

 

Blob, 662

 

initializer_list, 662

 

iterator parmeters, 673

 

Bulk_quote, 598, 610

 

Disc_quote, 609

 

Sales_data, 264266

 

container, 96, 131, 326, 372

 

see also sequential container

 

see also associative container

 

adaptor, 368, 368371

 

equality and relational operators, 370

 

initialization, 369

 

requirements on container, 369

 

and inheritance, 630

 

as element type, 97, 329

 

associative, 420, 447

 

copy initialization, 334

 

element type constraints, 329, 341

 

elements and destructor, 502

 

elements are copies, 342

 

initialization from iterator range, 335

 

list initialization, 336

 

members

 

see also iterator

 

= (assignment), 337

 

== (equality), 341

 

!= (inequality), 341

 

begin, 106, 333, 372

 

cbegin, 109, 333, 334, 372

 

cend, 109, 333, 334, 372

 

const_iterator, 108, 332

 

const_reference, 333

 

const_reverse_iterator, 332, 407

 

crbegin, 333

 

crend, 333

 

difference_type, 131, 332

 

empty, 87, 102, 131, 340

 

end, 106, 131, 333, 373

 

equality and relational operators, 88, 102, 340

 

iterator, 108, 332

 

rbegin, 333, 407

 

reference, 333

 

relational operators, 341

 

rend, 333, 407

 

reverse_iterator, 332, 407

 

size, 88, 102, 132, 340

 

size_type, 88, 102, 132, 332

 

swap, 339

 

move operations, 529

 

moved-from object is valid but unspecified, 537

 

nonmember swap, 339

 

of container, 97, 329

 

overview, 328

 

sequential, 326, 373

 

type members, :: (scope operator), 333

 

continue statement, 191, 199

 

control, flow of, 11, 172, 200

 

conversion, 78, 159, 168

 

= (assignment), 145, 159

 

ambiguous, 583589

 

argument, 203

 

arithmetic, 35, 159, 168

 

array to pointer, 117

 

argument, 214

 

exception object, 774

 

multidimensional array, 128

 

template argument deduction, 679

 

base-to-derived, not automatic, 602

 

bool, 35

 

class type, 162, 294, 305, 590

 

ambiguities, 587

 

conversion operator, 579

 

function matching, 584, 586

 

with standard conversion, 581

 

condition, 159

 

derived-to-base, 597, 649

 

accessibility, 613

 

key concepts, 604

 

shared_ptr, 630

 

floating-point, 35

 

function to pointer, 248

 

exception object, 774

 

template argument deduction, 679

 

integral promotion, 160, 169

 

istream, 162

 

multiple inheritance, 805

 

ambiguous, 806

 

narrowing, 43

 

operand, 159

 

pointer to bool, 162

 

rank, 245

 

return value, 223

 

Sales_data, 295

 

signed type, 160

 

signed to unsigned, 34

 

to const, 162

 

from pointer to nonconst, 62

 

from reference to nonconst, 61

 

template argument deduction, 679

 

unscoped enumeration to integer, 834

 

unsigned, 36

 

virtual base class, 812

 

conversion operator, 580, 580587, 590

 

design, 581

 

explicit, 582, 590

 

bool, 583

 

function matching, 585, 586

 

SmallInt, 580

 

used implicitly, 580

 

with standard conversion, 580

 

converting constructor, 294, 305

 

function matching, 585

 

with standard conversion, 580

 

_copy algorithms, 383, 414

 

copy, 382, 874

 

copy and swap assignment, 518

 

move assignment, 540

 

self-assignment, 519

 

copy assignment, 500501, 549

 

= default, 506

 

= delete, 507

 

base from derived, 603

 

copy and swap, 518, 549

 

derived class, 626

 

HasPtr

 

reference counted, 516

 

valuelike, 512

 

memberwise, 500

 

Message, 523

 

preventing copies, 507

 

private, 509

 

reference count, 514

 

rule of three/five, 505

 

virtual destructor exception, 622

 

self-assignment, 512

 

StrVec, 528

 

synthesized, 500, 550

 

deleted function, 508, 624

 

derived class, 623

 

multiple inheritance, 805

 

union with class type member, 852

 

valuelike class, 512

 

copy constructor, 496, 496499, 549

 

= default, 506

 

= delete, 507

 

base from derived, 603

 

derived class, 626

 

HasPtr

 

reference counted, 515

 

valuelike, 512

 

memberwise, 497

 

Message, 522

 

parameter, 496

 

preventing copies, 507

 

private, 509

 

reference count, 514

 

rule of three/five, 505

 

virtual destructor exception, 622

 

StrVec, 528

 

synthesized, 497, 550

 

deleted function, 508, 624

 

derived class, 623

 

multiple inheritance, 805

 

union with class type member, 851

 

used for copy-initialization, 498

 

copy control, 267, 496, 549

 

= delete, 507508

 

inheritance, 623629

 

memberwise, 267, 550

 

copy assignment, 500

 

copy constructor, 497

 

move assignment, 538

 

move constructor, 538

 

multiple inheritance, 805

 

synthesized, 267

 

as deleted function, 508

 

as deleted in derived class, 624

 

move operations as deleted function, 538

 

unions, 849

 

virtual base class, synthesized, 815

 

copy initialization, 84, 131, 497, 497499, 549

 

array, 337

 

container, 334

 

container elements, 342

 

explicit constructor, 498

 

invalid for arrays, 114

 

move vs. copy, 539

 

parameter and return value, 498

 

uses copy constructor, 497

 

uses move constructor, 541

 

copy_backward, 875

 

copy_if, 874

 

copy_n, 874

 

copyUnion, Token, 851

 

count, reference, 550

 

count

 

algorithm, 378, 871

 

associative container, 437, 438

 

bitset, 727

 

count_calls, program, 206

 

count_if, 871

 

cout, 6, 26

 

tied to cin, 315

 

cplusplus_primer, namespace, 787

 

crbegin, container, 333

 

cref, binds reference parameter, 400, 417

 

cregex_iterator, 733, 769

 

crend, container, 333

 

cstddef header, 116, 120

 

cstdlib header, 54, 227, 778, 823

 

cstring

 

functions, 122123

 

header, 122

 

csub_match, 733, 769

 

ctime header, 749

 

curly brace, 2, 26

 
Team LiB
Previous Section Next Section