| About the Authors |
|
xv | |
| About the Technical Reviewer |
|
xvii | |
| Introduction |
|
xix | |
| Chapter 1 Numerics and Math |
|
1 | (28) |
|
Common Mathematical Functions <cmath> |
|
|
1 | (4) |
|
|
|
1 | (1) |
|
Exponential and Logarithmic Functions |
|
|
2 | (1) |
|
|
|
2 | (1) |
|
Trigonometric and Hyperbolic Functions |
|
|
3 | (1) |
|
Integral Rounding of Floating-Point Numbers |
|
|
3 | (1) |
|
Floating-Point Manipulation Functions |
|
|
3 | (1) |
|
Classification and Comparison Functions |
|
|
4 | (1) |
|
|
|
4 | (1) |
|
|
|
5 | (1) |
|
Special Mathematical Functions C++17 <cmath> |
|
|
5 | (4) |
|
|
|
6 | (1) |
|
|
|
7 | (1) |
|
|
|
7 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (1) |
|
Minimum, Maximum, and Clamping <algorithm> |
|
|
9 | (1) |
|
Fixed-Width Integer Types <cstdint> |
|
|
10 | (1) |
|
Arithmetic Type Properties <limits> |
|
|
11 | (2) |
|
Complex Numbers <complex> |
|
|
13 | (1) |
|
Compile-Time Rational Numbers <ratio> |
|
|
14 | (1) |
|
|
|
15 | (8) |
|
|
|
15 | (3) |
|
Random Number Distributions |
|
|
18 | (5) |
|
Numeric Arrays <valarray> |
|
|
23 | (6) |
|
|
|
24 | (1) |
|
|
|
25 | (1) |
|
|
|
26 | (1) |
|
|
|
27 | (2) |
| Chapter 2 General Utilities |
|
29 | (44) |
|
Moving, Forwarding, Swapping <utility> |
|
|
29 | (4) |
|
|
|
29 | (2) |
|
|
|
31 | (1) |
|
|
|
32 | (1) |
|
|
|
33 | (1) |
|
|
|
33 | (2) |
|
|
|
34 | (1) |
|
std::byte C++17 <cstddef> |
|
|
35 | (1) |
|
Relational Operators <utility> |
|
|
36 | (1) |
|
|
|
36 | (6) |
|
Exclusive Ownership Pointers |
|
|
36 | (3) |
|
Shared Ownership Pointers |
|
|
39 | (3) |
|
Function Objects <functional> |
|
|
42 | (5) |
|
|
|
43 | (1) |
|
|
|
43 | (1) |
|
Binding Function Arguments |
|
|
44 | (1) |
|
Negating a Callable C++17 |
|
|
45 | (1) |
|
Generic Function Wrappers |
|
|
45 | (1) |
|
Functors for Class Members |
|
|
46 | (1) |
|
Initializer Lists <initializer_list> |
|
|
47 | (1) |
|
|
|
48 | (8) |
|
|
|
48 | (2) |
|
|
|
50 | (5) |
|
|
|
55 | (1) |
|
Date and Time Utilities <chrono> |
|
|
56 | (6) |
|
|
|
57 | (1) |
|
|
|
58 | (1) |
|
|
|
59 | (1) |
|
C-Style Date and Time Utilities <ctime> |
|
|
60 | (2) |
|
|
|
62 | (9) |
|
Runtime Type Identification <typeinfo>, <typeindex> |
|
|
62 | (1) |
|
Type Traits <type_traits> |
|
|
63 | (7) |
|
Type Operations <utility> |
|
|
70 | (1) |
|
|
|
71 | (2) |
|
std::invoke C++17 <functional> |
|
|
71 | (1) |
|
|
|
72 | (1) |
| Chapter 3 Containers |
|
73 | (40) |
|
|
|
73 | (3) |
|
|
|
74 | (1) |
|
Non-member Functions to Get Iterators |
|
|
75 | (1) |
|
Non-member Operations on Iterators |
|
|
76 | (1) |
|
|
|
76 | (13) |
|
|
|
76 | (7) |
|
|
|
83 | (1) |
|
|
|
84 | (1) |
|
std::list and std::forward_list <list>, <forward_list> |
|
|
84 | (2) |
|
Sequential Containers Reference |
|
|
86 | (3) |
|
|
|
89 | (2) |
|
|
|
90 | (1) |
|
|
|
90 | (1) |
|
|
|
91 | (2) |
|
|
|
91 | (1) |
|
std::priority_queue <queue> |
|
|
91 | (1) |
|
|
|
92 | (1) |
|
|
|
92 | (1) |
|
|
|
93 | (1) |
|
Ordered Associative Containers |
|
|
93 | (10) |
|
|
|
94 | (1) |
|
|
|
95 | (3) |
|
|
|
98 | (1) |
|
std::set and std::multiset <set> |
|
|
98 | (1) |
|
|
|
98 | (1) |
|
|
|
99 | (1) |
|
Moving Nodes Between Containers C++17 |
|
|
100 | (1) |
|
|
|
100 | (1) |
|
|
|
101 | (1) |
|
|
|
101 | (2) |
|
Unordered Associative Containers <unordered_map>, <unordered_set> |
|
|
103 | (5) |
|
|
|
104 | (1) |
|
|
|
104 | (1) |
|
|
|
104 | (2) |
|
|
|
106 | (1) |
|
|
|
106 | (2) |
|
|
|
108 | (5) |
|
Polymorphic Allocators C++17 <memory_resource> |
|
|
108 | (3) |
|
Allocators for Multilevel Containers <scoped_allocator> |
|
|
111 | (2) |
| Chapter 4 Algorithms |
|
113 | (28) |
|
Input and Output Iterators |
|
|
113 | (1) |
|
|
|
114 | (1) |
|
|
|
114 | (1) |
|
|
|
115 | (1) |
|
|
|
115 | (17) |
|
Applying a Function to a Range |
|
|
115 | (2) |
|
Checking for the Presence of Elements |
|
|
117 | (1) |
|
|
|
117 | (1) |
|
|
|
118 | (1) |
|
|
|
119 | (1) |
|
|
|
120 | (1) |
|
|
|
121 | (1) |
|
|
|
122 | (1) |
|
|
|
123 | (1) |
|
|
|
124 | (1) |
|
|
|
125 | (1) |
|
|
|
126 | (1) |
|
|
|
127 | (1) |
|
|
|
128 | (1) |
|
Operations on Sorted Ranges |
|
|
129 | (1) |
|
|
|
130 | (1) |
|
|
|
131 | (1) |
|
Numeric Algorithms <numeric> |
|
|
132 | (3) |
|
|
|
132 | (1) |
|
|
|
133 | (1) |
|
|
|
134 | (1) |
|
|
|
135 | (1) |
|
Algorithms for Uninitialized Memory <memory> |
|
|
135 | (1) |
|
Parallel Algorithms C++17 <execution> |
|
|
136 | (2) |
|
|
|
137 | (1) |
|
Parallel Unsequenced Execution |
|
|
138 | (1) |
|
Iterator Adaptors <iterator> |
|
|
138 | (3) |
| Chapter 5 Input/Output |
|
141 | (48) |
|
Input/Output with Streams |
|
|
141 | (12) |
|
|
|
142 | (1) |
|
Formatting Methods (std::ios_base) dos> |
|
|
143 | (2) |
|
I/O Manipulators dos>, <iomanip> |
|
|
145 | (1) |
|
|
|
146 | (1) |
|
|
|
147 | (2) |
|
|
|
149 | (2) |
|
|
|
151 | (2) |
|
|
|
153 | (1) |
|
|
|
153 | (2) |
|
|
|
154 | (1) |
|
|
|
155 | (1) |
|
|
|
156 | (1) |
|
|
|
156 | (4) |
|
Custom << and >> Operators |
|
|
156 | (1) |
|
Custom I/O Manipulators dos> |
|
|
157 | (3) |
|
Stream Iterators <iterator> |
|
|
160 | (1) |
|
|
|
160 | (1) |
|
|
|
160 | (1) |
|
Stream Buffers <streambuf> |
|
|
161 | (1) |
|
File Systems <filesystem> |
|
|
162 | (18) |
|
Files, Paths, and Pathnames |
|
|
162 | (1) |
|
|
|
163 | (1) |
|
|
|
164 | (4) |
|
|
|
168 | (1) |
|
|
|
169 | (1) |
|
The Current Working Directory |
|
|
170 | (1) |
|
Absolute and Relative Paths |
|
|
170 | (2) |
|
|
|
172 | (1) |
|
|
|
172 | (4) |
|
Creating, Copying, Deleting, and Renaming |
|
|
176 | (1) |
|
File Sizes and Free Space |
|
|
177 | (1) |
|
|
|
178 | (2) |
|
C-Style File Utilities <cstdio> |
|
|
180 | (1) |
|
C-Style Output and Input <cstdio> |
|
|
181 | (8) |
|
|
|
181 | (4) |
|
|
|
185 | (4) |
| Chapter 6 Characters and Strings |
|
189 | (42) |
|
|
|
189 | (5) |
|
|
|
190 | (1) |
|
|
|
191 | (1) |
|
|
|
192 | (1) |
|
|
|
192 | (1) |
|
|
|
193 | (1) |
|
|
|
193 | (1) |
|
String Views C++17 <string_view> |
|
|
194 | (1) |
|
Character Classification <cctype>, <cwctype> |
|
|
195 | (2) |
|
Character-Encoding Conversion <locale>, <codecvt> |
|
|
197 | (3) |
|
|
|
200 | (14) |
|
|
|
200 | (1) |
|
|
|
201 | (1) |
|
Basic std::locale Members |
|
|
202 | (1) |
|
|
|
202 | (8) |
|
Combining and Customizing Locales |
|
|
210 | (3) |
|
|
|
213 | (1) |
|
Regular Expressions <regex> |
|
|
214 | (12) |
|
The ECMAScript Regular Expression Grammar |
|
|
214 | (2) |
|
Regular Expression Objects |
|
|
216 | (2) |
|
Matching and Searching Patterns |
|
|
218 | (3) |
|
|
|
221 | (2) |
|
|
|
223 | (3) |
|
|
|
226 | (5) |
|
Convenient Conversion Functions <string> |
|
|
227 | (2) |
|
High-Performance Conversion Functions C++17 <charconv> |
|
|
229 | (2) |
| Chapter 7 Concurrency |
|
231 | (26) |
|
|
|
231 | (3) |
|
|
|
231 | (1) |
|
|
|
232 | (1) |
|
|
|
232 | (1) |
|
|
|
233 | (1) |
|
|
|
233 | (1) |
|
|
|
234 | (4) |
|
|
|
234 | (1) |
|
|
|
235 | (2) |
|
|
|
237 | (1) |
|
|
|
238 | (7) |
|
|
|
238 | (1) |
|
|
|
239 | (2) |
|
|
|
241 | (3) |
|
|
|
244 | (1) |
|
|
|
244 | (1) |
|
Calling a Function Once <mutex> |
|
|
245 | (1) |
|
Condition Variables <condition_variable> |
|
|
246 | (2) |
|
|
|
246 | (1) |
|
|
|
247 | (1) |
|
|
|
248 | (1) |
|
L1 Data Cache Line Size C++17 <new> |
|
|
248 | (1) |
|
|
|
249 | (1) |
|
Atomic Operations <atomic> |
|
|
250 | (7) |
|
|
|
250 | (5) |
|
|
|
255 | (1) |
|
Non-member Functions and Macros |
|
|
255 | (1) |
|
|
|
255 | (2) |
| Chapter 8 Diagnostics |
|
257 | (14) |
|
|
|
257 | (1) |
|
Exceptions <exception>, <stdexcept> |
|
|
258 | (1) |
|
Exception Pointers <exception> |
|
|
259 | (1) |
|
Nested Exceptions <exception> |
|
|
260 | (2) |
|
System Errors <system_error> |
|
|
262 | (2) |
|
|
|
263 | (1) |
|
|
|
263 | (1) |
|
|
|
264 | (1) |
|
|
|
264 | (1) |
|
Failure Handling <exception> |
|
|
265 | (6) |
|
std::uncaught_exceptions() C++17 |
|
|
265 | (1) |
|
|
|
266 | (5) |
| Appendix: Standard Library Headers |
|
271 | (8) |
|
Numerics and Math (Chapter 1) |
|
|
271 | (1) |
|
General Utilities (Chapter 2) |
|
|
272 | (1) |
|
|
|
273 | (1) |
|
|
|
274 | (1) |
|
|
|
274 | (1) |
|
Characters and Strings (Chapter 6) |
|
|
275 | (1) |
|
|
|
276 | (1) |
|
|
|
277 | (1) |
|
|
|
277 | (2) |
| Index |
|
279 | |