Skip to content

D

dangling else, 177, 199

dangling pointer, 225, 463, 491

  • undefined behavior, 463

data abstraction, 254, 306

data hiding, 270

data member, see class data member

data structure, 19, 26

deallocate, allocator, 483, 528

debug_rep program

  • additional nontemplate versions, 698

  • general template version, 695

  • nontemplate version, 697

  • pointer template version, 696

DebugDelete, member template, 673

dec, manipulator, 754

decimal, literal, 38

declaration, 45, 78

  • class, 278, 305

  • class template, 669

  • class type, variable, 294

  • compound type, 57

  • dependencies

  • member function as friend, 281

  • overloaded templates, 698

  • template friends, 665

  • template instantiation, 657

  • template specializations, 708

  • variadic templates, 702

  • derived class, 600

  • explicit instantiation, 675

  • friend, 269

  • function template, 669

  • instantiation, 713

  • member template, 673

  • template, 669

  • template specialization, 708

  • type alias, 68

  • using, 82, 132

  • access control, 615

  • overloaded inherited functions, 621

  • variable, 45

  • const, 60

declarator, 50, 79

decltype, 70, 79

decrement operators, 147149

default argument, 236, 251

  • adding default arguments, 237

  • and header file, 238

  • constructor, 290

  • default constructor, 291

  • function call, 236

  • function matching, 243

  • initializer, 238

  • static member, 304

  • virtual function, 607

default case label, 181, 199

default constructor, 263, 306

  • = default, 265

  • = delete, 507

  • default argument, 291

  • Sales_data, 262

  • StrVec, 526

  • synthesized, 263, 306

  • deleted function, 508, 624

  • derived class, 623

  • Token, 850

  • used implicitly

  • default initialization, 293

  • value initialization, 293

default initialization, 43

  • array, 336

  • built-in type, 43

  • class type, 44

  • string, 44, 84

  • uses default constructor, 293

  • vector, 97

default template argument, 670

  • class template, 671

  • compare, 670

  • function template, 670

  • template<>, 671

default_random_engine, 745, 769

defaultfloat manipulator, 757

definition, 79

  • array, 113

  • associative container, 423

  • base class, 594

  • class, 72, 256267

  • class template, 659

  • member function, 661

  • static member, 667

  • class template partial specialization, 711

  • derived class, 596

  • dynamically allocated object, 459

  • explicit instantiation, 675

  • function, 577

  • in if condition, 175

  • in while condition, 183

  • instantiation, 713

  • member function, 256260

  • multidimensional array, 126

  • namespace, 785

  • can be discontiguous, 786

  • member, 788

  • overloaded operator, 500, 552

  • pair, 426

  • pointer, 52

  • pointer to function, 247

  • pointer to member, 836

  • reference, 51

  • sequential container, 334

  • shared_ptr, 450

  • static member, 302

  • string, 84

  • template specialization, 706712

  • unique_ptr, 470, 472

  • variable, 41, 45

  • const, 60

  • variable after case label, 182

  • vector, 97

  • weak_ptr, 473

delegating constructor, 291, 306

delete, 460, 460463, 491

  • const object, 461

  • execution flow, 820

  • memory leak, 462

  • null pointer, 461

  • pointer, 460

  • runs destructor, 502

delete[], dynamically allocated array, 478

deleted function, 507, 549

deleter, 469, 491

deprecated, 401

  • auto_ptr, 471

  • binary_function, 579

  • bind1st, 401

  • bind2nd, 401

  • generalized exception specification, 780

  • ptr_fun, 401

  • unary_function, 579

deque, 372

deref, StrBlobPtr, 475

