From Jason Turner

[gram.dcl]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpn21p8eob/{from.md → to.md} +112 -17
tmp/tmpn21p8eob/{from.md → to.md} RENAMED
@@ -1,11 +1,10 @@
1
  ## Declarations <a id="gram.dcl">[[gram.dcl]]</a>
2
 
3
  ``` bnf
4
  declaration-seq:
5
- declaration
6
- declaration-seq declaration
7
  ```
8
 
9
  ``` bnf
10
  declaration:
11
  name-declaration
@@ -15,10 +14,11 @@ declaration:
15
  ``` bnf
16
  name-declaration:
17
  block-declaration
18
  nodeclspec-function-declaration
19
  function-definition
 
20
  template-declaration
21
  deduction-guide
22
  linkage-specification
23
  namespace-definition
24
  empty-declaration
@@ -40,10 +40,11 @@ block-declaration:
40
  namespace-alias-definition
41
  using-declaration
42
  using-enum-declaration
43
  using-directive
44
  static_assert-declaration
 
45
  alias-declaration
46
  opaque-enum-declaration
47
  ```
48
 
49
  ``` bnf
@@ -54,15 +55,36 @@ nodeclspec-function-declaration:
54
  ``` bnf
55
  alias-declaration:
56
  using identifier attribute-specifier-seqₒₚₜ '=' defining-type-id ';'
57
  ```
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  ``` bnf
60
  simple-declaration:
61
  decl-specifier-seq init-declarator-listₒₚₜ ';'
62
  attribute-specifier-seq decl-specifier-seq init-declarator-list ';'
63
- attribute-specifier-seqₒₚₜ decl-specifier-seq ref-qualifierₒₚₜ '[' identifier-list ']' initializer ';'
 
 
 
 
 
64
  ```
65
 
66
  ``` bnf
67
  empty-declaration:
68
  ';'
@@ -147,11 +169,11 @@ defining-type-specifier-seq:
147
 
148
  ``` bnf
149
  simple-type-specifier:
150
  nested-name-specifierₒₚₜ type-name
151
  nested-name-specifier template simple-template-id
152
- decltype-specifier
153
  placeholder-type-specifier
154
  nested-name-specifierₒₚₜ template-name
155
  char
156
  char8_t
157
  char16_t
@@ -173,10 +195,22 @@ type-name:
173
  class-name
174
  enum-name
175
  typedef-name
176
  ```
177
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  ``` bnf
179
  elaborated-type-specifier:
180
  class-key attribute-specifier-seqₒₚₜ nested-name-specifierₒₚₜ identifier
181
  class-key simple-template-id
182
  class-key nested-name-specifier templateₒₚₜ simple-template-id
@@ -192,20 +226,26 @@ decltype-specifier:
192
  placeholder-type-specifier:
193
  type-constraintₒₚₜ auto
194
  type-constraintₒₚₜ decltype '(' auto ')'
195
  ```
196
 
 
 
 
 
 
 
197
  ``` bnf
198
  init-declarator-list:
199
  init-declarator
200
  init-declarator-list ',' init-declarator
201
  ```
202
 
203
  ``` bnf
204
  init-declarator:
205
- declarator initializerₒₚₜ
206
- declarator requires-clause
207
  ```
208
 
209
  ``` bnf
210
  declarator:
211
  ptr-declarator
@@ -304,18 +344,19 @@ abstract-pack-declarator:
304
  ```
305
 
306
  ``` bnf
307
  noptr-abstract-pack-declarator:
308
  noptr-abstract-pack-declarator parameters-and-qualifiers
309
- noptr-abstract-pack-declarator '[' constant-expressionₒₚₜ ']' attribute-specifier-seqₒₚₜ
310
  '...'
311
  ```
312
 
313
  ``` bnf
314
  parameter-declaration-clause:
315
- parameter-declaration-listₒₚₜ '...'ₒₚₜ
 
316
  parameter-declaration-list ',' '...'
 
317
  ```
318
 
319
  ``` bnf
320
  parameter-declaration-list:
321
  parameter-declaration
@@ -328,10 +369,41 @@ parameter-declaration:
328
  attribute-specifier-seqₒₚₜ decl-specifier-seq declarator '=' initializer-clause
329
  attribute-specifier-seqₒₚₜ thisₒₚₜ decl-specifier-seq abstract-declaratorₒₚₜ
330
  attribute-specifier-seqₒₚₜ decl-specifier-seq abstract-declaratorₒₚₜ '=' initializer-clause
331
  ```
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  ``` bnf
334
  initializer:
335
  brace-or-equal-initializer
336
  '(' expression-list ')'
337
  ```
@@ -383,20 +455,28 @@ expr-or-braced-init-list:
383
  braced-init-list
384
  ```
385
 
