Table of Contents for
A Tour of C++
Close
Version ebook
/
Retour
A Tour of C++
by Bjarne Stroustrup
Published by Addison-Wesley Professional, 2018
Contents
Cover
About This eBook
A Tour of C++
Title Page
Copyright Page
Contents
Preface
1 The Basics
2 User-Defined Types
3 Modularity
4 Classes
5 Essential Operations
6 Templates
7 Concepts and Generic Programming
8 Library Overview
9 Strings and Regular Expressions
10 Input and Output
11 Containers
12 Algorithms
13 Utilities
14 Numerics
15 Concurrency
16 History and Compatibility
Index
A Tour of C++
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Code Snippets
Contents
Cover
About This eBook
Title Page
Copyright Page
Contents
Preface
Acknowledgments
1 The Basics
1.1 Introduction
1.2 Programs
1.3 Functions
1.4 Types, Variables, and Arithmetic
1.5 Scope and Lifetime
1.6 Constants
1.7 Pointers, Arrays, and References
1.8 Tests
1.9 Mapping to Hardware
1.10 Advice
2 User-Defined Types
2.1 Introduction
2.2 Structures
2.3 Classes
2.4 Unions
2.5 Enumerations
2.6 Advice
3 Modularity
3.1 Introduction
3.2 Separate Compilation
3.3 Modules (C++20)
3.4 Namespaces
3.5 Error Handling
3.6 Function Arguments and Return Values
3.7 Advice
4 Classes
4.1 Introduction
4.2 Concrete Types
4.3 Abstract Types
4.4 Virtual Functions
4.5 Class Hierarchies
4.6 Advice
5 Essential Operations
5.1 Introduction
5.2 Copy and Move
5.3 Resource Management
5.4 Conventional Operations
5.5 Advice
6 Templates
6.1 Introduction
6.2 Parameterized Types
6.3 Parameterized Operations
6.4 Template Mechanisms
6.5 Advice
7 Concepts and Generic Programming
7.1 Introduction
7.2 Concepts
7.3 Generic Programming
7.4 Variadic Templates
7.5 Template Compilation Model
7.6 Advice
8 Library Overview
8.1 Introduction
8.2 Standard-Library Components
8.3 Standard-Library Headers and Namespace
8.4 Advice
9 Strings and Regular Expressions
9.1 Introduction
9.2 Strings
9.3 String Views
9.4 Regular Expressions
9.5 Advice
10 Input and Output
10.1 Introduction
10.2 Output
10.3 Input
10.4 I/O State
10.5 I/O of User-Defined Types
10.6 Formatting
10.7 File Streams
10.8 String Streams
10.9 C-style I/O
10.10 File System
10.11 Advice
11 Containers
11.1 Introduction
11.2 vector
11.3 list
11.4 map
11.5 unordered_map
11.6 Container Overview
11.7 Advice
12 Algorithms
12.1 Introduction
12.2 Use of Iterators
12.3 Iterator Types
12.4 Stream Iterators
12.5 Predicates
12.6 Algorithm Overview
12.7 Concepts (C++20)
12.8 Container Algorithms
12.9 Parallel Algorithms
12.10 Advice
13 Utilities
13.1 Introduction
13.2 Resource Management
13.3 Range Checking: span
13.4 Specialized Containers
13.5 Alternatives
13.6 Allocators
13.7 Time
13.8 Function Adaption
13.9 Type Functions
13.10 Advice
14 Numerics
14.1 Introduction
14.2 Mathematical Functions
14.3 Numerical Algorithms
14.4 Complex Numbers
14.5 Random Numbers
14.6 Vector Arithmetic
14.7 Numeric Limits
14.8 Advice
15 Concurrency
15.1 Introduction
15.2 Tasks and threads
15.3 Passing Arguments
15.4 Returning Results
15.5 Sharing Data
15.6 Waiting for Events
15.7 Communicating Tasks
15.8 Advice
16 History and Compatibility
16.1 History
16.2 C++ Feature Evolution
16.3 C/C++ Compatibility
16.4 Bibliography
16.5 Advice
Index
Code Snippets
ii
iii
iv
v
vi
vii
viii
ix
xi
xii
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
187
188
189
190
191
192
193
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
244