I
索引
知识有两种。
我们自己知道一个问题,
或者我们知道在哪里
我们能够找到关于这个问题的资料。
—— 塞缪尔·约翰逊1
Token
!="string literal 3$,regex117%%=, operator 7&&&, rvalue reference 71(,regex117(), call operator 85(?, pattern 120),regex117**=, scaling operator 7*?lazy 118+++, increment operator 7+=+?lazy 118-, minus operator 6--decrement operator 7.,regex117/, divide operator 6//comment 2/=, scaling operator 7: public55<<75- output operator 3
 
<=<=
==>>=>>75templatearguments 215
?,regex117??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
 alignas215alignof215- allocation 51
 - allocator 
new, container 178 - almost container 170
 alnum,regex119alpha,regex119[[:alpha:]], letter 119- ANSI C++ 212
 any177- append 
+=,string112 - argument
 - arithmetic
 - ARM 212
 - array
 array171<array>109asin()188- assembler 210
 assert()40- assertion 
static_assert40 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_access176- base and derived 
class55 basic_string114- 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,
bitsetand 172 bitset172blank,regex119- block
 - body,function 2
 - book for beginner 1
 bool5Boolean,concept 158BoundedRange,concept 160break15
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_dependency215- cast 53
 catchcatch(...)141ceil()188char5- character sets, multiple 114
 - check
 - checking, cost of range 142
 chrono,namespace179<chrono>109, 179, 200class48
- Classic C 219
 - C-library header 100
 clocktiming 200<cmath>109, 188cntrl,regex119- code complexity, function and 4
 - comment, 
//2 Common,concept 158CommonReference,concept 158common_type_t158- communication, task 202
 - comparison 74
 - compatibility, C and C++ 218
 - compilation
 - compiler 2
 - compile-time
 - complete encapsulation 66
 complex49, 190<complex>109, 188, 190- complexity, function and code 4
 - components
 - computation, compile-time 181
 - concatenation 
+,string111 - concept 81, 94
Assignable158- based overloading 95
 BidirectionalIterator159BidirectionalRange160Boolean158BoundedRange160Common158CommonReference158Constructible158ConvertibleTo158Copyable158CopyConstructible158DefaultConstructible158DerivedFrom158Destructible158EqualityComparable158ForwardIterator159ForwardRange160InputIterator159InputRange160Integral158Invocable159InvocableRegular159Iterator159Mergeable159Movable158MoveConstructible158OutputIterator159OutputRange160Permutable159Predicate159RandomAccessIterator159RandomAccessRange160Range157Range160Regular158Relation159Same158Semiregular158Sentinel159SignedIntegral158SizedRange160SizedSentinel159Sortable159StrictTotallyOrdered158StrictWeakOrder159- support 94
 Swappable158SwappableWith158UnsignedIntegral158- use 94
 View160WeaklyEqualityComparable158
 - concepts
 <concepts>, concepts in 158- concrete
 - concurrency 195
 - condition, declaration in 61
 condition_variable201<condition_variable>201const
const_iterator154- 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,regex119\d,regex119d,regex119- data race 196
 data(),array171- D&E 208
 - deadlock 199
 - deallocation 51
 - debugging 
template100 - declaration 5
 - -declaration, 
using34 - declarator operator 12
 decltype215- decrement operator 
--7 - deduction
 - default
 =default66DefaultConstructible,concept 158- definition
 - delegating constructor 215
 =delete67delete- deprecated
 deque146- derived 
class, base and 55 DerivedFrom,concept 158
Destructible, concept 158- destructor 51, 66
 - dictionary – see 
map - difference
 - digit, 
[[:digit:]]119 digit,regex119[[:digit:]]digit 119- -directive, 
using35 - dispatch, tag 181
 - distribution,
random191 - divide operator 
/6 - domain error 188
 double5- duck typing 104
 duration179duration_cast179- dynamic store 51
 dynamic_cast