386
  ``` bnf
387
  function-definition:
388
- attribute-specifier-seqₒₚₜ decl-specifier-seqₒₚₜ declarator virt-specifier-seqₒₚₜ function-body
389
- attribute-specifier-seqₒₚₜ decl-specifier-seqₒₚₜ declarator requires-clause function-body
 
 
390
  ```
391
 
392
  ``` bnf
393
  function-body:
394
  ctor-initializerₒₚₜ compound-statement
395
  function-try-block
396
  '=' default ';'
 
 
 
 
 
397
  '=' delete ';'
 
398
  ```
399
 
400
  ``` bnf
401
  enum-name:
402
  identifier
@@ -459,10 +539,11 @@ using-enum-declaration:
459
 
460
  ``` bnf
461
  using-enum-declarator:
462
  nested-name-specifierₒₚₜ identifier
463
  nested-name-specifierₒₚₜ simple-template-id
 
464
  ```
465
 
466
  ``` bnf
467
  namespace-name:
468
  identifier
@@ -508,20 +589,22 @@ namespace-alias:
508
  ```
509
 
510
  ``` bnf
511
  namespace-alias-definition:
512
  namespace identifier '=' qualified-namespace-specifier ';'
 
513
  ```
514
 
515
  ``` bnf
516
  qualified-namespace-specifier:
517
  nested-name-specifierₒₚₜ namespace-name
518
  ```
519
 
520
  ``` bnf
521
  using-directive:
522
  attribute-specifier-seqₒₚₜ using namespace nested-name-specifierₒₚₜ namespace-name ';'
 
523
  ```
524
 
525
  ``` bnf
526
  using-declaration:
527
  using using-declarator-list ';'
@@ -538,27 +621,28 @@ using-declarator:
538
  typenameₒₚₜ nested-name-specifier unqualified-id
539
  ```
540
 
541
  ``` bnf
542
  asm-declaration:
543
- attribute-specifier-seqₒₚₜ asm '(' string-literal ')' ';'
544
  ```
545
 
546
  ``` bnf
547
  linkage-specification:
548
- extern string-literal '{' declaration-seqₒₚₜ '}'
549
- extern string-literal name-declaration
550
  ```
551
 
552
  ``` bnf
553
  attribute-specifier-seq:
554
- attribute-specifier-seqₒₚₜ attribute-specifier
555
  ```
556
 
557
  ``` bnf
558
  attribute-specifier:
559
  '[' '[' attribute-using-prefixₒₚₜ attribute-list ']' ']'
 
560
  alignment-specifier
561
  ```
562
 
563
  ``` bnf
564
  alignment-specifier:
@@ -577,15 +661,26 @@ attribute-list:
577
  attribute-list ',' attributeₒₚₜ
578
  attribute '...'
579
  attribute-list ',' attribute '...'
580
  ```
581
 
 
 
 
 
 
 
582
  ``` bnf
583
  attribute:
584
  attribute-token attribute-argument-clauseₒₚₜ
585
  ```
586
 
 
 
 
 
 
587
  ``` bnf
588
  attribute-token:
589
  identifier
590
  attribute-scoped-token
591
  ```
@@ -605,18 +700,18 @@ attribute-argument-clause:
605
  '(' balanced-token-seqₒₚₜ ')'
606
  ```
607
 
608
  ``` bnf
609
  balanced-token-seq:
610
- balanced-token
611
- balanced-token-seq balanced-token
612
  ```
613
 
614
  ``` bnf
615
  balanced-token:
616
  '(' balanced-token-seqₒₚₜ ')'
617
  '[' balanced-token-seqₒₚₜ ']'
618
  '{' balanced-token-seqₒₚₜ '}'
619
- any *token* other than a parenthesis, a bracket, or a brace
 
620
  ```
621
 
622
 
 
1
  ## Declarations <a id="gram.dcl">[[gram.dcl]]</a>
2
 
3
  ``` bnf
4
  declaration-seq:
5
+ declaration declaration-seqₒₚₜ
 
6
  ```
7
 
8
  ``` bnf
9
  declaration:
10
  name-declaration
 
14
  ``` bnf
15
  name-declaration:
16
  block-declaration
17
  nodeclspec-function-declaration
18
  function-definition
19
+ friend-type-declaration
20
  template-declaration
21
  deduction-guide
22
  linkage-specification
23
  namespace-definition
24
  empty-declaration
 
40
  namespace-alias-definition
41
  using-declaration
42
  using-enum-declaration
43
  using-directive
44
  static_assert-declaration
45
+ consteval-block-declaration
46
  alias-declaration
47
  opaque-enum-declaration
48
  ```
49
 
50
  ``` bnf
 
55
  ``` bnf
56
  alias-declaration:
57
  using identifier attribute-specifier-seqₒₚₜ '=' defining-type-id ';'
58
  ```
