- tmp/tmpt9kjnsfe/{from.md → to.md} +118 -53
tmp/tmpt9kjnsfe/{from.md → to.md}
RENAMED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
## Expressions <a id="gram.expr">[[gram.expr]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
primary-expression:
|
| 5 |
literal
|
| 6 |
-
|
| 7 |
'(' expression ')'
|
| 8 |
id-expression
|
| 9 |
lambda-expression
|
| 10 |
fold-expression
|
|
|
|
| 11 |
```
|
| 12 |
|
| 13 |
``` bnf
|
| 14 |
id-expression:
|
| 15 |
unqualified-id
|
|
@@ -20,44 +21,45 @@ id-expression:
|
|
| 20 |
unqualified-id:
|
| 21 |
identifier
|
| 22 |
operator-function-id
|
| 23 |
conversion-function-id
|
| 24 |
literal-operator-id
|
| 25 |
-
'~'
|
| 26 |
'~' decltype-specifier
|
| 27 |
template-id
|
| 28 |
```
|
| 29 |
|
| 30 |
``` bnf
|
| 31 |
qualified-id:
|
| 32 |
-
nested-name-specifier
|
| 33 |
```
|
| 34 |
|
| 35 |
``` bnf
|
| 36 |
nested-name-specifier:
|
| 37 |
'::'
|
| 38 |
type-name '::'
|
| 39 |
namespace-name '::'
|
| 40 |
decltype-specifier '::'
|
| 41 |
nested-name-specifier identifier '::'
|
| 42 |
-
nested-name-specifier
|
| 43 |
```
|
| 44 |
|
| 45 |
``` bnf
|
| 46 |
lambda-expression:
|
| 47 |
lambda-introducer lambda-declaratorₒₚₜ compound-statement
|
|
|
|
| 48 |
```
|
| 49 |
|
| 50 |
``` bnf
|
| 51 |
lambda-introducer:
|
| 52 |
'[' lambda-captureₒₚₜ ']'
|
| 53 |
```
|
| 54 |
|
| 55 |
``` bnf
|
| 56 |
lambda-declarator:
|
| 57 |
'(' parameter-declaration-clause ')' decl-specifier-seqₒₚₜ
|
| 58 |
-
noexcept-specifierₒₚₜ attribute-specifier-seqₒₚₜ trailing-return-typeₒₚₜ
|
| 59 |
```
|
| 60 |
|
| 61 |
``` bnf
|
| 62 |
lambda-capture:
|
| 63 |
capture-default
|
|
@@ -71,32 +73,32 @@ capture-default:
|
|
| 71 |
'='
|
| 72 |
```
|
| 73 |
|
| 74 |
``` bnf
|
| 75 |
capture-list:
|
| 76 |
-
capture
|
| 77 |
-
capture-list ',' capture
|
| 78 |
```
|
| 79 |
|
| 80 |
``` bnf
|
| 81 |
capture:
|
| 82 |
simple-capture
|
| 83 |
init-capture
|
| 84 |
```
|
| 85 |
|
| 86 |
``` bnf
|
| 87 |
simple-capture:
|
| 88 |
-
identifier
|
| 89 |
-
'&' identifier
|
| 90 |
-
|
| 91 |
-
'* this'
|
| 92 |
```
|
| 93 |
|
| 94 |
``` bnf
|
| 95 |
init-capture:
|
| 96 |
-
identifier initializer
|
| 97 |
-
'&' identifier initializer
|
| 98 |
```
|
| 99 |
|
| 100 |
``` bnf
|
| 101 |
fold-expression:
|
| 102 |
'(' cast-expression fold-operator '...' ')'
|
|
@@ -111,70 +113,125 @@ fold-operator: one of
|
|
| 111 |
'+ ' '- ' '* ' '/ ' '% ' '^ ' '& ' '| ' '<< ' '>> '
|
| 112 |
'+=' '-=' '*=' '/=' '%=' '^=' '&=' '|=' '<<=' '>>=' '='
|
| 113 |
'==' '!=' '< ' '> ' '<=' '>=' '&&' '||' ', ' '.* ' '->*'
|
| 114 |
```
|
| 115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
``` bnf
|
| 117 |
postfix-expression:
|
| 118 |
primary-expression
|
| 119 |
postfix-expression '[' expr-or-braced-init-list ']'
|
| 120 |
postfix-expression '(' expression-listₒₚₜ ')'
|
| 121 |
simple-type-specifier '(' expression-listₒₚₜ ')'
|
| 122 |
typename-specifier '(' expression-listₒₚₜ ')'
|
| 123 |
simple-type-specifier braced-init-list
|
| 124 |
typename-specifier braced-init-list
|
| 125 |
-
postfix-expression '. template'ₒₚₜ id-expression
|
| 126 |
-
postfix-expression '-> template'ₒₚₜ id-expression
|
| 127 |
-
postfix-expression '.' pseudo-destructor-name
|
| 128 |
-
postfix-expression '->' pseudo-destructor-name
|
| 129 |
postfix-expression '++'
|
| 130 |
postfix-expression '-{-}'
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
```
|
| 138 |
|
| 139 |
``` bnf
|
| 140 |
expression-list:
|
| 141 |
initializer-list
|
| 142 |
```
|
| 143 |
|
| 144 |
-
``` bnf
|
| 145 |
-
pseudo-destructor-name:
|
| 146 |
-
nested-name-specifierₒₚₜ type-name ':: ~' type-name
|
| 147 |
-
nested-name-specifier 'template' simple-template-id ':: ~' type-name
|
| 148 |
-
'~' type-name
|
| 149 |
-
'~' decltype-specifier
|
| 150 |
-
```
|
| 151 |
-
|
| 152 |
``` bnf
|
| 153 |
unary-expression:
|
| 154 |
postfix-expression
|
|
|
|
| 155 |
'++' cast-expression
|
| 156 |
'-{-}' cast-expression
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
noexcept-expression
|
| 163 |
new-expression
|
| 164 |
delete-expression
|
| 165 |
```
|
| 166 |
|
| 167 |
``` bnf
|
| 168 |
unary-operator: one of
|
| 169 |
'* & + - ! ~'
|
| 170 |
```
|
| 171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
``` bnf
|
| 173 |
new-expression:
|
| 174 |
-
'::'ₒₚₜ
|
| 175 |
-
'::'ₒₚₜ
|
| 176 |
```
|
| 177 |
|
| 178 |
``` bnf
|
| 179 |
new-placement:
|
| 180 |
'(' expression-list ')'
|
|
@@ -191,11 +248,11 @@ new-declarator:
|
|
| 191 |
noptr-new-declarator
|
| 192 |
```
|
| 193 |
|
| 194 |
``` bnf
|
| 195 |
noptr-new-declarator:
|
| 196 |
-
'[' expression ']' attribute-specifier-seqₒₚₜ
|
| 197 |
noptr-new-declarator '[' constant-expression ']' attribute-specifier-seqₒₚₜ
|
| 198 |
```
|
| 199 |
|
| 200 |
``` bnf
|
| 201 |
new-initializer:
|
|
@@ -203,17 +260,12 @@ new-initializer:
|
|
| 203 |
braced-init-list
|
| 204 |
```
|
| 205 |
|
| 206 |
``` bnf
|
| 207 |
delete-expression:
|
| 208 |
-
'::'ₒₚₜ
|
| 209 |
-
'::'ₒₚₜ
|
| 210 |
-
```
|
| 211 |
-
|
| 212 |
-
``` bnf
|
| 213 |
-
noexcept-expression:
|
| 214 |
-
'noexcept' '(' expression ')'
|
| 215 |
```
|
| 216 |
|
| 217 |
``` bnf
|
| 218 |
cast-expression:
|
| 219 |
unary-expression
|
|
@@ -248,16 +300,22 @@ shift-expression:
|
|
| 248 |
shift-expression '<<' additive-expression
|
| 249 |
shift-expression '>>' additive-expression
|
| 250 |
```
|
| 251 |
|
| 252 |
``` bnf
|
| 253 |
-
|
| 254 |
shift-expression
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
```
|
| 260 |
|
| 261 |
``` bnf
|
| 262 |
equality-expression:
|
| 263 |
relational-expression
|
|
@@ -299,20 +357,27 @@ logical-or-expression:
|
|
| 299 |
conditional-expression:
|
| 300 |
logical-or-expression
|
| 301 |
logical-or-expression '?' expression ':' assignment-expression
|
| 302 |
```
|
| 303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
``` bnf
|
| 305 |
throw-expression:
|
| 306 |
-
|
| 307 |
```
|
| 308 |
|
| 309 |
``` bnf
|
| 310 |
assignment-expression:
|
| 311 |
conditional-expression
|
| 312 |
-
|
| 313 |
throw-expression
|
|
|
|
| 314 |
```
|
| 315 |
|
| 316 |
``` bnf
|
| 317 |
assignment-operator: one of
|
| 318 |
'= *= /= %= += -= >>= <<= &= ^= |='
|
|
|
|
| 1 |
## Expressions <a id="gram.expr">[[gram.expr]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
primary-expression:
|
| 5 |
literal
|
| 6 |
+
this
|
| 7 |
'(' expression ')'
|
| 8 |
id-expression
|
| 9 |
lambda-expression
|
| 10 |
fold-expression
|
| 11 |
+
requires-expression
|
| 12 |
```
|
| 13 |
|
| 14 |
``` bnf
|
| 15 |
id-expression:
|
| 16 |
unqualified-id
|
|
|
|
| 21 |
unqualified-id:
|
| 22 |
identifier
|
| 23 |
operator-function-id
|
| 24 |
conversion-function-id
|
| 25 |
literal-operator-id
|
| 26 |
+
'~' type-name
|
| 27 |
'~' decltype-specifier
|
| 28 |
template-id
|
| 29 |
```
|
| 30 |
|
| 31 |
``` bnf
|
| 32 |
qualified-id:
|
| 33 |
+
nested-name-specifier templateₒₚₜ unqualified-id
|
| 34 |
```
|
| 35 |
|
| 36 |
``` bnf
|
| 37 |
nested-name-specifier:
|
| 38 |
'::'
|
| 39 |
type-name '::'
|
| 40 |
namespace-name '::'
|
| 41 |
decltype-specifier '::'
|
| 42 |
nested-name-specifier identifier '::'
|
| 43 |
+
nested-name-specifier templateₒₚₜ simple-template-id '::'
|
| 44 |
```
|
| 45 |
|
| 46 |
``` bnf
|
| 47 |
lambda-expression:
|
| 48 |
lambda-introducer lambda-declaratorₒₚₜ compound-statement
|
| 49 |
+
lambda-introducer '<' template-parameter-list '>' requires-clauseₒₚₜ lambda-declaratorₒₚₜ compound-statement
|
| 50 |
```
|
| 51 |
|
| 52 |
``` bnf
|
| 53 |
lambda-introducer:
|
| 54 |
'[' lambda-captureₒₚₜ ']'
|
| 55 |
```
|
| 56 |
|
| 57 |
``` bnf
|
| 58 |
lambda-declarator:
|
| 59 |
'(' parameter-declaration-clause ')' decl-specifier-seqₒₚₜ
|
| 60 |
+
noexcept-specifierₒₚₜ attribute-specifier-seqₒₚₜ trailing-return-typeₒₚₜ requires-clauseₒₚₜ
|
| 61 |
```
|
| 62 |
|
| 63 |
``` bnf
|
| 64 |
lambda-capture:
|
| 65 |
capture-default
|
|
|
|
| 73 |
'='
|
| 74 |
```
|
| 75 |
|
| 76 |
``` bnf
|
| 77 |
capture-list:
|
| 78 |
+
capture
|
| 79 |
+
capture-list ',' capture
|
| 80 |
```
|
| 81 |
|
| 82 |
``` bnf
|
| 83 |
capture:
|
| 84 |
simple-capture
|
| 85 |
init-capture
|
| 86 |
```
|
| 87 |
|
| 88 |
``` bnf
|
| 89 |
simple-capture:
|
| 90 |
+
identifier '...'ₒₚₜ
|
| 91 |
+
'&' identifier '...'ₒₚₜ
|
| 92 |
+
this
|
| 93 |
+
'*' 'this'
|
| 94 |
```
|
| 95 |
|
| 96 |
``` bnf
|
| 97 |
init-capture:
|
| 98 |
+
'...'ₒₚₜ identifier initializer
|
| 99 |
+
'&' '...'ₒₚₜ identifier initializer
|
| 100 |
```
|
| 101 |
|
| 102 |
``` bnf
|
| 103 |
fold-expression:
|
| 104 |
'(' cast-expression fold-operator '...' ')'
|
|
|
|
| 113 |
'+ ' '- ' '* ' '/ ' '% ' '^ ' '& ' '| ' '<< ' '>> '
|
| 114 |
'+=' '-=' '*=' '/=' '%=' '^=' '&=' '|=' '<<=' '>>=' '='
|
| 115 |
'==' '!=' '< ' '> ' '<=' '>=' '&&' '||' ', ' '.* ' '->*'
|
| 116 |
```
|
| 117 |
|
| 118 |
+
``` bnf
|
| 119 |
+
requires-expression:
|
| 120 |
+
requires requirement-parameter-listₒₚₜ requirement-body
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
``` bnf
|
| 124 |
+
requirement-parameter-list:
|
| 125 |
+
'(' parameter-declaration-clauseₒₚₜ ')'
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
``` bnf
|
| 129 |
+
requirement-body:
|
| 130 |
+
'{' requirement-seq '}'
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
``` bnf
|
| 134 |
+
requirement-seq:
|
| 135 |
+
requirement
|
| 136 |
+
requirement-seq requirement
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
``` bnf
|
| 140 |
+
requirement:
|
| 141 |
+
simple-requirement
|
| 142 |
+
type-requirement
|
| 143 |
+
compound-requirement
|
| 144 |
+
nested-requirement
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
``` bnf
|
| 148 |
+
simple-requirement:
|
| 149 |
+
expression ';'
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
``` bnf
|
| 153 |
+
type-requirement:
|
| 154 |
+
typename nested-name-specifierₒₚₜ type-name ';'
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
``` bnf
|
| 158 |
+
compound-requirement:
|
| 159 |
+
'{' expression '}' noexceptₒₚₜ return-type-requirementₒₚₜ ';'
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
``` bnf
|
| 163 |
+
return-type-requirement:
|
| 164 |
+
'->' type-constraint
|
| 165 |
+
```
|
| 166 |
+
|
| 167 |
+
``` bnf
|
| 168 |
+
nested-requirement:
|
| 169 |
+
requires constraint-expression ';'
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
``` bnf
|
| 173 |
postfix-expression:
|
| 174 |
primary-expression
|
| 175 |
postfix-expression '[' expr-or-braced-init-list ']'
|
| 176 |
postfix-expression '(' expression-listₒₚₜ ')'
|
| 177 |
simple-type-specifier '(' expression-listₒₚₜ ')'
|
| 178 |
typename-specifier '(' expression-listₒₚₜ ')'
|
| 179 |
simple-type-specifier braced-init-list
|
| 180 |
typename-specifier braced-init-list
|
| 181 |
+
postfix-expression '.' 'template'ₒₚₜ id-expression
|
| 182 |
+
postfix-expression '->' 'template'ₒₚₜ id-expression
|
|
|
|
|
|
|
| 183 |
postfix-expression '++'
|
| 184 |
postfix-expression '-{-}'
|
| 185 |
+
dynamic_cast '<' type-id '>' '(' expression ')'
|
| 186 |
+
static_cast '<' type-id '>' '(' expression ')'
|
| 187 |
+
reinterpret_cast '<' type-id '>' '(' expression ')'
|
| 188 |
+
const_cast '<' type-id '>' '(' expression ')'
|
| 189 |
+
typeid '(' expression ')'
|
| 190 |
+
typeid '(' type-id ')'
|
| 191 |
```
|
| 192 |
|
| 193 |
``` bnf
|
| 194 |
expression-list:
|
| 195 |
initializer-list
|
| 196 |
```
|
| 197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
``` bnf
|
| 199 |
unary-expression:
|
| 200 |
postfix-expression
|
| 201 |
+
unary-operator cast-expression
|
| 202 |
'++' cast-expression
|
| 203 |
'-{-}' cast-expression
|
| 204 |
+
await-expression
|
| 205 |
+
sizeof unary-expression
|
| 206 |
+
sizeof '(' type-id ')'
|
| 207 |
+
sizeof '...' '(' identifier ')'
|
| 208 |
+
alignof '(' type-id ')'
|
| 209 |
noexcept-expression
|
| 210 |
new-expression
|
| 211 |
delete-expression
|
| 212 |
```
|
| 213 |
|
| 214 |
``` bnf
|
| 215 |
unary-operator: one of
|
| 216 |
'* & + - ! ~'
|
| 217 |
```
|
| 218 |
|
| 219 |
+
``` bnf
|
| 220 |
+
await-expression:
|
| 221 |
+
'co_await' cast-expression
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
``` bnf
|
| 225 |
+
noexcept-expression:
|
| 226 |
+
noexcept '(' expression ')'
|
| 227 |
+
```
|
| 228 |
+
|
| 229 |
``` bnf
|
| 230 |
new-expression:
|
| 231 |
+
'::'ₒₚₜ new new-placementₒₚₜ new-type-id new-initializerₒₚₜ
|
| 232 |
+
'::'ₒₚₜ new new-placementₒₚₜ '(' type-id ')' new-initializerₒₚₜ
|
| 233 |
```
|
| 234 |
|
| 235 |
``` bnf
|
| 236 |
new-placement:
|
| 237 |
'(' expression-list ')'
|
|
|
|
| 248 |
noptr-new-declarator
|
| 249 |
```
|
| 250 |
|
| 251 |
``` bnf
|
| 252 |
noptr-new-declarator:
|
| 253 |
+
'[' expressionₒₚₜ ']' attribute-specifier-seqₒₚₜ
|
| 254 |
noptr-new-declarator '[' constant-expression ']' attribute-specifier-seqₒₚₜ
|
| 255 |
```
|
| 256 |
|
| 257 |
``` bnf
|
| 258 |
new-initializer:
|
|
|
|
| 260 |
braced-init-list
|
| 261 |
```
|
| 262 |
|
| 263 |
``` bnf
|
| 264 |
delete-expression:
|
| 265 |
+
'::'ₒₚₜ delete cast-expression
|
| 266 |
+
'::'ₒₚₜ delete '[' ']' cast-expression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
```
|
| 268 |
|
| 269 |
``` bnf
|
| 270 |
cast-expression:
|
| 271 |
unary-expression
|
|
|
|
| 300 |
shift-expression '<<' additive-expression
|
| 301 |
shift-expression '>>' additive-expression
|
| 302 |
```
|
| 303 |
|
| 304 |
``` bnf
|
| 305 |
+
compare-expression:
|
| 306 |
shift-expression
|
| 307 |
+
compare-expression '<=>' shift-expression
|
| 308 |
+
```
|
| 309 |
+
|
| 310 |
+
``` bnf
|
| 311 |
+
relational-expression:
|
| 312 |
+
compare-expression
|
| 313 |
+
relational-expression '<' compare-expression
|
| 314 |
+
relational-expression '>' compare-expression
|
| 315 |
+
relational-expression '<=' compare-expression
|
| 316 |
+
relational-expression '>=' compare-expression
|
| 317 |
```
|
| 318 |
|
| 319 |
``` bnf
|
| 320 |
equality-expression:
|
| 321 |
relational-expression
|
|
|
|
| 357 |
conditional-expression:
|
| 358 |
logical-or-expression
|
| 359 |
logical-or-expression '?' expression ':' assignment-expression
|
| 360 |
```
|
| 361 |
|
| 362 |
+
``` bnf
|
| 363 |
+
yield-expression:
|
| 364 |
+
'co_yield' assignment-expression
|
| 365 |
+
'co_yield' braced-init-list
|
| 366 |
+
```
|
| 367 |
+
|
| 368 |
``` bnf
|
| 369 |
throw-expression:
|
| 370 |
+
throw assignment-expressionₒₚₜ
|
| 371 |
```
|
| 372 |
|
| 373 |
``` bnf
|
| 374 |
assignment-expression:
|
| 375 |
conditional-expression
|
| 376 |
+
yield-expression
|
| 377 |
throw-expression
|
| 378 |
+
logical-or-expression assignment-operator initializer-clause
|
| 379 |
```
|
| 380 |
|
| 381 |
``` bnf
|
| 382 |
assignment-operator: one of
|
| 383 |
'= *= /= %= += -= >>= <<= &= ^= |='
|