E
EDOM188- element requirements
 - elision, copy 66
 emplace_back()147empty()147enable_if184- encapsulation, complete 66
 end()75, 143, 147, 150- engine, 
random191 enum,bitsetand 172- equal operator 
==6 - equality preserving 159
 EqualityComparable,concept 158equal_range()156, 173ERANGE188erase()143, 147errno188- error
 - error-code, exception vs 38
 - essential operations 66
 - evaluation
 - example
 - exception 35
 exclusive_scan()189- execution policy 161
 explicittype conversion 53explicitconstructor 67exponential_distribution191exportremoved 218expr()188- expression
 extern template215
F
fabs()188- facilities, standard library 108
 fail_fast170- feature, deprecated 218
 - features
 - file, header 31
 final216find()150, 156find_all()example 151find_if()155, 156first,pairmember 173floor()188fmod()188forforward()167- forwarding, perfect 168
 ForwardIterator, concept 159forward_list146- 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(),futuremember 202graph,regex119- 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
ifstatement 14- immutability
 - implementation
 - in-class member initialization 215
 #include31inclusive_scan()189- increment operator ++ 7
 - index,
get<>()by 174 - inheritance 55
 - inheriting constructor 216
 - initialization
 - initialize 52
array171
 - initializer
 - initializer-list constructor 52
 initializer_list52inline49namespace215
- inlining 49
 inner_product()189InputIterator,concept 159InputRange,concept 160insert()143, 147- instantiation 81
 - instruction, machine 16
 int5- 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_iterator154- iterator 75, 150
 Iterator, concept 159iterator143, 154<iterator>182- concepts in 158
 
iterator_category182iterator_traits181, 182iterator_type182
J
join(),thread196
K
L
\L,regex119\l,regex119- 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
 list142, 146- literal
 literals- local scope 9
 - lock, reader-writer 200
 log()188log10()188long long215lower,regex119
M
- machine instruction 16
 main()2- exception and 141
 
make_pair()173make_shared()166make_tuple()174make_unique()166- management, resource 72, 164
 
map144, 146- and 
unordered_map146 
- 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,
templatecompilation 104 - modern C++ 214
 modf()188- modularity 29
 modulesuport 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
 multimap146- multiple
 - multiply operator * 6
 multiset146mutex199<mutex>199
N
\n,newline 3- naked
 - namespace scope 9
 namespace34- narrowing
 - navigation, hierarchy 61
 new- container allocator 178
 - naked 52
 - operator 51
 - newline 
\n3 noexcept37noexcept()215- non-memory resource
 - non-standard library
 noreturn215normal_distribution- notation, regular expression 117
 - not-equal operator 
!=6 notify_one(),condition_variable202NULL 0,nullptr13nullptr13- number,random 191
 <numeric>189- numerical algorithm 189
 numeric_limits193
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
 delete51new51- overloaded 51
 - user-defined 51
 
- optimization, short-string 113
 optional176- order of evaluation 7
 ostream_iterator154out_of_range141- output
 OutputIterator,concept 159OutputRange,concept 160- overloaded operator 51
 - overloading
 override55- overview, container 146
 - ownership 164
 
P
packaged_taskthread203pair173par161- parallel algorithm 161
 - parameterized type 79
 partial_sum()189par_unseq161- passing data to task 197
 - pattern 116
 - perfect forwarding 168
 Permutable,concept 159- phone_bookexample 138
 - plus operator 
+6 pmr,namespace178- pointer 17
 - policy, execution 161
 - polymorphic type 54
 pow()188- precondition 37
 - predicate 86, 155
- type 183
 
 Predicate,concept 159print,regex119- procedural programming 2
 - program 2
 - programming
 promise- pronunciation, C++ 209
 punct,regex119- pure 