59
 
60
+ ``` bnf
61
+ sb-identifier:
62
+ '...'ₒₚₜ identifier attribute-specifier-seqₒₚₜ
63
+ ```
64
+
65
+ ``` bnf
66
+ sb-identifier-list:
67
+ sb-identifier
68
+ sb-identifier-list ',' sb-identifier
69
+ ```
70
+
71
+ ``` bnf
72
+ structured-binding-declaration:
73
+ attribute-specifier-seqₒₚₜ decl-specifier-seq ref-qualifierₒₚₜ '[' sb-identifier-list ']'
74
+ ```
75
+
76
  ``` bnf
77
  simple-declaration:
78
  decl-specifier-seq init-declarator-listₒₚₜ ';'
79
  attribute-specifier-seq decl-specifier-seq init-declarator-list ';'
80
+ structured-binding-declaration initializer ';'
81
+ ```
82
+
83
+ ``` bnf
84
+ consteval-block-declaration:
85
+ consteval compound-statement
86
  ```
87
 
88
  ``` bnf
89
  empty-declaration:
90
  ';'
 
169
 
170
  ``` bnf
171
  simple-type-specifier:
172
  nested-name-specifierₒₚₜ type-name
173
  nested-name-specifier template simple-template-id
174
+ computed-type-specifier
175
  placeholder-type-specifier
176
  nested-name-specifierₒₚₜ template-name
177
  char
178
  char8_t
179
  char16_t
 
195
  class-name
196
  enum-name
197
  typedef-name
198
  ```
199
 
200
+ ``` bnf
201
+ computed-type-specifier:
202
+ decltype-specifier
203
+ pack-index-specifier
204
+ splice-type-specifier
205
+ ```
206
+
207
+ ``` bnf
208
+ pack-index-specifier:
209
+ typedef-name '...' '[' constant-expression ']'
210
+ ```
211
+
212
  ``` bnf
213
  elaborated-type-specifier:
214
  class-key attribute-specifier-seqₒₚₜ nested-name-specifierₒₚₜ identifier
215
  class-key simple-template-id
216
  class-key nested-name-specifier templateₒₚₜ simple-template-id
 
226
  placeholder-type-specifier:
227
  type-constraintₒₚₜ auto
228
  type-constraintₒₚₜ decltype '(' auto ')'
229
  ```
230
 
231
+ ``` bnf
232
+ splice-type-specifier:
233
+ typenameₒₚₜ splice-specifier
234
+ typenameₒₚₜ splice-specialization-specifier
235
+ ```
236
+
237
  ``` bnf
238
  init-declarator-list:
239
  init-declarator
240
  init-declarator-list ',' init-declarator
241
  ```
242
 
243
  ``` bnf
244
  init-declarator:
245
+ declarator initializer
246
+ declarator requires-clauseₒₚₜ function-contract-specifier-seqₒₚₜ
247
  ```
248
 
249
  ``` bnf
250
  declarator:
251
  ptr-declarator
 
344
  ```
345
 
346
  ``` bnf
347
  noptr-abstract-pack-declarator:
348
  noptr-abstract-pack-declarator parameters-and-qualifiers
 
349
  '...'
350
  ```
351
 
352
  ``` bnf
353
  parameter-declaration-clause:
354
+ '...'
355
+ parameter-declaration-listₒₚₜ
356
  parameter-declaration-list ',' '...'
357
+ parameter-declaration-list '...'
358
  ```
359
 
360
  ``` bnf
361
  parameter-declaration-list:
362
  parameter-declaration
 
369
  attribute-specifier-seqₒₚₜ decl-specifier-seq declarator '=' initializer-clause
370
  attribute-specifier-seqₒₚₜ thisₒₚₜ decl-specifier-seq abstract-declaratorₒₚₜ
371
  attribute-specifier-seqₒₚₜ decl-specifier-seq abstract-declaratorₒₚₜ '=' initializer-clause
372
  ```
373
 
374
+ ``` bnf
375
+ function-contract-specifier-seq:
376
+ function-contract-specifier function-contract-specifier-seqₒₚₜ
377
+ ```
378
+
379
+ ``` bnf
380
+ function-contract-specifier:
381
+ precondition-specifier
382
+ postcondition-specifier
383
+ ```
384
+
385
+ ``` bnf
386
+ precondition-specifier:
387
+ 'pre' attribute-specifier-seqₒₚₜ '(' conditional-expression ')'
388
+ ```
389
+
390
+ ``` bnf
391
+ postcondition-specifier:
392
+ 'post' attribute-specifier-seqₒₚₜ '(' result-name-introducerₒₚₜ conditional-expression ')'
393
+ ```
394
+
395
+ ``` bnf
396
+ attributed-identifier:
397
+ identifier attribute-specifier-seqₒₚₜ
398
+ ```
399
+
400
+ ``` bnf
401
+ result-name-introducer:
402
+ attributed-identifier ':'
403
+ ```
404
+
405
  ``` bnf
