I

Index

Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information on it.

– Samuel Johnson

Token

!=

container 147

not-equal operator 6

", string literal 3

$, regex 117

%

modulus operator 6

remainder operator 6

%=, operator 7

&

address-of operator 11

reference to 12

&&, rvalue reference 71

(, regex 117

(), call operator 85

(?: pattern 120

), regex 117

*

contents-of operator 11

multiply operator 6

pointer to 11

regex 117

*=, scaling operator 7

*? lazy 118

+

plus operator 6

regex 117

string concatenation 111

++, increment operator 7

+=

operator 7

string append 112

+? lazy 118

-, minus operator 6

--, decrement operator 7

., regex 117

/, divide operator 6

// comment 2

/=, scaling operator 7

: public 55

<< 75

output operator 3

<=

container 147

less-than-or-equal operator 6

<

container 147

less-than operator 6

=

0 54

and == 7

assignment 16

auto 8

container 147

initializer 7

string assignment 112

==

= and 7

container 147

equal operator 6

string 112

>

container 147

greater-than operator 6

>=

container 147

greater-than-or-equal operator 6

>> 75

template arguments 215

?, regex 117

?? lazy 118

[, regex 117

[]

array 171

array of 11

string 112

\, backslash 3

], regex 117

^, regex 117

{, regex 117

{}

grouping 2

initializer 8

{}? lazy 118

|, regex 117

}, regex 117

~, destructor 51

0

= 54

nullptr NULL 13

A

abs() 188

abstract

class 54

type 54

accumulate() 189

acquisition RAII, resource 164

adaptor, lambda as 180

address, memory 16

address-of operator & 11

adjacent_difference() 189

aims, C++11 213

algorithm 149

container 150, 160

lifting 100

numerical 189

parallel 161

standard library 156

<algorithm> 109, 156

alias, using 90

alignas 215

alignof 215

allocation 51

allocator new, container 178

almost container 170

alnum, regex 119

alpha, regex 119

[[:alpha:]] letter 119

ANSI C++ 212

any 177

append +=, string 112

argument

constrained 81

constrained template 82

default function 42

default template 98

function 41

passing, function 66

type 82

value 82

arithmetic

conversions, usual 7

operator 6

vector 192

ARM 212

array

array vs. 172

of [] 11

array 171

[] 171

data() 171

initialize 171

size() 171

vs. array 172

vs. vector 171

<array> 109

asin() 188

assembler 210

assert() 40

assertion static_assert 40

Assignable 158

assignment

= 16

=, string 112

copy 66, 69

initialization and 18

move 66, 72

associative array – see map

async() launch 204

at() 141

atan() 188

atan2() 188

AT&T Bell Laboratories 212

auto = 8

auto_ptr, deprecated 218

B

back_inserter() 150

backslash \ 3

bad_variant_access 176

base and derived class 55

basic_string 114

BCPL 219

begin() 75, 143, 147, 150

beginner, book for 1

Bell Laboratories, AT&T 212

beta() 188

bibliography 222

Bidirectionallterator 159

BidirectionalRange 160

binary search 156

binding, structured 45

bit-field, bitset and 172

bitset 172

and bit-field 172

and enum 172

blank, regex 119

block

as function body, try 141

try 36

body, function 2

book for beginner 1

bool 5

Boolean 158

BoundedRange 160

break 15

C

C 209

and C++ compatibility 218

Classic 219

difference from 218

K&R 219

void * assignment, difference from 221

with Classes 208

with Classes language features 210

with Classes standard library 211

C++

ANSI 212

compatibility, C and 218

Core Guidelines 214

core language 2

history 207

ISO 212

meaning 209

modern 214

pronunciation 209

standard, ISO 2

standard library 2

standardization 212

timeline 208

C++03 212

C++0x, C++11 209, 212

C++11

aims 213

C++0x 209, 212

language features 215

library components 216

C++14

language features 216

library components 217

C++17

language features 216

library components 217

C++98 212

standard library 211

C11 218

C89 and C99 218

C99, C89 and 218

call operator () 85

callback 181

capacity() 139, 147

capture list 87

carries_dependency 215

cast 53

catch

clause 36

every exception 141

catch(...) 141

ceil() 188

char 5

character sets, multiple 114

check

compile-time 40

run-time 40

checking, cost of range 142

chrono, namespace 179

<chrono> 109, 179, 200

class 48

concrete 48

scope 9

template 79

class

abstract 54

base and derived 55

hierarchy 57

Classic C 219

C-library header 110

clock timing 200

<cmath> 109, 188

cntrl, regex 119

code complexity, function and 4

comment, // 2

Common 158

CommonReference 158

common_type_t 158

communication, task 202

comparison 74

operator 6, 74

compatibility, C and C++ 218

compilation

model, template 104

separate 30

compiler 2

compile-time

check 40

computation 181

evaluation 10

complete encapsulation 66

complex 49, 190

<complex> 109, 188, 190

complexity, function and code 4

components

C++11 library 216

C++14 library 217

C++17 library 217

computation, compile-time 181

concatenation +, string 111

concept 81, 94

range 157

concept support 94

concrete

class 48

type 48

concurrency 195

condition, declaration in 61

condition_variable 201

notify_one() 202

wait() 201

<condition_variable> 201

const

immutability 9

member function 50

constant expression 10

const_cast 53

constexpr

function 10

immutability 9

const_iterator 154

constrained

argument 81

template 82

template argument 82

Constructible 158

constructor

and destructor 210

copy 66, 69

default 50

delegating 215

explicit 67

inheriting 216

initializer-list 52

invariant and 37

move 66, 71

container 51, 79, 137

> 147

= 147

>= 147

< 147

== 147

!= 147

<= 147

algorithm 150, 160

allocator new 178

almost 170

object in 140

overview 146

return 151

sort() 181

specialized 170

standard library 146

contents-of operator * 11

contract 40

conversion 67

explicit type 53

narrowing 8

conversions, usual arithmetic 7

ConvertibleTo 158

copy 68

assignment 66, 69

constructor 66, 69

cost of 70

elision 72

elision 66

memberwise 66

copy() 156

Copyable 158

CopyConstructible 158

copy_if() 156

Core Guidelines, C++ 214

core language, C++ 2

coroutine 211

cos() 188

cosh() 188

cost

of copy 70

of range checking 142

count() 156

count_if() 155156

cout, output 3

<cstdlib> 110

C-style

error handling 188

string 13

D

\d, regex 119

d, regex 119

\D, regex 119

data race 196

data(), array 171

D&E 208

deadlock 199

deallocation 51

debugging template 100

declaration 5

function 4

in condition 61

interface 29

-declaration, using 34

declarator operator 12

decltype 215

decrement operator -- 7

deduction

guide 83, 176

return-type 44

default

constructor 50

function argument 42

member initializer 68

operations 66

template argument 98

=default 66

DefaultConstructible 158

definition implementation 30

delegating constructor 215

=delete 67

delete

naked 52

operator 51

deprecated

auto_ptr 218

feature 218

deque 146

derived class, base and 55

DerivedFrom 158

Destructible 158

destructor 51, 66

^ 51

constructor and 210

virtual 59

dictionary – see map

difference

from C 218

from C void * assignment 221

digit, [[:digit:]] 119

digit, regex 119

[[:digit:]] digit 119

-directive, using 35

dispatch, tag 181

distribution, random 191

divide operator / 6

domain error 188

double 5

duck typing 104

duration 179

duration_cast 179

dynamic store 51

dynamic_cast 61

is instance of 62

is kind of 62

E

EDOM 188

element requirements 140

elision, copy 66

emplace_back() 147

empty() 147

enable_if 184

encapsulation, complete 66

end() 75, 143, 147, 150

engine, random 191

enum, bitset and 172

equal operator == 6

equality preserving 159

EqualityComparable 158

equal_range() 156, 173

ERANGE 188

erase() 143, 147

errno 188

error

domain 188

handling 35

handling, C-style 188

range 188

recovery 38

run-time 35

error-code, exception vs 38

essential operations 66

evaluation

compile-time 10

order of 7

example

find_all() 151

Hello, World! 2

Rand_int 191

Vec 141

exception 35

and main() 141

catch every 141

specification, removed 218

vs error-code 38

exclusive_scan() 189

execution policy 161

explicit type conversion 53

explicit constructor 67

exponential_distribution 191

export removed 218

expr() 188

expression

constant 10

lambda 87

extern template 215

F

fabs() 188

facilities, standard library 108

fail_fast 170

feature, deprecated 218

features

C with Classes language 210

C++11 language 215

C++14 language 216

C++17 language 216

file, header 31

final 216

find() 150, 156

find_all() example 151

find_if() 155156

first, pair member 173

floor() 188

fmod() 188

for

statement 11

statement, range 11

forward() 167

forwarding, perfect 168

Forwardlterator 159

forward_list 146

singly-linked list 143

<forward_list> 109

ForwardRange 160

free store 51

frexp() 188

<fstream> 109

__func__ 215

function 2

and code complexity 4

argument 41

argument, default 42

argument passing 66

body 2

body, try block as 141

const member 50

constexpr 10

declaration 4

implementation of virtual 56

mathematical 188

object 85

overloading 4

return value 41

template 84

type 181

value return 66

function 180

and nullptr 180

fundamental type 5

future

and promise 202

member get() 202

<future> 109, 202

G

garbage collection 73

generic programming 93, 210

get<>()

by index 174

by type 174

get(), future member 202

graph, regex 119

greater-than operator > 6

greater-than-or-equal operator >= 6

greedy match 118, 121

grouping, {} 2

gsl

namespace 168

span 168

Guidelines, C++ Core 214

H

half-open sequence 156

handle 52

resource 69, 165

hardware, mapping to 16

hash table 144

hash<>, unordered_map 76

header

C-library 110

file 31

standard library 109

heap 51

Hello, World! example 2

hierarchy

class 57

navigation 61

history, C++ 207

HOPL 208

I

if statement 14

immutability

const 9

constexpr 9

implementation

definition 30

inheritance 60

iterator 153

of virtual function 56

string 113

in-class member initialization 215

#include 31

inclusive_scan() 189

increment operator ++ 7

index, get<>() by 174

inheritance 55

implementation 60

interface 60

multiple 211

inheriting constructor 216

initialization

and assignment 18

in-class member 215

initialize 52

array 171

initializer

= 7

{} 8

default member 68

initializer-list constructor 52

initializer_list 52

inline 49

namespace 215

inlining 49

inner_product() 189

lnputlterator 159

lnputRange 160

insert() 143, 147

instantiation 81

instruction, machine 16

int 5

output bits of 172

lntegral 158

interface

declaration 29

inheritance 60

invariant 37

and constructor 37

lnvocable 159

lnvocableRegular 159

I/O, iterator and 154

<ios> 109

<iostream> 3, 109

iota() 189

is

instance of, dynamic_cast 62

kind of, dynamic_cast 62

ISO

C++ 212

C++ standard 2

ISO-14882 212

istream_iterator 154

iterator 75, 150

and I/O 154

implementation 153

lterator 159

iterator 143, 154

<iterator> 182

iterator_category 182

iterator_traits 181182

iterator_type 182

J

join(), thread 196

K

key and value 144

K&R C 219

L

\l, regex 119

\L, regex 119

lambda

as adaptor 180

expression 87

language

and library 107

features, C with Classes 210

features, C++11 215

features, C++14 216

features, C++17 216

launch, async() 204

lazy

*? 118

+? 118

?? 118

{}? 118

match 118, 121

ldexp() 188

leak, resource 62, 72, 164

less-than operator < 6

less-than-or-equal operator <= 6

letter, [[:alpha:]] 119

library

algorithm, standard 156

C with Classes standard 211

C++98 standard 211

components, C++11 216

components, C++14 217

components, C++17 217

container, standard 146

facilities, standard 108

language and 107

non-standard 107

standard 107

lifetime, scope and 9

lifting algorithm 100

<limits> 181, 193

linker 2

list

capture 87

forward_list singly-linked 143

list 142, 146

literal

", string 3

raw string 116

suffix, s 113

suffix, sv 115

type of string 113

user-defined 75, 215

literals

string_literals 113

string_view_literals 115

local scope 9

lock, reader-writer 200

log() 188

log10() 188

long long 215

lower, regex 119

M

machine instruction 16

main() 2

exception and 141

make_pair() 173

make_shared() 166

make_tuple() 174

make_unique() 166

management, resource 72, 164

map 144, 146

and unordered_map 146

<map> 109

mapped type, value 144

mapping to hardware 16

match

greedy 118, 121

lazy 118, 121

mathematical

function 188

functions, special 188

functions, standard 188

<math.h> 188

Max Munch rule 118

meaning, C++ 209

member

function, const 50

initialization, in-class 215

initializer, default 68

memberwise copy 66

mem_fn() 180

memory 73

address 16

<memory> 109, 164, 166

merge() 156

Mergeable 159

minus operator - 6

model, template compilation 104

modern C++ 214

modf() 188

modularity 29

module 32

suport 32

modulus operator % 6

Movable 158

move 71

assignment 66, 72

constructor 66, 71

move() 72, 156, 167

MoveConstructible 158

moved-from

object 72

state 168

move-only type 167

multi-line pattern 117

multimap 146

multiple

character sets 114

inheritance 211

return-values 44

multiply operator * 6

multiset 146

mutex 199

<mutex> 199

N

\n, newline 3

naked

delete 52

new 52

namespace scope 9

namespace 34

chrono 179

gsl 168

inline 215

pmr 178

std 3, 35, 109

narrowing conversion 8

navigation, hierarchy 61

new

container allocator 178

naked 52

operator 51

newline \n 3

noexcept 37

noexcept() 215

non-memory resource 73

non-standard library 107

noreturn 215

normal_distribution 191

notation, regular expression 117

not-equal operator != 6

notify_one(), condition_variable 202

NULL 0, nullptr 13

nullptr 13

function and 180

NULL 0 13

number, random 191

<numeric> 189

numerical algorithm 189

numeric_limits 193

O

object 5

function 85

in container 140

moved-from 72

object-oriented programming 57, 210

operations

default 66

essential 66

operator

%= 7

+= 7

&, address-of 11

(), call 85

*, contents-of 11

--, decrement 7

/, divide 6

==, equal 6

>, greater-than 6

>=, greater-than-or-equal 6

++, increment 7

<, less-than 6

<=, less-than-or-equal 6

-, minus 6

%, modulus 6

*, multiply 6

!=, not-equal 6

<<, output 3

+, plus 6

%, remainder 6

*=, scaling 7

/=, scaling 7

arithmetic 6

comparison 6, 74

declarator 12

delete 51

new 51

overloaded 51

user-defined 51

optimization, short-string 113

optional 176

order of evaluation 7

ostream_iterator 154

out_of_range 141

output

bits of int 172

cout 3

operator << 3

Outputlterator 159

OutputRange 160

overloaded operator 51

overloading, function 4

override 55

overview, container 146

ownership 164

P

packaged_task thread 203

pair 173

and structured binding 174

member first 173

member second 173

par 161

parallel algorithm 161

parameterized type 79

partial_sum() 189

par_unseq 161

passing data to task 197

pattern 116

(?: 120

multi-line 117

perfect forwarding 168

Permutable 159

phone_book example 138

plus operator + 6

pmr, namespace 178

pointer 17

smart 164

to * 11

policy, execution 161

polymorphic type 54

pow() 188

precondition 37

predicate 86, 155

type 183

Predicate 159

print, regex 119

procedural programming 2

program 2

programming

generic 93, 210

object-oriented 57, 210

procedural 2

promise

future and 202

member set_exception() 202

member set_value() 202

pronunciation, C++ 209

punct, regex 119

pure virtual 54

purpose, template 93

push_back() 52, 139, 143, 147

push_front() 143

R

R" 116

race, data 196

RAII

and resource management 36

and try-block 40

and try-statement 36

resource acquisition 164

scoped_lock and 199200

RAII 52

Rand_int example 191

random number 191

random

distribution 191

engine 191

<random> 109, 191

RandomAccessIterator 159

RandomAccessRange 160

range

checking, cost of 142

checking Vec 140

concept 157

error 188

for statement 11

Range 157, 160

raw string literal 116

reader-writer lock 200

recovery, error 38

reduce() 189

reference 17

&&, rvalue 71

rvalue 72

to & 12

regex

] 117

[ 117

^ 117

? 117

. 117

+ 117

* 117

) 117

( 117

$ 117

{ 117

} 117

| 117

alnum 119

alpha 119

blank 119

cntrl 119

\D 119

\d 119

d 119

digit 119

graph 119

\l 119

\L 119

lower 119

print 119

punct 119

regular expression 116

repetition 118

\s 119

\S 119

s 119

space 119

\U 119

\u 119

upper 119

w 119

\w 119

\W 119

xdigit 119

<regex> 109, 116

regular expression 116

regex_iterator 121

regex_search 116

regular

expression notation 117

expression <regex> 116

expression regex 116

Regular 158

reinterpret_cast 53

Relation 159

remainder operator % 6

removed

exception specification 218

export 218

repetition, regex 118

replace() 156

string 112

replace_if() 156

requirement, template 94

requirements, element 140

reserve() 139, 147

resize() 147

resource

acquisition RAII 164

handle 69, 165

leak 62, 72, 164

management 72, 164

management, RAII and 36

non-memory 73

retention 73

safety 72

rethrow 38

return

function value 66

type, suffix 215

value, function 41

return

container 151

type, void 3

returning results from task 198

return-type deduction 44

return-values, multiple 44

riemanzeta() 188

rule

Max Munch 118

of zero 67

run-time

check 40

error 35

rvalue

reference 72

reference && 71

S

s literal suffix 113

\s, regex 119

s, regex 119

\S, regex 119

safety, resource 72

Same 158

scaling

operator /= 7

operator *= 7

scope

and lifetime 9

class 9

local 9

namespace 9

scoped_lock 164

and RAII 199200

unique_lock and 201

scoped_lock() 199

search, binary 156

second, pair member 173

Semiregular 158

Sentinel 159

separate compilation 30

sequence 150

half-open 156

set 146

<set> 109

set_exception(), promise member 202

set_value(), promise member 202

shared_lock 200

shared_mutex 200

shared_ptr 164

sharing data task 199

short-string optimization 113

SignedIntegral 158

SIMD 161

Simula 207

sin() 188

singly-linked list, forward_list 143

sinh() 188

size of type 6

size() 75, 147

array 171

SizedRange 160

SizedSentinel 159

sizeof 6

sizeof() 181

size_t 90

smart pointer 164

smatch 116

sort() 149, 156

container 181

Sortable 159

space, regex 119

span

gsl 168

string_view and 168

special mathematical functions 188

specialized container 170

sphbessel() 188

sqrt() 188

<sstream> 109

standard

ISO C++ 2

library 107

library algorithm 156

library, C++ 2

library, C with Classes 211

library, C++98 211

library container 146

library facilities 108

library header 109

library std 109

mathematical functions 188

standardization, C++ 212

state, moved-from 168

statement

for 11

if 14

range for 11

switch 14

while 14

static_assert 193

assertion 40

static_cast 53

std

namespace 3, 35, 109

standard library 109

<stdexcept> 109

STL 211

store

dynamic 51

free 51

StrictTotallyOrdered 158

StrictWeakOrder 159

string

C-style 13

literal " 3

literal, raw 116

literal, type of 113

Unicode 114

string 111

[] 112

== 112

append += 112

assignment = 112

concatenation + 111

implementation 113

replace() 112

substr() 112

<string> 109, 111

string_literals, literals 113

string_span 170

string_view 114

and span 168

string_view_literals, literals 115

structured

binding 45

binding, pair and 174

binding, tuple and 174

subclass, superclass and 55

[]subscripting 147

substr(), string 112

suffix 75

return type 215

s literal 113

sv literal 115

superclass and subclass 55

suport, module 32

support, concept 94

sv literal suffix 115

swap() 76

Swappable 158

SwappableWith 158

switch statement 14

synchronized_pool_resource 178

T

table, hash 144

tag dispatch 181

tanh() 188

task

and thread 196

communication 202

passing data to 197

returning results from 198

sharing data 199

TC++PL 208

template

argument, constrained 82

argument, default 98

arguments, >> 215

compilation model 104

constrained 82

variadic 100

template 79

class 79

debugging 100

extern 215

function 84

purpose 93

requirement 94

this 70

thread

join() 196

packaged_task 203

task and 196

<thread> 109, 196

thread_local 216

time 179

timeline, C++ 208

time_point 179

timing, clock 200

to hardware, mapping 16

transform_reduce() 189

translation unit 32

try

block 36

block as function body 141

try-block, RAII and 40

try-statement, RAII and 36

tuple 174

and structured binding 174

type 5

abstract 54

argument 82

concrete 48

conversion, explicit 53

function 181

fundamental 5

get<>() by 174

move-only 167

of string literal 113

parameterized 79

polymorphic 54

predicate 183

size of 6

typename 79, 152

<type_traits> 183

typing, duck 104

U

\U, regex 119

\u, regex 119

udl 75

Unicode string 114

uniform_int_distribution 191

uninitialized 8

unique_copy() 149, 156

unique_lock 200201

and scoped_lock 201

unique_ptr 62, 164

unordered_map 144, 146

hash<> 76

map and 146

<unordered_map> 109

unordered_multimap 146

unordered_multiset 146

unordered_set 146

unsigned 5

UnsignedIntegral 158

upper, regex 119

user-defined

literal 75, 215

operator 51

using

alias 90

-declaration 34

-directive 35

usual arithmetic conversions 7

<utility> 109, 173174

V

valarray 192

<valarray> 192

value 5

argument 82

key and 144

mapped type 144

return, function 66

value_type 90

valuetype 147

variable 5

variadic template 100

variant 175

Vec

example 141

range checking 140

vector arithmetic 192

vector 138, 146

array vs. 171

<vector> 109

vector<bool> 170

vectorized 161

View 160

virtual 54

destructor 59

function, implementation of 56

function table vtbl 56

pure 54

void

* 221

* assignment, difference from C 221

return type 3

vtbl, virtual function table 56

W

w, regex 119

\w, regex 119

\W, regex 119

wait(), condition_variable 201

WeaklyEqualityComparable 158

WG21 208

while statement 14

X

X3J16 212

xdigit, regex 119

Z

zero, rule of 67