virtual54 - purpose, 
template93 push_back()52, 139, 143, 147push_front()143
R
R"116- race, data 196
 - RAII
 RAII52Rand_intexample 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(117alnum119alpha119blank119cntrl119d119\d119\D119digit119graph119\l119\L119lower119print119punct119- regular expression 116
 - repetition 118
 s119\S119\s119space119\U119\u119upper119w119\W119\w119xdigit119
 <regex>109, 116- regular expression 116
 
regex_iterator121regex_search116- regular
 Regular,concept 158reinterpret_cast53Relation,concept 159- remainder operator 
%6 - removed
 - repetition, 
regex118 replace()156string112
replace_if()156- requirement, 
template94 - 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
sliteral suffix 113\s,regex119s,regex119\S,regex119- safety,resource 72
 Same,concept 158- scaling
 - scope
 scoped_lock164scoped_lock()199- search, binary 156
 second,pairmember 173Semiregular,concept 158Sentinel,concept 159- separate compilation 30
 - sequence 150
- half-open 156
 
 set146<set>109set_exception(),promisemember202set_value(),promisemember202shared_lock200shared_mutex200shared_ptr164- sharing data task 199
 - short-string optimization 113
 SignedIntegral,concept 158- SIMD 161
 - Simula 207
 sin()188- singly-linked list, 
forward_list143 sinh()188- size of type 6
 size()75, 147array171
SizedRange,concept 160SizedSentinel,concept 159sizeof6sizeof()181size_t90- smart pointer 164
 smatch116sort()149, 156- container 181
 
Sortable, concept 159space,regex119span- special mathematical functions 188
 - specialized container 170
 sphbessel()188sqrt()188<sstream>109- standard
 - standardization, C++ 212
 - state, moved-from 168
 - statement
 static_assert193- assertion 40
 
static_cast53std<stdexcept>109- STL 211
 - store
 StrictTotallyOrdered,concept 158StrictWeakOrder,concept 159- string
 string111<string>109, 111
string_literals,literals113string_span170string_view114- and 
span168 
- and 
 string_view_literals,literals115- structured
 - subclass, superclass and 55
 []subscripting 147substr(),string112- suffix 75
 - superclass and subclass 55
 - suport,
module32 - support, concept 94
 svliteral suffix 115swap()76Swappable, concept 158SwappableWith,concept 158switchstatement 14synchronized_pool_resource178
T
- table, hash 144
 - tag dispatch 181
 tanh()188- task
 - TC++PL 208
 template79this70thread<thread>109, 196thread_local216- time 179
 - timeline, C++ 208
 time_point179- timing,
clock200 - to hardware, mapping 16
 transform_reduce()189- translation unit 32
 trytry-block, RAII and 40try-statement, RAII and 36tuple174- and structured binding 174
 
- type 5
 typename79, 152<type_traits>183- typing, duck 104
 
U
\U,regex119\u,regex119- udl 75
 - Unicode string 114
 uniform_int_distribution191- uninitialized 8
 unique_copy()149, 156unique_lock200, 201- and 
scoped_lock201 
- and 
 unique_ptr62, 164unordered_map144, 146<unordered_map>109unordered_multimap146unordered_multiset146unordered_set146unsigned5UnsignedIntegral,concept 158
upper,regex119- use, concept 94
 - user-defined
 using- usual arithmetic conversions 7
 <utility>109, 173, 174
V
valarray192<valarray>192- value 5
 valuetype147value_type90- variable 5
 - variadic 
template100 variant175Vec- vector arithmetic 192
 vector138, 146arrayvs. 171
<vector>109vector<bool>170- vectorized 161
 View,concept 160virtual54voidvtbl,virtualfunction table 56
W
w,regex119\w,regex119\W,regex119wait(),condition_variable201WeaklyEqualityComparable,concept 158- WG21 208
 whilestatement 14
X
Z
- zero, rule of 67
 
1. 出自上海三联书店于2006年9月出版的《约翰逊博士传》,(英)詹姆斯·鲍斯威尔著,王增澄 史美骅 译,(ISBN 7542623036)177页第一行。 —— 译者注 ↩