406
  initializer:
407
  brace-or-equal-initializer
408
  '(' expression-list ')'
409
  ```
 
455
  braced-init-list
456
  ```
457
 
458
  ``` bnf
459
  function-definition:
460
+ attribute-specifier-seqₒₚₜ decl-specifier-seqₒₚₜ declarator virt-specifier-seqₒₚₜ
461
+ function-contract-specifier-seqₒₚₜ function-body
462
+ attribute-specifier-seqₒₚₜ decl-specifier-seqₒₚₜ declarator requires-clause
463
+ function-contract-specifier-seqₒₚₜ function-body
464
  ```
465
 
466
  ``` bnf
467
  function-body:
468
  ctor-initializerₒₚₜ compound-statement
469
  function-try-block
470
  '=' default ';'
471
+ deleted-function-body
472
+ ```
473
+
474
+ ``` bnf
475
+ deleted-function-body:
476
  '=' delete ';'
477
+ '=' delete '(' unevaluated-string ')' ';'
478
  ```
479
 
480
  ``` bnf
481
  enum-name:
482
  identifier
 
539
 
540
  ``` bnf
541
  using-enum-declarator:
542
  nested-name-specifierₒₚₜ identifier
543
  nested-name-specifierₒₚₜ simple-template-id
544
+ splice-type-specifier
545
  ```
546
 
547
  ``` bnf
548
  namespace-name:
549
  identifier
 
589
  ```
590
 
591
  ``` bnf
592
  namespace-alias-definition:
593
  namespace identifier '=' qualified-namespace-specifier ';'
594
+ namespace identifier '=' splice-specifier ';'
595
  ```
596
 
597
  ``` bnf
598
  qualified-namespace-specifier:
599
  nested-name-specifierₒₚₜ namespace-name
600
  ```
601
 
602
  ``` bnf
603
  using-directive:
604
  attribute-specifier-seqₒₚₜ using namespace nested-name-specifierₒₚₜ namespace-name ';'
605
+ attribute-specifier-seqₒₚₜ using namespace splice-specifier ';'
606
  ```
607
 
608
  ``` bnf
609
  using-declaration:
610
  using using-declarator-list ';'
 
621
  typenameₒₚₜ nested-name-specifier unqualified-id
622
  ```
623
 
624
  ``` bnf
625
  asm-declaration:
626
+ attribute-specifier-seqₒₚₜ asm '(' balanced-token-seq ')' ';'
627
  ```
628
 
629
  ``` bnf
630
  linkage-specification:
631
+ extern unevaluated-string '{' declaration-seqₒₚₜ '}'
632
+ extern unevaluated-string name-declaration
633
  ```
634
 
635
  ``` bnf
636
  attribute-specifier-seq:
637
+ attribute-specifier attribute-specifier-seqₒₚₜ
638
  ```
639
 
640
  ``` bnf
641
  attribute-specifier:
642
  '[' '[' attribute-using-prefixₒₚₜ attribute-list ']' ']'
643
+ '[' '[' annotation-list ']' ']'
644
  alignment-specifier
645
  ```
646
 
647
  ``` bnf
648
  alignment-specifier:
 
661
  attribute-list ',' attributeₒₚₜ
662
  attribute '...'
663
  attribute-list ',' attribute '...'
664
  ```
665
 
666
+ ``` bnf
667
+ annotation-list:
668
+ annotation '...'ₒₚₜ
669
+ annotation-list ',' annotation '...'ₒₚₜ
670
+ ```
671
+
672
  ``` bnf
673
  attribute:
674
  attribute-token attribute-argument-clauseₒₚₜ
675
  ```
676
 
677
+ ``` bnf
678
+ annotation:
679
+ '=' constant-expression
680
+ ```
681
+
682
  ``` bnf
683
  attribute-token:
684
  identifier
685
  attribute-scoped-token
686
  ```
 
700
  '(' balanced-token-seqₒₚₜ ')'
701
  ```
702
 
703
  ``` bnf
704
  balanced-token-seq:
705
+ balanced-token balanced-token-seqₒₚₜ
 
706
  ```
707
 
708
  ``` bnf
709
  balanced-token:
710
  '(' balanced-token-seqₒₚₜ ')'
711
  '[' balanced-token-seqₒₚₜ ']'
712
  '{' balanced-token-seqₒₚₜ '}'
713
+ '[:' balanced-token-seqₒₚₜ ':]'
714
+ any *token* other than '(', ')', '[', ']', '{', '}', '[:', or ':]'
715
  ```
716
 
717