derived class, 592, 649

  • see alsovirtual function

  • :: (scope operator) to access base-class member, 607

  • = (assignment), 626

  • access control, 613

  • as base class, 600

  • assgined or copied to base object, 603

  • base-to-derived conversion, not automatic, 602

  • constructor, 598

  • initializer list, 598

  • initializes direct base class, 610

  • initializes virtual base, 813

  • copy assignment, 626

  • copy constructor, 626

  • declaration, 600

  • default derivation specifier, 616

  • definition, 596

  • derivation list, 596, 649

  • access control, 612

  • derived object

  • contains base part, 597

  • multiple inheritance, 803

  • derived-to-base conversion, 597

  • accessibility, 613

  • key concepts, 604

  • multiple inheritance, 805

  • destructor, 627

  • direct base class, 600, 649

  • final, 600

  • friendship not inherited, 615

  • indirect base class, 600, 650

  • is user of base class, 614

  • member new and delete, 822

  • move assignment, 626

  • move constructor, 626

  • multiple inheritance, 803

  • name lookup, 617

  • order of destruction, 627

  • multiple inheritance, 805

  • order of initialization, 598, 623

  • multiple inheritance, 804

  • virtual base classes, 814

  • scope, 617

  • hidden base members, 619

  • inheritance, 617621

  • multiple inheritance, 807

  • name lookup, 618

  • virtual function, 620

  • static members, 599

  • synthesized

  • copy control members, 623

  • deleted copy control members, 624

  • using declaration

  • access control, 615

  • overloaded inherited functions, 621

  • virtual function, 596

derived-to-base conversion, 597, 649

  • accessible, 613

  • key concepts, 604

  • multiple inheritance, 805

  • not base-to-derived, 602

  • shared_ptr, 630

design

  • access control, 614

  • Bulk_quote, 592

  • conversion operator, 581

  • Disc_quote, 608

  • equality and relational operators, 562

  • generic programs, 655

  • inheritance, 637

  • Message class, 520

  • namespace, 786

  • overloaded operator, 554556

  • Query classes, 636639

  • Quote, 592

  • reference count, 514

  • StrVec, 525

destination sequence, 381, 413

destroy, allocator, 482, 528

destructor, 452, 491, 501, 501503, 549

  • = default, 506

  • called during exception handling, 773

  • calls to virtual function, 627

  • container elements, 502

  • derived class, 627

  • doesn’t delete pointer mambers, 503

  • explicit call to, 824

c++
HasPtr
  • reference counted, 515

  • valuelike, 512

  • local variables, 502

  • Message, 522

  • not deleted function, 508

  • not private, 509

  • order of destruction, 502

  • derived class, 627

  • multiple inheritance, 805

  • virtual base classes, 815

  • reference count, 514

  • rule of three/five, 505

  • virtual destructor, exception, 622

  • run by delete, 502

  • shared_ptr, 453

  • should not throw exception, 774

  • StrVec, 528

  • synthesized, 503, 550

  • deleted function, 508, 624

  • derived class, 623

  • multiple inheritance, 805

  • Token, 850

  • valuelike class, 512

  • virtual function, 622

  • virtual in base class, 622

development environment, integrated, 3

difference_type, 112

direct base class, 600

direct initialization, 84, 131

  • emplace members use, 345

Disc_quote

  • abstract base class, 610

  • class definition, 609

  • constructor, 609

  • design, 608

discriminant, 849, 862

distribution types

  • bernoulli_distribution, 752

  • default template argument, 750

  • normal_distribution, 751

  • random-number library, 745

  • uniform_int_distribution, 746

  • uniform_real_distribution, 750

divides<T>, 575

division rounding, 141

do while statement, 189, 200

domain_error, 197

double, 33

  • literal (numEnum or numenum), 38

  • output format, 755

  • output notation, 757

dynamic binding, 593, 650

  • requirements for, 603

  • static vs. dynamic type, 605

dynamic type, 601, 650

dynamic_cast, 163, 825, 825, 862

  • bad_cast, 826

  • to pointer, 825

  • to reference, 826

dynamically allocated, 450, 491

  • array, 476, 476484

  • allocator, 481

  • can’t use begin and end, 477

  • can’t use range for statement, 477

  • delete[], 478

  • empty array, 478

  • new[], 477

  • returns pointer to an element, 477

  • shared_ptr, 480

  • unique_ptr, 479

  • delete runs destructor, 502

  • lifetime, 450

  • new runs constructor, 458

  • object, 458463

  • const object, 460

  • delete, 460

  • factory program, 461

  • initialization, 459

  • make_shared, 451

  • new, 458

  • shared objects, 455, 486

  • shared_ptr, 464

  • unique_ptr, 470