I
索引
知识有两种。
我们自己知道一个问题,
或者我们知道在哪里
我们能够找到关于这个问题的资料。
—— 塞缪尔·约翰逊1
Token
!=
"
string literal 3$
,regex
117%
%=
, operator 7&
&&
, rvalue reference 71(
,regex
117()
, call operator 85(?
, pattern 120)
,regex
117*
*=
, scaling operator 7*?
lazy 118+
++
, increment operator 7+=
+?
lazy 118-
, minus operator 6--
decrement operator 7.
,regex
117/
, divide operator 6//
comment 2/=
, scaling operator 7: public
55<<
75- output operator 3
<=
<
=
==
>
>=
>>
75template
arguments 215
?
,regex
117??
lazy 118[
,regex 117[]
\
,backslash 3]
,regex 117^
,regex 117{
,regex 117{}
{}?
lazy 118|
,regex 117}
,regex 117~
,destructor 510
A
abs()
188- abstract
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
<algorithm>
109, 156- alias
alignas
215alignof
215- allocation 51
- allocator
new
, container 178 - almost container 170
alnum
,regex
119alpha
,regex
119[[:alpha:]]
, letter 119- ANSI C++ 212
any
177- append
+=
,string
112 - argument
- arithmetic
- ARM 212
- array
array
171<array>
109asin()
188- assembler 210
assert()
40- assertion
static_assert
40 Assignable
,concept 158- assignment
- associative array - see
map
async()
launch 204at()
141atan()
188atan2()
188- AT&T Bell Laboratories 212
auto=
8auto_ptr
,deprecated 218
B
back_inser ter()
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
BidirectionalIterator
,concept 159BidirectionalRange
,concept 160- binary search 156
- binding, structured 45
- bit-field,
bitset
and 172 bitset
172blank
,regex
119- block
- body,function 2
- book for beginner 1
bool
5Boolean
,concept 158BoundedRange
,concept 160break
15
C
- C 209
- C++
- C++03 212
- C++0x, C++11 209, 212
- C++11
- C++14 213
- C++17 1, 213
- C++20 1, 157, 213
- 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
catch(...)
141ceil()
188char
5- character sets, multiple 114
- check
- checking, cost of range 142
chrono
,namespace
179<chrono>
109, 179, 200class
48
- Classic C 219
- C-library header 100
clock
timing 200<cmath>
109, 188cntrl
,regex
119- code complexity, function and 4
- comment,
//
2 Common
,concept 158CommonReference
,concept 158common_type_t
158- communication, task 202
- comparison 74
- compatibility, C and C++ 218
- compilation
- compiler 2
- compile-time
- complete encapsulation 66
complex
49, 190<complex>
109, 188, 190- complexity, function and code 4
- components
- computation, compile-time 181
- concatenation
+
,string
111 - concept 81, 94
Assignable
158- based overloading 95
BidirectionalIterator
159BidirectionalRange
160Boolean
158BoundedRange
160Common
158CommonReference
158Constructible
158ConvertibleTo
158Copyable
158CopyConstructible
158DefaultConstructible
158DerivedFrom
158Destructible
158EqualityComparable
158ForwardIterator
159ForwardRange
160InputIterator
159InputRange
160Integral
158Invocable
159InvocableRegular
159Iterator
159Mergeable
159Movable
158MoveConstructible
158OutputIterator
159OutputRange
160Permutable
159Predicate
159RandomAccessIterator
159RandomAccessRange
160Range
157Range
160Regular
158Relation
159Same
158Semiregular
158Sentinel
159SignedIntegral
158SizedRange
160SizedSentinel
159Sortable
159StrictTotallyOrdered
158StrictWeakOrder
159- support 94
Swappable
158SwappableWith
158UnsignedIntegral
158- use 94
View
160WeaklyEqualityComparable
158
- concepts
<concepts>
, concepts in 158- concrete
- concurrency 195
- condition, declaration in 61
condition_variable
201<condition_variable>
201const
const_iterator
154- constrained
- Constructible,concept 158
- constructor
- container 51, 79, 137
- contents-of operator
*
11 - contract 40
- contracts, C++20 40
- conversion 67
- conversions, usual arithmetic 7
- ConvertibleTo,concept 158
- copy 68
copy()
156Copyable
,concept 158CopyConstructible
,concept 158copy_if()
156- Core Guidelines, C++ 214
- core language, C++ 2
- coroutine 211
cos()
188cosh()
188- cost
count()
156count_if()
155, 156cout
,output 3<cstdlib>
110- C-style
D
\D
,regex
119\d
,regex
119d
,regex
119- data race 196
data()
,array
171- D&E 208
- deadlock 199
- deallocation 51
- debugging
template
100 - declaration 5
- -declaration,
using
34 - declarator operator 12
decltype
215- decrement operator
--
7 - deduction
- default
=default
66DefaultConstructible
,concept 158- definition
- delegating constructor 215
=delete
67delete
- deprecated
deque
146- derived
class
, base and 55 DerivedFrom
,concept 158
Destructible
, concept 158- destructor 51, 66
- dictionary – see
map
- difference
- 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
179duration_cast
179- dynamic store 51
dynamic_cast
E
EDOM
188- element requirements
- elision, copy 66
emplace_back()
147empty()
147enable_if
184- encapsulation, complete 66
end()
75, 143, 147, 150- engine,
random
191 enum
,bitset
and 172- equal operator
==
6 - equality preserving 159
EqualityComparable
,concept 158equal_range()
156, 173ERANGE
188erase()
143, 147errno
188- error
- error-code, exception vs 38
- essential operations 66
- evaluation
- example
- exception 35
exclusive_scan()
189- execution policy 161
explicit
type conversion 53explicit
constructor 67exponential_distribution
191export
removed 218expr()
188- expression
extern template
215
F
fabs()
188- facilities, standard library 108
fail_fast
170- feature, deprecated 218
- features
- file, header 31
final
216find()
150, 156find_all()
example 151find_if()
155, 156first
,pair
member 173floor()
188fmod()
188for
forward()
167- forwarding, perfect 168
ForwardIterator
, concept 159forward_list
146- singly-linked list 143
<forward_list>
109ForwardRange
, concept 160- free store 51
frexp()
188<fstream>
109
G
- garbagecollection 73
- generic programming 93, 210
get<>()
get()
,future
member 202graph
,regex
119- greater-than operator
>
6 - greater-than-or-equal operator
>=
6 - greedy match 118, 121
- grouping,
{}
2 gsl
- 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
- implementation
- in-class member initialization 215
#include
31inclusive_scan()
189- increment operator ++ 7
- index,
get<>()
by 174 - inheritance 55
- inheriting constructor 216
- initialization
- initialize 52
array
171
- initializer
- initializer-list constructor 52
initializer_list
52inline
49namespace
215
- inlining 49
inner_product()
189InputIterator
,concept 159InputRange
,concept 160insert()
143, 147- instantiation 81
- instruction, machine 16
int
5- output bits of 172
Integral
,concept 158
- interface
- invariant 37
- and constructor 37
Invocable
, concept 159InvocableRegular
, concept 159- I/O, iterator and 154
<ios>
109<iostream>
3, 109iota()
189- is
- ISO
- ISO-14882 212
istream_iterator
154- iterator 75, 150
Iterator
, concept 159iterator
143, 154<iterator>
182- concepts in 158
iterator_category
182iterator_traits
181, 182iterator_type
182
J
join()
,thread
196
K
L
\L
,regex
119\l
,regex
119- lambda
- language
- launch,
async()
204 - lazy
ldexp()
188- leak, resource 62, 72, 164
- less-than operator
<
6 - less-than-or-equal operator
<=
6 - letter,
[[:alpha:]]
119 - library
- lifetime, scope and 9
- lifting algorithm 100
<limits>
181, 193- linker 2
- list
list
142, 146- literal
literals
- local scope 9
- lock, reader-writer 200
log()
188log10()
188long long
215lower
,regex
119
M
- machine instruction 16
main()
2- exception and 141
make_pair()
173make_shared()
166make_tuple()
174make_unique()
166- management, resource 72, 164
map
144, 146- and
unordered_map
146
- and
<map>
109- mapped type, value 144
- mapping to hardware 16
- match
- mathematical
<math.h>
188- Max Munch rule 118
- meaning, C++ 209
- member
- memberwise copy 66
mem_fn()
180- memory 73
- address 16
<memory>
109, 164, 166merge()
156Mergeable
,concept 159- minus operator - 6
- model,
template
compilation 104 - modern C++ 214
modf()
188- modularity 29
module
suport 32- modules, C++20 32
- modulus operator
%
6 Movable
,concept 158- move 71
move()
72, 156, 167MoveConstructible
,concept 158- moved-from
- move-only type 167
- multi-line pattern 117
multimap
146- multiple
- multiply operator * 6
multiset
146mutex
199<mutex>
199
N
\n
,newline 3- naked
- namespace scope 9
namespace
34- narrowing
- navigation, hierarchy 61
new
- container allocator 178
- naked 52
- operator 51
- newline
\n
3 noexcept
37noexcept()
215- non-memory resource
- non-standard library
noreturn
215normal_distribution
- notation, regular expression 117
- not-equal operator
!=
6 notify_one()
,condition_variable
202NULL 0
,nullptr
13nullptr
13- number,random 191
<numeric>
189- numerical algorithm 189
numeric_limits
193
O
--
,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
51new
51- overloaded 51
- user-defined 51
- optimization, short-string 113
optional
176- order of evaluation 7
ostream_iterator
154out_of_range
141- output
OutputIterator
,concept 159OutputRange
,concept 160- overloaded operator 51
- overloading
override
55- overview, container 146
- ownership 164
P
packaged_task
thread
203pair
173par
161- parallel algorithm 161
- parameterized type 79
partial_sum()
189par_unseq
161- passing data to task 197
- pattern 116
- perfect forwarding 168
Permutable
,concept 159- phone_bookexample 138
- plus operator
+
6 pmr
,namespace
178- pointer 17
- policy, execution 161
- polymorphic type 54
pow()
188- precondition 37
- predicate 86, 155
- type 183
Predicate
,concept 159print
,regex
119- procedural programming 2
- program 2
- programming
promise
- pronunciation, C++ 209
punct
,regex
119- pure
virtual
54 - purpose,
template
93 push_back()
52, 139, 143, 147push_front()
143
R
R"
116- race, data 196
- RAII
RAII
52Rand_int
example 191- random number 191
random
<random>
109, 191RandomAccessIterator
,concept 159RandomAccessRange
,concept 160- range
Range
<ranges>
157<ranges>
, concepts in 158- raw string literal 116
- reader-writer lock 200
- recovery,error 38
reduce()
189- reference 17
- regex
*
117}
117{
117)
117|
117]
117[
117ˆ
117?
117.
117$
117+
117(
117alnum
119alpha
119blank
119cntrl
119d
119\d
119\D
119digit
119graph
119\l
119\L
119lower
119print
119punct
119- regular expression 116
- repetition 118
s
119\S
119\s
119space
119\U
119\u
119upper
119w
119\W
119\w
119xdigit
119
<regex>
109, 116- regular expression 116
regex_iterator
121regex_search
116- regular
Regular
,concept 158reinterpret_cast
53Relation
,concept 159- remainder operator
%
6 - removed
- repetition,
regex
118 replace()
156string
112
replace_if()
156- requirement,
template
94 - requirements, element 140
- requires] expression 96
reserve()
139, 147resize()
147- resource
- rethrow 38
- return
return
- returning results from task 198
return
-type deduction 44- return-values, multiple 44
riemanzeta()
188- rule
- run-time
- rvalue
S
s
literal suffix 113\s
,regex
119s
,regex
119\S
,regex
119- safety,resource 72
Same
,concept 158- scaling
- scope
scoped_lock
164scoped_lock()
199- search, binary 156
second
,pair
member 173Semiregular
,concept 158Sentinel
,concept 159- separate compilation 30
- sequence 150
- half-open 156
set
146<set>
109set_exception()
,promisemember
202set_value()
,promisemember
202shared_lock
200shared_mutex
200shared_ptr
164- sharing data task 199
- short-string optimization 113
SignedIntegral
,concept 158- SIMD 161
- Simula 207
sin()
188- singly-linked list,
forward_list
143 sinh()
188- size of type 6
size()
75, 147array
171
SizedRange
,concept 160SizedSentinel
,concept 159sizeof
6sizeof()
181size_t
90- smart pointer 164
smatch
116sort()
149, 156- container 181
Sortable
, concept 159space
,regex
119span
- special mathematical functions 188
- specialized container 170
sphbessel()
188sqrt()
188<sstream>
109- standard
- standardization, C++ 212
- state, moved-from 168
- statement
static_assert
193- assertion 40
static_cast
53std
<stdexcept>
109- STL 211
- store
StrictTotallyOrdered
,concept 158StrictWeakOrder
,concept 159- string
string
111<string>
109, 111
string_literals
,literals
113string_span
170string_view
114- and
span
168
- and
string_view_literals
,literals
115- structured
- subclass, superclass and 55
[]
subscripting 147substr()
,string
112- suffix 75
- superclass and subclass 55
- suport,
module
32 - support, concept 94
sv
literal suffix 115swap()
76Swappable
, concept 158SwappableWith
,concept 158switch
statement 14synchronized_pool_resource
178
T
- table, hash 144
- tag dispatch 181
tanh()
188- task
- TC++PL 208
template
79this
70thread
<thread>
109, 196thread_local
216- time 179
- timeline, C++ 208
time_point
179- timing,
clock
200 - to hardware, mapping 16
transform_reduce()
189- translation unit 32
try
try
-block, RAII and 40try
-statement, RAII and 36tuple
174- and structured binding 174
- type 5
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, 156unique_lock
200, 201- and
scoped_lock
201
- and
unique_ptr
62, 164unordered_map
144, 146<unordered_map>
109unordered_multimap
146unordered_multiset
146unordered_set
146unsigned
5UnsignedIntegral
,concept 158
upper
,regex
119- use, concept 94
- user-defined
using
- usual arithmetic conversions 7
<utility>
109, 173, 174
V
valarray
192<valarray>
192- value 5
valuetype
147value_type
90- variable 5
- variadic
template
100 variant
175Vec
- vector arithmetic 192
vector
138, 146array
vs. 171
<vector>
109vector<bool>
170- vectorized 161
View
,concept 160virtual
54void
vtbl
,virtual
function table 56
W
w
,regex
119\w
,regex
119\W
,regex
119wait()
,condition_variable
201WeaklyEqualityComparable
,concept 158- WG21 208
while
statement 14
X
Z
- zero, rule of 67
1. 出自上海三联书店于2006年9月出版的《约翰逊博士传》,(英)詹姆斯·鲍斯威尔著,王增澄 史美骅 译,(ISBN 7542623036)177页第一行。 —— 译者注 ↩