This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

15
cppdraft/gram/basic.md Normal file
View File

@@ -0,0 +1,15 @@
[gram.basic]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.4 Basics [gram.basic]
[splice-specifier:](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]")
[: [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") :]
[splice-specialization-specifier:](basic.splice#nt:splice-specialization-specifier "6.6Splice specifiers[basic.splice]")
[*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]") < [*template-argument-list*](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]")opt >
[translation-unit:](basic.link#nt:translation-unit "6.7Program and linkage[basic.link]")
[*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt
[*global-module-fragment*](module.global.frag#nt:global-module-fragment "10.4Global module fragment[module.global.frag]")opt [*module-declaration*](module.unit#nt:module-declaration "10.1Module units and purviews[module.unit]") [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt [*private-module-fragment*](module.private.frag#nt:private-module-fragment "10.5Private module fragment[module.private.frag]")opt

129
cppdraft/gram/class.md Normal file
View File

@@ -0,0 +1,129 @@
[gram.class]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.9 Classes [gram.class]
[class-name:](class.pre#nt:class-name "11.1Preamble[class.pre]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[class-specifier:](class.pre#nt:class-specifier "11.1Preamble[class.pre]")
[*class-head*](class.pre#nt:class-head "11.1Preamble[class.pre]") { [*member-specification*](class.mem.general#nt:member-specification "11.4.1General[class.mem.general]")opt }
[class-head:](class.pre#nt:class-head "11.1Preamble[class.pre]")
[*class-key*](class.pre#nt:class-key "11.1Preamble[class.pre]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*class-head-name*](class.pre#nt:class-head-name "11.1Preamble[class.pre]") [*class-property-specifier-seq*](class.pre#nt:class-property-specifier-seq "11.1Preamble[class.pre]")opt [*base-clause*](class.derived.general#nt:base-clause "11.7.1General[class.derived.general]")opt
[*class-key*](class.pre#nt:class-key "11.1Preamble[class.pre]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*base-clause*](class.derived.general#nt:base-clause "11.7.1General[class.derived.general]")opt
[class-head-name:](class.pre#nt:class-head-name "11.1Preamble[class.pre]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*class-name*](class.pre#nt:class-name "11.1Preamble[class.pre]")
[class-property-specifier-seq:](class.pre#nt:class-property-specifier-seq "11.1Preamble[class.pre]")
[*class-property-specifier*](class.pre#nt:class-property-specifier "11.1Preamble[class.pre]") [*class-property-specifier-seq*](class.pre#nt:class-property-specifier-seq "11.1Preamble[class.pre]")opt
[class-property-specifier:](class.pre#nt:class-property-specifier "11.1Preamble[class.pre]")
final
trivially_relocatable_if_eligible
replaceable_if_eligible
[class-key:](class.pre#nt:class-key "11.1Preamble[class.pre]")
class
struct
union
[member-specification:](class.mem.general#nt:member-specification "11.4.1General[class.mem.general]")
[*member-declaration*](class.mem.general#nt:member-declaration "11.4.1General[class.mem.general]") [*member-specification*](class.mem.general#nt:member-specification "11.4.1General[class.mem.general]")opt
[*access-specifier*](class.derived.general#nt:access-specifier "11.7.1General[class.derived.general]") : [*member-specification*](class.mem.general#nt:member-specification "11.4.1General[class.mem.general]")opt
[member-declaration:](class.mem.general#nt:member-declaration "11.4.1General[class.mem.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]")opt [*member-declarator-list*](class.mem.general#nt:member-declarator-list "11.4.1General[class.mem.general]")opt ;
[*function-definition*](dcl.fct.def.general#nt:function-definition "9.6.1General[dcl.fct.def.general]")
[*friend-type-declaration*](class.mem.general#nt:friend-type-declaration "11.4.1General[class.mem.general]")
[*using-declaration*](namespace.udecl#nt:using-declaration "9.10The using declaration[namespace.udecl]")
[*using-enum-declaration*](enum.udecl#nt:using-enum-declaration "9.8.2The using enum declaration[enum.udecl]")
[*static_assert-declaration*](dcl.pre#nt:static_assert-declaration "9.1Preamble[dcl.pre]")
[*consteval-block-declaration*](dcl.pre#nt:consteval-block-declaration "9.1Preamble[dcl.pre]")
[*template-declaration*](temp.pre#nt:template-declaration "13.1Preamble[temp.pre]")
[*explicit-specialization*](temp.expl.spec#nt:explicit-specialization "13.9.4Explicit specialization[temp.expl.spec]")
[*deduction-guide*](temp.deduct.guide#nt:deduction-guide "13.7.2.3Deduction guides[temp.deduct.guide]")
[*alias-declaration*](dcl.pre#nt:alias-declaration "9.1Preamble[dcl.pre]")
[*opaque-enum-declaration*](dcl.enum#nt:opaque-enum-declaration "9.8.1Enumeration declarations[dcl.enum]")
[*empty-declaration*](dcl.pre#nt:empty-declaration "9.1Preamble[dcl.pre]")
[member-declarator-list:](class.mem.general#nt:member-declarator-list "11.4.1General[class.mem.general]")
[*member-declarator*](class.mem.general#nt:member-declarator "11.4.1General[class.mem.general]")
[*member-declarator-list*](class.mem.general#nt:member-declarator-list "11.4.1General[class.mem.general]") , [*member-declarator*](class.mem.general#nt:member-declarator "11.4.1General[class.mem.general]")
[member-declarator:](class.mem.general#nt:member-declarator "11.4.1General[class.mem.general]")
[*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*virt-specifier-seq*](class.mem.general#nt:virt-specifier-seq "11.4.1General[class.mem.general]")opt [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt [*pure-specifier*](class.mem.general#nt:pure-specifier "11.4.1General[class.mem.general]")opt
[*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]") [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
[*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*brace-or-equal-initializer*](dcl.init.general#nt:brace-or-equal-initializer "9.5.1General[dcl.init.general]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt : [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") [*brace-or-equal-initializer*](dcl.init.general#nt:brace-or-equal-initializer "9.5.1General[dcl.init.general]")opt
[virt-specifier-seq:](class.mem.general#nt:virt-specifier-seq "11.4.1General[class.mem.general]")
[*virt-specifier*](class.mem.general#nt:virt-specifier "11.4.1General[class.mem.general]") [*virt-specifier-seq*](class.mem.general#nt:virt-specifier-seq "11.4.1General[class.mem.general]")opt
[virt-specifier:](class.mem.general#nt:virt-specifier "11.4.1General[class.mem.general]")
override
final
[pure-specifier:](class.mem.general#nt:pure-specifier "11.4.1General[class.mem.general]")
= 0
[friend-type-declaration:](class.mem.general#nt:friend-type-declaration "11.4.1General[class.mem.general]")
friend [*friend-type-specifier-list*](class.mem.general#nt:friend-type-specifier-list "11.4.1General[class.mem.general]") ;
[friend-type-specifier-list:](class.mem.general#nt:friend-type-specifier-list "11.4.1General[class.mem.general]")
[*friend-type-specifier*](class.mem.general#nt:friend-type-specifier "11.4.1General[class.mem.general]") ...opt
[*friend-type-specifier-list*](class.mem.general#nt:friend-type-specifier-list "11.4.1General[class.mem.general]") , [*friend-type-specifier*](class.mem.general#nt:friend-type-specifier "11.4.1General[class.mem.general]") ...opt
[friend-type-specifier:](class.mem.general#nt:friend-type-specifier "11.4.1General[class.mem.general]")
[*simple-type-specifier*](dcl.type.simple#nt:simple-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*elaborated-type-specifier*](dcl.type.elab#nt:elaborated-type-specifier "9.2.9.5Elaborated type specifiers[dcl.type.elab]")
[*typename-specifier*](temp.res.general#nt:typename-specifier "13.8.1General[temp.res.general]")
[conversion-function-id:](class.conv.fct#nt:conversion-function-id "11.4.8.3Conversion functions[class.conv.fct]")
operator [*conversion-type-id*](class.conv.fct#nt:conversion-type-id "11.4.8.3Conversion functions[class.conv.fct]")
[conversion-type-id:](class.conv.fct#nt:conversion-type-id "11.4.8.3Conversion functions[class.conv.fct]")
[*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]") [*conversion-declarator*](class.conv.fct#nt:conversion-declarator "11.4.8.3Conversion functions[class.conv.fct]")opt
[conversion-declarator:](class.conv.fct#nt:conversion-declarator "11.4.8.3Conversion functions[class.conv.fct]")
[*ptr-operator*](dcl.decl.general#nt:ptr-operator "9.3.1General[dcl.decl.general]") [*conversion-declarator*](class.conv.fct#nt:conversion-declarator "11.4.8.3Conversion functions[class.conv.fct]")opt
[base-clause:](class.derived.general#nt:base-clause "11.7.1General[class.derived.general]")
: [*base-specifier-list*](class.derived.general#nt:base-specifier-list "11.7.1General[class.derived.general]")
[base-specifier-list:](class.derived.general#nt:base-specifier-list "11.7.1General[class.derived.general]")
[*base-specifier*](class.derived.general#nt:base-specifier "11.7.1General[class.derived.general]") ...opt
[*base-specifier-list*](class.derived.general#nt:base-specifier-list "11.7.1General[class.derived.general]") , [*base-specifier*](class.derived.general#nt:base-specifier "11.7.1General[class.derived.general]") ...opt
[base-specifier:](class.derived.general#nt:base-specifier "11.7.1General[class.derived.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*class-or-decltype*](class.derived.general#nt:class-or-decltype "11.7.1General[class.derived.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt virtual [*access-specifier*](class.derived.general#nt:access-specifier "11.7.1General[class.derived.general]")opt [*class-or-decltype*](class.derived.general#nt:class-or-decltype "11.7.1General[class.derived.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*access-specifier*](class.derived.general#nt:access-specifier "11.7.1General[class.derived.general]") virtualopt [*class-or-decltype*](class.derived.general#nt:class-or-decltype "11.7.1General[class.derived.general]")
[class-or-decltype:](class.derived.general#nt:class-or-decltype "11.7.1General[class.derived.general]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*type-name*](dcl.type.simple#nt:type-name "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") template [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*computed-type-specifier*](dcl.type.simple#nt:computed-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[access-specifier:](class.derived.general#nt:access-specifier "11.7.1General[class.derived.general]")
private
protected
public
[ctor-initializer:](class.base.init#nt:ctor-initializer "11.9.3Initializing bases and members[class.base.init]")
: [*mem-initializer-list*](class.base.init#nt:mem-initializer-list "11.9.3Initializing bases and members[class.base.init]")
[mem-initializer-list:](class.base.init#nt:mem-initializer-list "11.9.3Initializing bases and members[class.base.init]")
[*mem-initializer*](class.base.init#nt:mem-initializer "11.9.3Initializing bases and members[class.base.init]") ...opt
[*mem-initializer-list*](class.base.init#nt:mem-initializer-list "11.9.3Initializing bases and members[class.base.init]") , [*mem-initializer*](class.base.init#nt:mem-initializer "11.9.3Initializing bases and members[class.base.init]") ...opt
[mem-initializer:](class.base.init#nt:mem-initializer "11.9.3Initializing bases and members[class.base.init]")
[*mem-initializer-id*](class.base.init#nt:mem-initializer-id "11.9.3Initializing bases and members[class.base.init]") ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt )
[*mem-initializer-id*](class.base.init#nt:mem-initializer-id "11.9.3Initializing bases and members[class.base.init]") [*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[mem-initializer-id:](class.base.init#nt:mem-initializer-id "11.9.3Initializing bases and members[class.base.init]")
[*class-or-decltype*](class.derived.general#nt:class-or-decltype "11.7.1General[class.derived.general]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")

152
cppdraft/gram/cpp.md Normal file
View File

@@ -0,0 +1,152 @@
[gram.cpp]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.13 Preprocessing directives [gram.cpp]
[preprocessing-file:](cpp.pre#nt:preprocessing-file "15.1Preamble[cpp.pre]")
[*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
[*module-file*](cpp.pre#nt:module-file "15.1Preamble[cpp.pre]")
[module-file:](cpp.pre#nt:module-file "15.1Preamble[cpp.pre]")
[*pp-global-module-fragment*](cpp.pre#nt:pp-global-module-fragment "15.1Preamble[cpp.pre]")opt [*pp-module*](cpp.module#nt:pp-module "15.5Module directive[cpp.module]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt [*pp-private-module-fragment*](cpp.pre#nt:pp-private-module-fragment "15.1Preamble[cpp.pre]")opt
[pp-global-module-fragment:](cpp.pre#nt:pp-global-module-fragment "15.1Preamble[cpp.pre]")
module ; [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
[pp-private-module-fragment:](cpp.pre#nt:pp-private-module-fragment "15.1Preamble[cpp.pre]")
module : private ; [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
[group:](cpp.pre#nt:group "15.1Preamble[cpp.pre]")
[*group-part*](cpp.pre#nt:group-part "15.1Preamble[cpp.pre]")
[*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]") [*group-part*](cpp.pre#nt:group-part "15.1Preamble[cpp.pre]")
[group-part:](cpp.pre#nt:group-part "15.1Preamble[cpp.pre]")
[*control-line*](cpp.pre#nt:control-line "15.1Preamble[cpp.pre]")
[*if-section*](cpp.pre#nt:if-section "15.1Preamble[cpp.pre]")
[*text-line*](cpp.pre#nt:text-line "15.1Preamble[cpp.pre]")
# [*conditionally-supported-directive*](cpp.pre#nt:conditionally-supported-directive "15.1Preamble[cpp.pre]")
[control-line:](cpp.pre#nt:control-line "15.1Preamble[cpp.pre]")
# include [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[*pp-import*](cpp.import#nt:pp-import "15.6Header unit importation[cpp.import]")
# embed [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# define [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*replacement-list*](cpp.pre#nt:replacement-list "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# define [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*lparen*](cpp.pre#nt:lparen "15.1Preamble[cpp.pre]") [*identifier-list*](cpp.pre#nt:identifier-list "15.1Preamble[cpp.pre]")opt ) [*replacement-list*](cpp.pre#nt:replacement-list "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# define [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*lparen*](cpp.pre#nt:lparen "15.1Preamble[cpp.pre]") ... ) [*replacement-list*](cpp.pre#nt:replacement-list "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# define [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*lparen*](cpp.pre#nt:lparen "15.1Preamble[cpp.pre]") [*identifier-list*](cpp.pre#nt:identifier-list "15.1Preamble[cpp.pre]") , ... ) [*replacement-list*](cpp.pre#nt:replacement-list "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# undef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# line [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# error [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# warning [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# pragma [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
# [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[if-section:](cpp.pre#nt:if-section "15.1Preamble[cpp.pre]")
[*if-group*](cpp.pre#nt:if-group "15.1Preamble[cpp.pre]") [*elif-groups*](cpp.pre#nt:elif-groups "15.1Preamble[cpp.pre]")opt [*else-group*](cpp.pre#nt:else-group "15.1Preamble[cpp.pre]")opt [*endif-line*](cpp.pre#nt:endif-line "15.1Preamble[cpp.pre]")
[if-group:](cpp.pre#nt:if-group "15.1Preamble[cpp.pre]")
# if [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
# ifdef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
# ifndef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
[elif-groups:](cpp.pre#nt:elif-groups "15.1Preamble[cpp.pre]")
[*elif-group*](cpp.pre#nt:elif-group "15.1Preamble[cpp.pre]") [*elif-groups*](cpp.pre#nt:elif-groups "15.1Preamble[cpp.pre]")opt
[elif-group:](cpp.pre#nt:elif-group "15.1Preamble[cpp.pre]")
# elif [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
# elifdef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
# elifndef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
[else-group:](cpp.pre#nt:else-group "15.1Preamble[cpp.pre]")
# else [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]") [*group*](cpp.pre#nt:group "15.1Preamble[cpp.pre]")opt
[endif-line:](cpp.pre#nt:endif-line "15.1Preamble[cpp.pre]")
# endif [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[text-line:](cpp.pre#nt:text-line "15.1Preamble[cpp.pre]")
[*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[conditionally-supported-directive:](cpp.pre#nt:conditionally-supported-directive "15.1Preamble[cpp.pre]")
[*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[lparen:](cpp.pre#nt:lparen "15.1Preamble[cpp.pre]")
a ( character not immediately preceded by whitespace
[identifier-list:](cpp.pre#nt:identifier-list "15.1Preamble[cpp.pre]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*identifier-list*](cpp.pre#nt:identifier-list "15.1Preamble[cpp.pre]") , [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[replacement-list:](cpp.pre#nt:replacement-list "15.1Preamble[cpp.pre]")
[*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt
[pp-tokens:](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")
[*preprocessing-token*](lex.pptoken#nt:preprocessing-token "5.5Preprocessing tokens[lex.pptoken]") [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt
[embed-parameter-seq:](cpp.pre#nt:embed-parameter-seq "15.1Preamble[cpp.pre]")
[*embed-parameter*](cpp.pre#nt:embed-parameter "15.1Preamble[cpp.pre]") [*embed-parameter-seq*](cpp.pre#nt:embed-parameter-seq "15.1Preamble[cpp.pre]")opt
[embed-parameter:](cpp.pre#nt:embed-parameter "15.1Preamble[cpp.pre]")
[*embed-standard-parameter*](cpp.pre#nt:embed-standard-parameter "15.1Preamble[cpp.pre]")
[*embed-prefixed-parameter*](cpp.pre#nt:embed-prefixed-parameter "15.1Preamble[cpp.pre]")
[embed-standard-parameter:](cpp.pre#nt:embed-standard-parameter "15.1Preamble[cpp.pre]")
limit ( [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]") )
prefix ( [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
suffix ( [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
if_empty ( [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
[embed-prefixed-parameter:](cpp.pre#nt:embed-prefixed-parameter "15.1Preamble[cpp.pre]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") :: [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") :: [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") ( [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
[pp-balanced-token-seq:](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")
[*pp-balanced-token*](cpp.pre#nt:pp-balanced-token "15.1Preamble[cpp.pre]") [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt
[pp-balanced-token:](cpp.pre#nt:pp-balanced-token "15.1Preamble[cpp.pre]")
( [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
[ [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt ]
{ [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt }
any pp-token except:
parenthesis (U+0028 left parenthesis and U+0029 right parenthesis),
bracket (U+005b left square bracket and U+005d right square bracket), or
brace (U+007b left curly bracket and U+007d right curly bracket).
[new-line:](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
the new-line character
[defined-macro-expression:](cpp.cond#nt:defined-macro-expression "15.2Conditional inclusion[cpp.cond]")
defined [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
defined ( [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") )
[h-preprocessing-token:](cpp.cond#nt:h-preprocessing-token "15.2Conditional inclusion[cpp.cond]")
any [*preprocessing-token*](lex.pptoken#nt:preprocessing-token "5.5Preprocessing tokens[lex.pptoken]") other than >
[h-pp-tokens:](cpp.cond#nt:h-pp-tokens "15.2Conditional inclusion[cpp.cond]")
[*h-preprocessing-token*](cpp.cond#nt:h-preprocessing-token "15.2Conditional inclusion[cpp.cond]") [*h-pp-tokens*](cpp.cond#nt:h-pp-tokens "15.2Conditional inclusion[cpp.cond]")opt
[header-name-tokens:](cpp.cond#nt:header-name-tokens "15.2Conditional inclusion[cpp.cond]")
[*string-literal*](lex.string#nt:string-literal "5.13.5String literals[lex.string]")
< [*h-pp-tokens*](cpp.cond#nt:h-pp-tokens "15.2Conditional inclusion[cpp.cond]") >
[has-include-expression:](cpp.cond#nt:has-include-expression "15.2Conditional inclusion[cpp.cond]")
__has_include ( [*header-name*](lex.header#nt:header-name "5.6Header names[lex.header]") )
__has_include ( [*header-name-tokens*](cpp.cond#nt:header-name-tokens "15.2Conditional inclusion[cpp.cond]") )
[has-embed-expression:](cpp.cond#nt:has-embed-expression "15.2Conditional inclusion[cpp.cond]")
__has_embed ( [*header-name*](lex.header#nt:header-name "5.6Header names[lex.header]") [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
__has_embed ( [*header-name-tokens*](cpp.cond#nt:header-name-tokens "15.2Conditional inclusion[cpp.cond]") [*pp-balanced-token-seq*](cpp.pre#nt:pp-balanced-token-seq "15.1Preamble[cpp.pre]")opt )
[has-attribute-expression:](cpp.cond#nt:has-attribute-expression "15.2Conditional inclusion[cpp.cond]")
__has_cpp_attribute ( [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]") )
[pp-module:](cpp.module#nt:pp-module "15.5Module directive[cpp.module]")
exportopt module [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt ; [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[pp-import:](cpp.import#nt:pp-import "15.6Header unit importation[cpp.import]")
exportopt import [*header-name*](lex.header#nt:header-name "5.6Header names[lex.header]") [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt ; [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
exportopt import [*header-name-tokens*](cpp.cond#nt:header-name-tokens "15.2Conditional inclusion[cpp.cond]") [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt ; [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
exportopt import [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]") ; [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
[va-opt-replacement:](cpp.subst#nt:va-opt-replacement "15.7.2Argument substitution[cpp.subst]")
__VA_OPT__ ( [*pp-tokens*](cpp.pre#nt:pp-tokens "15.1Preamble[cpp.pre]")opt )

499
cppdraft/gram/dcl.md Normal file
View File

@@ -0,0 +1,499 @@
[gram.dcl]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.7 Declarations [gram.dcl]
[declaration-seq:](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")
[*declaration*](dcl.pre#nt:declaration "9.1Preamble[dcl.pre]") [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt
[declaration:](dcl.pre#nt:declaration "9.1Preamble[dcl.pre]")
[*name-declaration*](dcl.pre#nt:name-declaration "9.1Preamble[dcl.pre]")
[*special-declaration*](dcl.pre#nt:special-declaration "9.1Preamble[dcl.pre]")
[name-declaration:](dcl.pre#nt:name-declaration "9.1Preamble[dcl.pre]")
[*block-declaration*](dcl.pre#nt:block-declaration "9.1Preamble[dcl.pre]")
[*nodeclspec-function-declaration*](dcl.pre#nt:nodeclspec-function-declaration "9.1Preamble[dcl.pre]")
[*function-definition*](dcl.fct.def.general#nt:function-definition "9.6.1General[dcl.fct.def.general]")
[*friend-type-declaration*](class.mem.general#nt:friend-type-declaration "11.4.1General[class.mem.general]")
[*template-declaration*](temp.pre#nt:template-declaration "13.1Preamble[temp.pre]")
[*deduction-guide*](temp.deduct.guide#nt:deduction-guide "13.7.2.3Deduction guides[temp.deduct.guide]")
[*linkage-specification*](dcl.link#nt:linkage-specification "9.12Linkage specifications[dcl.link]")
[*namespace-definition*](namespace.def.general#nt:namespace-definition "9.9.2.1General[namespace.def.general]")
[*empty-declaration*](dcl.pre#nt:empty-declaration "9.1Preamble[dcl.pre]")
[*attribute-declaration*](dcl.pre#nt:attribute-declaration "9.1Preamble[dcl.pre]")
[*module-import-declaration*](module.import#nt:module-import-declaration "10.3Import declaration[module.import]")
[special-declaration:](dcl.pre#nt:special-declaration "9.1Preamble[dcl.pre]")
[*explicit-instantiation*](temp.explicit#nt:explicit-instantiation "13.9.3Explicit instantiation[temp.explicit]")
[*explicit-specialization*](temp.expl.spec#nt:explicit-specialization "13.9.4Explicit specialization[temp.expl.spec]")
[*export-declaration*](module.interface#nt:export-declaration "10.2Export declaration[module.interface]")
[block-declaration:](dcl.pre#nt:block-declaration "9.1Preamble[dcl.pre]")
[*simple-declaration*](dcl.pre#nt:simple-declaration "9.1Preamble[dcl.pre]")
[*asm-declaration*](dcl.asm#nt:asm-declaration "9.11The asm declaration[dcl.asm]")
[*namespace-alias-definition*](namespace.alias#nt:namespace-alias-definition "9.9.3Namespace alias[namespace.alias]")
[*using-declaration*](namespace.udecl#nt:using-declaration "9.10The using declaration[namespace.udecl]")
[*using-enum-declaration*](enum.udecl#nt:using-enum-declaration "9.8.2The using enum declaration[enum.udecl]")
[*using-directive*](namespace.udir#nt:using-directive "9.9.4Using namespace directive[namespace.udir]")
[*static_assert-declaration*](dcl.pre#nt:static_assert-declaration "9.1Preamble[dcl.pre]")
[*consteval-block-declaration*](dcl.pre#nt:consteval-block-declaration "9.1Preamble[dcl.pre]")
[*alias-declaration*](dcl.pre#nt:alias-declaration "9.1Preamble[dcl.pre]")
[*opaque-enum-declaration*](dcl.enum#nt:opaque-enum-declaration "9.8.1Enumeration declarations[dcl.enum]")
[nodeclspec-function-declaration:](dcl.pre#nt:nodeclspec-function-declaration "9.1Preamble[dcl.pre]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") ;
[alias-declaration:](dcl.pre#nt:alias-declaration "9.1Preamble[dcl.pre]")
using [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt = [*defining-type-id*](dcl.name#nt:defining-type-id "9.3.2Type names[dcl.name]") ;
[sb-identifier:](dcl.pre#nt:sb-identifier "9.1Preamble[dcl.pre]")
...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[sb-identifier-list:](dcl.pre#nt:sb-identifier-list "9.1Preamble[dcl.pre]")
[*sb-identifier*](dcl.pre#nt:sb-identifier "9.1Preamble[dcl.pre]")
[*sb-identifier-list*](dcl.pre#nt:sb-identifier-list "9.1Preamble[dcl.pre]") , [*sb-identifier*](dcl.pre#nt:sb-identifier "9.1Preamble[dcl.pre]")
[structured-binding-declaration:](dcl.pre#nt:structured-binding-declaration "9.1Preamble[dcl.pre]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*ref-qualifier*](dcl.decl.general#nt:ref-qualifier "9.3.1General[dcl.decl.general]")opt [ [*sb-identifier-list*](dcl.pre#nt:sb-identifier-list "9.1Preamble[dcl.pre]") ]
[simple-declaration:](dcl.pre#nt:simple-declaration "9.1Preamble[dcl.pre]")
[*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*init-declarator-list*](dcl.decl.general#nt:init-declarator-list "9.3.1General[dcl.decl.general]")opt ;
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*init-declarator-list*](dcl.decl.general#nt:init-declarator-list "9.3.1General[dcl.decl.general]") ;
[*structured-binding-declaration*](dcl.pre#nt:structured-binding-declaration "9.1Preamble[dcl.pre]") [*initializer*](dcl.init.general#nt:initializer "9.5.1General[dcl.init.general]") ;
[static_assert-message:](dcl.pre#nt:static_assert-message "9.1Preamble[dcl.pre]")
[*unevaluated-string*](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]")
[*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")
[static_assert-declaration:](dcl.pre#nt:static_assert-declaration "9.1Preamble[dcl.pre]")
static_assert ( [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") ) ;
static_assert ( [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") , [*static_assert-message*](dcl.pre#nt:static_assert-message "9.1Preamble[dcl.pre]") ) ;
[consteval-block-declaration:](dcl.pre#nt:consteval-block-declaration "9.1Preamble[dcl.pre]")
consteval [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[empty-declaration:](dcl.pre#nt:empty-declaration "9.1Preamble[dcl.pre]")
;
[attribute-declaration:](dcl.pre#nt:attribute-declaration "9.1Preamble[dcl.pre]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ;
[decl-specifier:](dcl.spec.general#nt:decl-specifier "9.2.1General[dcl.spec.general]")
[*storage-class-specifier*](dcl.stc#nt:storage-class-specifier "9.2.2Storage class specifiers[dcl.stc]")
[*defining-type-specifier*](dcl.type.general#nt:defining-type-specifier "9.2.9.1General[dcl.type.general]")
[*function-specifier*](dcl.fct.spec#nt:function-specifier "9.2.3Function specifiers[dcl.fct.spec]")
friend
typedef
constexpr
consteval
constinit
inline
[decl-specifier-seq:](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]")
[*decl-specifier*](dcl.spec.general#nt:decl-specifier "9.2.1General[dcl.spec.general]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*decl-specifier*](dcl.spec.general#nt:decl-specifier "9.2.1General[dcl.spec.general]") [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]")
[storage-class-specifier:](dcl.stc#nt:storage-class-specifier "9.2.2Storage class specifiers[dcl.stc]")
static
thread_local
extern
mutable
[function-specifier:](dcl.fct.spec#nt:function-specifier "9.2.3Function specifiers[dcl.fct.spec]")
virtual
[*explicit-specifier*](dcl.fct.spec#nt:explicit-specifier "9.2.3Function specifiers[dcl.fct.spec]")
[explicit-specifier:](dcl.fct.spec#nt:explicit-specifier "9.2.3Function specifiers[dcl.fct.spec]")
explicit ( [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") )
explicit
[typedef-name:](dcl.typedef#nt:typedef-name "9.2.4The typedef specifier[dcl.typedef]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[type-specifier:](dcl.type.general#nt:type-specifier "9.2.9.1General[dcl.type.general]")
[*simple-type-specifier*](dcl.type.simple#nt:simple-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*elaborated-type-specifier*](dcl.type.elab#nt:elaborated-type-specifier "9.2.9.5Elaborated type specifiers[dcl.type.elab]")
[*typename-specifier*](temp.res.general#nt:typename-specifier "13.8.1General[temp.res.general]")
[*cv-qualifier*](dcl.decl.general#nt:cv-qualifier "9.3.1General[dcl.decl.general]")
[type-specifier-seq:](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]")
[*type-specifier*](dcl.type.general#nt:type-specifier "9.2.9.1General[dcl.type.general]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*type-specifier*](dcl.type.general#nt:type-specifier "9.2.9.1General[dcl.type.general]") [*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]")
[defining-type-specifier:](dcl.type.general#nt:defining-type-specifier "9.2.9.1General[dcl.type.general]")
[*type-specifier*](dcl.type.general#nt:type-specifier "9.2.9.1General[dcl.type.general]")
[*class-specifier*](class.pre#nt:class-specifier "11.1Preamble[class.pre]")
[*enum-specifier*](dcl.enum#nt:enum-specifier "9.8.1Enumeration declarations[dcl.enum]")
[defining-type-specifier-seq:](dcl.type.general#nt:defining-type-specifier-seq "9.2.9.1General[dcl.type.general]")
[*defining-type-specifier*](dcl.type.general#nt:defining-type-specifier "9.2.9.1General[dcl.type.general]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*defining-type-specifier*](dcl.type.general#nt:defining-type-specifier "9.2.9.1General[dcl.type.general]") [*defining-type-specifier-seq*](dcl.type.general#nt:defining-type-specifier-seq "9.2.9.1General[dcl.type.general]")
[simple-type-specifier:](dcl.type.simple#nt:simple-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*type-name*](dcl.type.simple#nt:type-name "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") template [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*computed-type-specifier*](dcl.type.simple#nt:computed-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*placeholder-type-specifier*](dcl.spec.auto.general#nt:placeholder-type-specifier "9.2.9.7.1General[dcl.spec.auto.general]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
char
char8_t
char16_t
char32_t
wchar_t
bool
short
int
long
signed
unsigned
float
double
void
[type-name:](dcl.type.simple#nt:type-name "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*class-name*](class.pre#nt:class-name "11.1Preamble[class.pre]")
[*enum-name*](dcl.enum#nt:enum-name "9.8.1Enumeration declarations[dcl.enum]")
[*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4The typedef specifier[dcl.typedef]")
[computed-type-specifier:](dcl.type.simple#nt:computed-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*decltype-specifier*](dcl.type.decltype#nt:decltype-specifier "9.2.9.6Decltype specifiers[dcl.type.decltype]")
[*pack-index-specifier*](dcl.type.pack.index#nt:pack-index-specifier "9.2.9.4Pack indexing specifier[dcl.type.pack.index]")
[*splice-type-specifier*](dcl.type.splice#nt:splice-type-specifier "9.2.9.9Type splicing[dcl.type.splice]")
[pack-index-specifier:](dcl.type.pack.index#nt:pack-index-specifier "9.2.9.4Pack indexing specifier[dcl.type.pack.index]")
[*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4The typedef specifier[dcl.typedef]") ... [ [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") ]
[elaborated-type-specifier:](dcl.type.elab#nt:elaborated-type-specifier "9.2.9.5Elaborated type specifiers[dcl.type.elab]")
[*class-key*](class.pre#nt:class-key "11.1Preamble[class.pre]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*class-key*](class.pre#nt:class-key "11.1Preamble[class.pre]") [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*class-key*](class.pre#nt:class-key "11.1Preamble[class.pre]") [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") templateopt [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
enum [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[decltype-specifier:](dcl.type.decltype#nt:decltype-specifier "9.2.9.6Decltype specifiers[dcl.type.decltype]")
decltype ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
[placeholder-type-specifier:](dcl.spec.auto.general#nt:placeholder-type-specifier "9.2.9.7.1General[dcl.spec.auto.general]")
[*type-constraint*](temp.param#nt:type-constraint "13.2Template parameters[temp.param]")opt auto
[*type-constraint*](temp.param#nt:type-constraint "13.2Template parameters[temp.param]")opt decltype ( auto )
[splice-type-specifier:](dcl.type.splice#nt:splice-type-specifier "9.2.9.9Type splicing[dcl.type.splice]")
typenameopt [*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]")
typenameopt [*splice-specialization-specifier*](basic.splice#nt:splice-specialization-specifier "6.6Splice specifiers[basic.splice]")
[init-declarator-list:](dcl.decl.general#nt:init-declarator-list "9.3.1General[dcl.decl.general]")
[*init-declarator*](dcl.decl.general#nt:init-declarator "9.3.1General[dcl.decl.general]")
[*init-declarator-list*](dcl.decl.general#nt:init-declarator-list "9.3.1General[dcl.decl.general]") , [*init-declarator*](dcl.decl.general#nt:init-declarator "9.3.1General[dcl.decl.general]")
[init-declarator:](dcl.decl.general#nt:init-declarator "9.3.1General[dcl.decl.general]")
[*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*initializer*](dcl.init.general#nt:initializer "9.5.1General[dcl.init.general]")
[*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")opt [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
[declarator:](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]")
[*ptr-declarator*](dcl.decl.general#nt:ptr-declarator "9.3.1General[dcl.decl.general]")
[*noptr-declarator*](dcl.decl.general#nt:noptr-declarator "9.3.1General[dcl.decl.general]") [*parameters-and-qualifiers*](dcl.decl.general#nt:parameters-and-qualifiers "9.3.1General[dcl.decl.general]") [*trailing-return-type*](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")
[ptr-declarator:](dcl.decl.general#nt:ptr-declarator "9.3.1General[dcl.decl.general]")
[*noptr-declarator*](dcl.decl.general#nt:noptr-declarator "9.3.1General[dcl.decl.general]")
[*ptr-operator*](dcl.decl.general#nt:ptr-operator "9.3.1General[dcl.decl.general]") [*ptr-declarator*](dcl.decl.general#nt:ptr-declarator "9.3.1General[dcl.decl.general]")
[noptr-declarator:](dcl.decl.general#nt:noptr-declarator "9.3.1General[dcl.decl.general]")
[*declarator-id*](dcl.decl.general#nt:declarator-id "9.3.1General[dcl.decl.general]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*noptr-declarator*](dcl.decl.general#nt:noptr-declarator "9.3.1General[dcl.decl.general]") [*parameters-and-qualifiers*](dcl.decl.general#nt:parameters-and-qualifiers "9.3.1General[dcl.decl.general]")
[*noptr-declarator*](dcl.decl.general#nt:noptr-declarator "9.3.1General[dcl.decl.general]") [ [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")opt ] [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
( [*ptr-declarator*](dcl.decl.general#nt:ptr-declarator "9.3.1General[dcl.decl.general]") )
[parameters-and-qualifiers:](dcl.decl.general#nt:parameters-and-qualifiers "9.3.1General[dcl.decl.general]")
( [*parameter-declaration-clause*](dcl.fct#nt:parameter-declaration-clause "9.3.4.6Functions[dcl.fct]") ) [*cv-qualifier-seq*](dcl.decl.general#nt:cv-qualifier-seq "9.3.1General[dcl.decl.general]")opt
[*ref-qualifier*](dcl.decl.general#nt:ref-qualifier "9.3.1General[dcl.decl.general]")opt [*noexcept-specifier*](except.spec#nt:noexcept-specifier "14.5Exception specifications[except.spec]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[trailing-return-type:](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")
-> [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]")
[ptr-operator:](dcl.decl.general#nt:ptr-operator "9.3.1General[dcl.decl.general]")
* [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*cv-qualifier-seq*](dcl.decl.general#nt:cv-qualifier-seq "9.3.1General[dcl.decl.general]")opt
& [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
&& [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") * [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*cv-qualifier-seq*](dcl.decl.general#nt:cv-qualifier-seq "9.3.1General[dcl.decl.general]")opt
[cv-qualifier-seq:](dcl.decl.general#nt:cv-qualifier-seq "9.3.1General[dcl.decl.general]")
[*cv-qualifier*](dcl.decl.general#nt:cv-qualifier "9.3.1General[dcl.decl.general]") [*cv-qualifier-seq*](dcl.decl.general#nt:cv-qualifier-seq "9.3.1General[dcl.decl.general]")opt
[cv-qualifier:](dcl.decl.general#nt:cv-qualifier "9.3.1General[dcl.decl.general]")
const
volatile
[ref-qualifier:](dcl.decl.general#nt:ref-qualifier "9.3.1General[dcl.decl.general]")
&
&&
[declarator-id:](dcl.decl.general#nt:declarator-id "9.3.1General[dcl.decl.general]")
...opt [*id-expression*](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]")
[type-id:](dcl.name#nt:type-id "9.3.2Type names[dcl.name]")
[*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]") [*abstract-declarator*](dcl.name#nt:abstract-declarator "9.3.2Type names[dcl.name]")opt
[defining-type-id:](dcl.name#nt:defining-type-id "9.3.2Type names[dcl.name]")
[*defining-type-specifier-seq*](dcl.type.general#nt:defining-type-specifier-seq "9.2.9.1General[dcl.type.general]") [*abstract-declarator*](dcl.name#nt:abstract-declarator "9.3.2Type names[dcl.name]")opt
[abstract-declarator:](dcl.name#nt:abstract-declarator "9.3.2Type names[dcl.name]")
[*ptr-abstract-declarator*](dcl.name#nt:ptr-abstract-declarator "9.3.2Type names[dcl.name]")
[*noptr-abstract-declarator*](dcl.name#nt:noptr-abstract-declarator "9.3.2Type names[dcl.name]")opt [*parameters-and-qualifiers*](dcl.decl.general#nt:parameters-and-qualifiers "9.3.1General[dcl.decl.general]") [*trailing-return-type*](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")
[*abstract-pack-declarator*](dcl.name#nt:abstract-pack-declarator "9.3.2Type names[dcl.name]")
[ptr-abstract-declarator:](dcl.name#nt:ptr-abstract-declarator "9.3.2Type names[dcl.name]")
[*noptr-abstract-declarator*](dcl.name#nt:noptr-abstract-declarator "9.3.2Type names[dcl.name]")
[*ptr-operator*](dcl.decl.general#nt:ptr-operator "9.3.1General[dcl.decl.general]") [*ptr-abstract-declarator*](dcl.name#nt:ptr-abstract-declarator "9.3.2Type names[dcl.name]")opt
[noptr-abstract-declarator:](dcl.name#nt:noptr-abstract-declarator "9.3.2Type names[dcl.name]")
[*noptr-abstract-declarator*](dcl.name#nt:noptr-abstract-declarator "9.3.2Type names[dcl.name]")opt [*parameters-and-qualifiers*](dcl.decl.general#nt:parameters-and-qualifiers "9.3.1General[dcl.decl.general]")
[*noptr-abstract-declarator*](dcl.name#nt:noptr-abstract-declarator "9.3.2Type names[dcl.name]")opt [ [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")opt ] [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
( [*ptr-abstract-declarator*](dcl.name#nt:ptr-abstract-declarator "9.3.2Type names[dcl.name]") )
[abstract-pack-declarator:](dcl.name#nt:abstract-pack-declarator "9.3.2Type names[dcl.name]")
[*noptr-abstract-pack-declarator*](dcl.name#nt:noptr-abstract-pack-declarator "9.3.2Type names[dcl.name]")
[*ptr-operator*](dcl.decl.general#nt:ptr-operator "9.3.1General[dcl.decl.general]") [*abstract-pack-declarator*](dcl.name#nt:abstract-pack-declarator "9.3.2Type names[dcl.name]")
[noptr-abstract-pack-declarator:](dcl.name#nt:noptr-abstract-pack-declarator "9.3.2Type names[dcl.name]")
[*noptr-abstract-pack-declarator*](dcl.name#nt:noptr-abstract-pack-declarator "9.3.2Type names[dcl.name]") [*parameters-and-qualifiers*](dcl.decl.general#nt:parameters-and-qualifiers "9.3.1General[dcl.decl.general]")
...
[parameter-declaration-clause:](dcl.fct#nt:parameter-declaration-clause "9.3.4.6Functions[dcl.fct]")
...
[*parameter-declaration-list*](dcl.fct#nt:parameter-declaration-list "9.3.4.6Functions[dcl.fct]")opt
[*parameter-declaration-list*](dcl.fct#nt:parameter-declaration-list "9.3.4.6Functions[dcl.fct]") , ...
[*parameter-declaration-list*](dcl.fct#nt:parameter-declaration-list "9.3.4.6Functions[dcl.fct]") ...
[parameter-declaration-list:](dcl.fct#nt:parameter-declaration-list "9.3.4.6Functions[dcl.fct]")
[*parameter-declaration*](dcl.fct#nt:parameter-declaration "9.3.4.6Functions[dcl.fct]")
[*parameter-declaration-list*](dcl.fct#nt:parameter-declaration-list "9.3.4.6Functions[dcl.fct]") , [*parameter-declaration*](dcl.fct#nt:parameter-declaration "9.3.4.6Functions[dcl.fct]")
[parameter-declaration:](dcl.fct#nt:parameter-declaration "9.3.4.6Functions[dcl.fct]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt thisopt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") = [*initializer-clause*](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt thisopt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*abstract-declarator*](dcl.name#nt:abstract-declarator "9.3.2Type names[dcl.name]")opt
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*abstract-declarator*](dcl.name#nt:abstract-declarator "9.3.2Type names[dcl.name]")opt = [*initializer-clause*](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]")
[function-contract-specifier-seq:](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")
[*function-contract-specifier*](dcl.contract.func#nt:function-contract-specifier "9.4.1General[dcl.contract.func]") [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
[function-contract-specifier:](dcl.contract.func#nt:function-contract-specifier "9.4.1General[dcl.contract.func]")
[*precondition-specifier*](dcl.contract.func#nt:precondition-specifier "9.4.1General[dcl.contract.func]")
[*postcondition-specifier*](dcl.contract.func#nt:postcondition-specifier "9.4.1General[dcl.contract.func]")
[precondition-specifier:](dcl.contract.func#nt:precondition-specifier "9.4.1General[dcl.contract.func]")
pre [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ( [*conditional-expression*](expr.cond#nt:conditional-expression "7.6.16Conditional operator[expr.cond]") )
[postcondition-specifier:](dcl.contract.func#nt:postcondition-specifier "9.4.1General[dcl.contract.func]")
post [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ( [*result-name-introducer*](dcl.contract.res#nt:result-name-introducer "9.4.2Referring to the result object[dcl.contract.res]")opt [*conditional-expression*](expr.cond#nt:conditional-expression "7.6.16Conditional operator[expr.cond]") )
[attributed-identifier:](dcl.contract.res#nt:attributed-identifier "9.4.2Referring to the result object[dcl.contract.res]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[result-name-introducer:](dcl.contract.res#nt:result-name-introducer "9.4.2Referring to the result object[dcl.contract.res]")
[*attributed-identifier*](dcl.contract.res#nt:attributed-identifier "9.4.2Referring to the result object[dcl.contract.res]") :
[initializer:](dcl.init.general#nt:initializer "9.5.1General[dcl.init.general]")
[*brace-or-equal-initializer*](dcl.init.general#nt:brace-or-equal-initializer "9.5.1General[dcl.init.general]")
( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]") )
[brace-or-equal-initializer:](dcl.init.general#nt:brace-or-equal-initializer "9.5.1General[dcl.init.general]")
= [*initializer-clause*](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]")
[*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[initializer-clause:](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]")
[*assignment-expression*](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")
[*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[braced-init-list:](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
{ [*initializer-list*](dcl.init.general#nt:initializer-list "9.5.1General[dcl.init.general]") ,opt }
{ [*designated-initializer-list*](dcl.init.general#nt:designated-initializer-list "9.5.1General[dcl.init.general]") ,opt }
{ }
[initializer-list:](dcl.init.general#nt:initializer-list "9.5.1General[dcl.init.general]")
[*initializer-clause*](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]") ...opt
[*initializer-list*](dcl.init.general#nt:initializer-list "9.5.1General[dcl.init.general]") , [*initializer-clause*](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]") ...opt
[designated-initializer-list:](dcl.init.general#nt:designated-initializer-list "9.5.1General[dcl.init.general]")
[*designated-initializer-clause*](dcl.init.general#nt:designated-initializer-clause "9.5.1General[dcl.init.general]")
[*designated-initializer-list*](dcl.init.general#nt:designated-initializer-list "9.5.1General[dcl.init.general]") , [*designated-initializer-clause*](dcl.init.general#nt:designated-initializer-clause "9.5.1General[dcl.init.general]")
[designated-initializer-clause:](dcl.init.general#nt:designated-initializer-clause "9.5.1General[dcl.init.general]")
[*designator*](dcl.init.general#nt:designator "9.5.1General[dcl.init.general]") [*brace-or-equal-initializer*](dcl.init.general#nt:brace-or-equal-initializer "9.5.1General[dcl.init.general]")
[designator:](dcl.init.general#nt:designator "9.5.1General[dcl.init.general]")
. [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[expr-or-braced-init-list:](dcl.init.general#nt:expr-or-braced-init-list "9.5.1General[dcl.init.general]")
[*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")
[*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[function-definition:](dcl.fct.def.general#nt:function-definition "9.6.1General[dcl.fct.def.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]")opt [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*virt-specifier-seq*](class.mem.general#nt:virt-specifier-seq "11.4.1General[class.mem.general]")opt
[*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt [*function-body*](dcl.fct.def.general#nt:function-body "9.6.1General[dcl.fct.def.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]")opt [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")
[*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt [*function-body*](dcl.fct.def.general#nt:function-body "9.6.1General[dcl.fct.def.general]")
[function-body:](dcl.fct.def.general#nt:function-body "9.6.1General[dcl.fct.def.general]")
[*ctor-initializer*](class.base.init#nt:ctor-initializer "11.9.3Initializing bases and members[class.base.init]")opt [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[*function-try-block*](except.pre#nt:function-try-block "14.1Preamble[except.pre]")
= default ;
[*deleted-function-body*](dcl.fct.def.general#nt:deleted-function-body "9.6.1General[dcl.fct.def.general]")
[deleted-function-body:](dcl.fct.def.general#nt:deleted-function-body "9.6.1General[dcl.fct.def.general]")
= delete ;
= delete ( [*unevaluated-string*](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]") ) ;
[enum-name:](dcl.enum#nt:enum-name "9.8.1Enumeration declarations[dcl.enum]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[enum-specifier:](dcl.enum#nt:enum-specifier "9.8.1Enumeration declarations[dcl.enum]")
[*enum-head*](dcl.enum#nt:enum-head "9.8.1Enumeration declarations[dcl.enum]") { [*enumerator-list*](dcl.enum#nt:enumerator-list "9.8.1Enumeration declarations[dcl.enum]")opt }
[*enum-head*](dcl.enum#nt:enum-head "9.8.1Enumeration declarations[dcl.enum]") { [*enumerator-list*](dcl.enum#nt:enumerator-list "9.8.1Enumeration declarations[dcl.enum]") , }
[enum-head:](dcl.enum#nt:enum-head "9.8.1Enumeration declarations[dcl.enum]")
[*enum-key*](dcl.enum#nt:enum-key "9.8.1Enumeration declarations[dcl.enum]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*enum-head-name*](dcl.enum#nt:enum-head-name "9.8.1Enumeration declarations[dcl.enum]")opt [*enum-base*](dcl.enum#nt:enum-base "9.8.1Enumeration declarations[dcl.enum]")opt
[enum-head-name:](dcl.enum#nt:enum-head-name "9.8.1Enumeration declarations[dcl.enum]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[opaque-enum-declaration:](dcl.enum#nt:opaque-enum-declaration "9.8.1Enumeration declarations[dcl.enum]")
[*enum-key*](dcl.enum#nt:enum-key "9.8.1Enumeration declarations[dcl.enum]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*enum-head-name*](dcl.enum#nt:enum-head-name "9.8.1Enumeration declarations[dcl.enum]") [*enum-base*](dcl.enum#nt:enum-base "9.8.1Enumeration declarations[dcl.enum]")opt ;
[enum-key:](dcl.enum#nt:enum-key "9.8.1Enumeration declarations[dcl.enum]")
enum
enum class
enum struct
[enum-base:](dcl.enum#nt:enum-base "9.8.1Enumeration declarations[dcl.enum]")
: [*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]")
[enumerator-list:](dcl.enum#nt:enumerator-list "9.8.1Enumeration declarations[dcl.enum]")
[*enumerator-definition*](dcl.enum#nt:enumerator-definition "9.8.1Enumeration declarations[dcl.enum]")
[*enumerator-list*](dcl.enum#nt:enumerator-list "9.8.1Enumeration declarations[dcl.enum]") , [*enumerator-definition*](dcl.enum#nt:enumerator-definition "9.8.1Enumeration declarations[dcl.enum]")
[enumerator-definition:](dcl.enum#nt:enumerator-definition "9.8.1Enumeration declarations[dcl.enum]")
[*enumerator*](dcl.enum#nt:enumerator "9.8.1Enumeration declarations[dcl.enum]")
[*enumerator*](dcl.enum#nt:enumerator "9.8.1Enumeration declarations[dcl.enum]") = [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")
[enumerator:](dcl.enum#nt:enumerator "9.8.1Enumeration declarations[dcl.enum]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[using-enum-declaration:](enum.udecl#nt:using-enum-declaration "9.8.2The using enum declaration[enum.udecl]")
using enum [*using-enum-declarator*](enum.udecl#nt:using-enum-declarator "9.8.2The using enum declaration[enum.udecl]") ;
[using-enum-declarator:](enum.udecl#nt:using-enum-declarator "9.8.2The using enum declaration[enum.udecl]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*splice-type-specifier*](dcl.type.splice#nt:splice-type-specifier "9.2.9.9Type splicing[dcl.type.splice]")
[namespace-name:](namespace.def.general#nt:namespace-name "9.9.2.1General[namespace.def.general]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*namespace-alias*](namespace.alias#nt:namespace-alias "9.9.3Namespace alias[namespace.alias]")
[namespace-definition:](namespace.def.general#nt:namespace-definition "9.9.2.1General[namespace.def.general]")
[*named-namespace-definition*](namespace.def.general#nt:named-namespace-definition "9.9.2.1General[namespace.def.general]")
[*unnamed-namespace-definition*](namespace.def.general#nt:unnamed-namespace-definition "9.9.2.1General[namespace.def.general]")
[*nested-namespace-definition*](namespace.def.general#nt:nested-namespace-definition "9.9.2.1General[namespace.def.general]")
[named-namespace-definition:](namespace.def.general#nt:named-namespace-definition "9.9.2.1General[namespace.def.general]")
inlineopt namespace [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") { [*namespace-body*](namespace.def.general#nt:namespace-body "9.9.2.1General[namespace.def.general]") }
[unnamed-namespace-definition:](namespace.def.general#nt:unnamed-namespace-definition "9.9.2.1General[namespace.def.general]")
inlineopt namespace [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt { [*namespace-body*](namespace.def.general#nt:namespace-body "9.9.2.1General[namespace.def.general]") }
[nested-namespace-definition:](namespace.def.general#nt:nested-namespace-definition "9.9.2.1General[namespace.def.general]")
namespace [*enclosing-namespace-specifier*](namespace.def.general#nt:enclosing-namespace-specifier "9.9.2.1General[namespace.def.general]") :: inlineopt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") { [*namespace-body*](namespace.def.general#nt:namespace-body "9.9.2.1General[namespace.def.general]") }
[enclosing-namespace-specifier:](namespace.def.general#nt:enclosing-namespace-specifier "9.9.2.1General[namespace.def.general]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*enclosing-namespace-specifier*](namespace.def.general#nt:enclosing-namespace-specifier "9.9.2.1General[namespace.def.general]") :: inlineopt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[namespace-body:](namespace.def.general#nt:namespace-body "9.9.2.1General[namespace.def.general]")
[*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt
[namespace-alias:](namespace.alias#nt:namespace-alias "9.9.3Namespace alias[namespace.alias]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[namespace-alias-definition:](namespace.alias#nt:namespace-alias-definition "9.9.3Namespace alias[namespace.alias]")
namespace [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") = [*qualified-namespace-specifier*](namespace.alias#nt:qualified-namespace-specifier "9.9.3Namespace alias[namespace.alias]") ;
namespace [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") = [*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]") ;
[qualified-namespace-specifier:](namespace.alias#nt:qualified-namespace-specifier "9.9.3Namespace alias[namespace.alias]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*namespace-name*](namespace.def.general#nt:namespace-name "9.9.2.1General[namespace.def.general]")
[using-directive:](namespace.udir#nt:using-directive "9.9.4Using namespace directive[namespace.udir]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt using namespace [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*namespace-name*](namespace.def.general#nt:namespace-name "9.9.2.1General[namespace.def.general]") ;
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt using namespace [*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]") ;
[using-declaration:](namespace.udecl#nt:using-declaration "9.10The using declaration[namespace.udecl]")
using [*using-declarator-list*](namespace.udecl#nt:using-declarator-list "9.10The using declaration[namespace.udecl]") ;
[using-declarator-list:](namespace.udecl#nt:using-declarator-list "9.10The using declaration[namespace.udecl]")
[*using-declarator*](namespace.udecl#nt:using-declarator "9.10The using declaration[namespace.udecl]") ...opt
[*using-declarator-list*](namespace.udecl#nt:using-declarator-list "9.10The using declaration[namespace.udecl]") , [*using-declarator*](namespace.udecl#nt:using-declarator "9.10The using declaration[namespace.udecl]") ...opt
[using-declarator:](namespace.udecl#nt:using-declarator "9.10The using declaration[namespace.udecl]")
typenameopt [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") [*unqualified-id*](expr.prim.id.unqual#nt:unqualified-id "7.5.5.2Unqualified names[expr.prim.id.unqual]")
[asm-declaration:](dcl.asm#nt:asm-declaration "9.11The asm declaration[dcl.asm]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt asm ( [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ) ;
[linkage-specification:](dcl.link#nt:linkage-specification "9.12Linkage specifications[dcl.link]")
extern [*unevaluated-string*](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]") { [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt }
extern [*unevaluated-string*](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]") [*name-declaration*](dcl.pre#nt:name-declaration "9.1Preamble[dcl.pre]")
[attribute-specifier-seq:](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*attribute-specifier*](dcl.attr.grammar#nt:attribute-specifier "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[attribute-specifier:](dcl.attr.grammar#nt:attribute-specifier "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[ [ [*attribute-using-prefix*](dcl.attr.grammar#nt:attribute-using-prefix "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*attribute-list*](dcl.attr.grammar#nt:attribute-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ] ]
[ [ [*annotation-list*](dcl.attr.grammar#nt:annotation-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ] ]
[*alignment-specifier*](dcl.attr.grammar#nt:alignment-specifier "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[alignment-specifier:](dcl.attr.grammar#nt:alignment-specifier "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
alignas ( [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") ...opt )
alignas ( [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") ...opt )
[attribute-using-prefix:](dcl.attr.grammar#nt:attribute-using-prefix "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
using [*attribute-namespace*](dcl.attr.grammar#nt:attribute-namespace "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") :
[attribute-list:](dcl.attr.grammar#nt:attribute-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*attribute*](dcl.attr.grammar#nt:attribute "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*attribute-list*](dcl.attr.grammar#nt:attribute-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") , [*attribute*](dcl.attr.grammar#nt:attribute "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*attribute*](dcl.attr.grammar#nt:attribute "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ...
[*attribute-list*](dcl.attr.grammar#nt:attribute-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") , [*attribute*](dcl.attr.grammar#nt:attribute "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ...
[annotation-list:](dcl.attr.grammar#nt:annotation-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*annotation*](dcl.attr.grammar#nt:annotation "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ...opt
[*annotation-list*](dcl.attr.grammar#nt:annotation-list "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") , [*annotation*](dcl.attr.grammar#nt:annotation "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") ...opt
[attribute:](dcl.attr.grammar#nt:attribute "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*attribute-token*](dcl.attr.grammar#nt:attribute-token "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") [*attribute-argument-clause*](dcl.attr.grammar#nt:attribute-argument-clause "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[annotation:](dcl.attr.grammar#nt:annotation "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
= [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")
[attribute-token:](dcl.attr.grammar#nt:attribute-token "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*attribute-scoped-token*](dcl.attr.grammar#nt:attribute-scoped-token "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[attribute-scoped-token:](dcl.attr.grammar#nt:attribute-scoped-token "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*attribute-namespace*](dcl.attr.grammar#nt:attribute-namespace "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") :: [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[attribute-namespace:](dcl.attr.grammar#nt:attribute-namespace "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[attribute-argument-clause:](dcl.attr.grammar#nt:attribute-argument-clause "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
( [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt )
[balanced-token-seq:](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
[*balanced-token*](dcl.attr.grammar#nt:balanced-token "9.13.1Attribute syntax and semantics[dcl.attr.grammar]") [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[balanced-token:](dcl.attr.grammar#nt:balanced-token "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")
( [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt )
[ [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ]
{ [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt }
[: [*balanced-token-seq*](dcl.attr.grammar#nt:balanced-token-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt :]
any [*token*](lex.token#nt:token "5.10Tokens[lex.token]") other than (, ), [, ], {, }, [:, or :]

26
cppdraft/gram/except.md Normal file
View File

@@ -0,0 +1,26 @@
[gram.except]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.12 Exception handling [gram.except]
[try-block:](except.pre#nt:try-block "14.1Preamble[except.pre]")
try [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]") [*handler-seq*](except.pre#nt:handler-seq "14.1Preamble[except.pre]")
[function-try-block:](except.pre#nt:function-try-block "14.1Preamble[except.pre]")
try [*ctor-initializer*](class.base.init#nt:ctor-initializer "11.9.3Initializing bases and members[class.base.init]")opt [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]") [*handler-seq*](except.pre#nt:handler-seq "14.1Preamble[except.pre]")
[handler-seq:](except.pre#nt:handler-seq "14.1Preamble[except.pre]")
[*handler*](except.pre#nt:handler "14.1Preamble[except.pre]") [*handler-seq*](except.pre#nt:handler-seq "14.1Preamble[except.pre]")opt
[handler:](except.pre#nt:handler "14.1Preamble[except.pre]")
catch ( [*exception-declaration*](except.pre#nt:exception-declaration "14.1Preamble[except.pre]") ) [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[exception-declaration:](except.pre#nt:exception-declaration "14.1Preamble[except.pre]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]") [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]") [*abstract-declarator*](dcl.name#nt:abstract-declarator "9.3.2Type names[dcl.name]")opt
...
[noexcept-specifier:](except.spec#nt:noexcept-specifier "14.5Exception specifications[except.spec]")
noexcept ( [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") )
noexcept

322
cppdraft/gram/expr.md Normal file
View File

@@ -0,0 +1,322 @@
[gram.expr]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.5 Expressions [gram.expr]
[primary-expression:](expr.prim.grammar#nt:primary-expression "7.5.1Grammar[expr.prim.grammar]")
[*literal*](lex.literal.kinds#nt:literal "5.13.1Kinds of literals[lex.literal.kinds]")
this
( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
[*id-expression*](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]")
[*lambda-expression*](expr.prim.lambda.general#nt:lambda-expression "7.5.6.1General[expr.prim.lambda.general]")
[*fold-expression*](expr.prim.fold#nt:fold-expression "7.5.7Fold expressions[expr.prim.fold]")
[*requires-expression*](expr.prim.req.general#nt:requires-expression "7.5.8.1General[expr.prim.req.general]")
[*splice-expression*](expr.prim.splice#nt:splice-expression "7.5.9Expression splicing[expr.prim.splice]")
[id-expression:](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]")
[*unqualified-id*](expr.prim.id.unqual#nt:unqualified-id "7.5.5.2Unqualified names[expr.prim.id.unqual]")
[*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3Qualified names[expr.prim.id.qual]")
[*pack-index-expression*](expr.prim.pack.index#nt:pack-index-expression "7.5.5.4Pack indexing expression[expr.prim.pack.index]")
[unqualified-id:](expr.prim.id.unqual#nt:unqualified-id "7.5.5.2Unqualified names[expr.prim.id.unqual]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*operator-function-id*](over.oper.general#nt:operator-function-id "12.4.1General[over.oper.general]")
[*conversion-function-id*](class.conv.fct#nt:conversion-function-id "11.4.8.3Conversion functions[class.conv.fct]")
[*literal-operator-id*](over.literal#nt:literal-operator-id "12.6User-defined literals[over.literal]")
~ [*type-name*](dcl.type.simple#nt:type-name "9.2.9.3Simple type specifiers[dcl.type.simple]")
~ [*computed-type-specifier*](dcl.type.simple#nt:computed-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]")
[*template-id*](temp.names#nt:template-id "13.3Names of template specializations[temp.names]")
[qualified-id:](expr.prim.id.qual#nt:qualified-id "7.5.5.3Qualified names[expr.prim.id.qual]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") templateopt [*unqualified-id*](expr.prim.id.unqual#nt:unqualified-id "7.5.5.2Unqualified names[expr.prim.id.unqual]")
[nested-name-specifier:](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")
::
[*type-name*](dcl.type.simple#nt:type-name "9.2.9.3Simple type specifiers[dcl.type.simple]") ::
[*namespace-name*](namespace.def.general#nt:namespace-name "9.9.2.1General[namespace.def.general]") ::
[*computed-type-specifier*](dcl.type.simple#nt:computed-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]") ::
[*splice-scope-specifier*](expr.prim.id.qual#nt:splice-scope-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") ::
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") ::
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") templateopt [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]") ::
[splice-scope-specifier:](expr.prim.id.qual#nt:splice-scope-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")
[*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]")
templateopt [*splice-specialization-specifier*](basic.splice#nt:splice-specialization-specifier "6.6Splice specifiers[basic.splice]")
[pack-index-expression:](expr.prim.pack.index#nt:pack-index-expression "7.5.5.4Pack indexing expression[expr.prim.pack.index]")
[*id-expression*](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]") ... [ [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") ]
[lambda-expression:](expr.prim.lambda.general#nt:lambda-expression "7.5.6.1General[expr.prim.lambda.general]")
[*lambda-introducer*](expr.prim.lambda.general#nt:lambda-introducer "7.5.6.1General[expr.prim.lambda.general]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*lambda-declarator*](expr.prim.lambda.general#nt:lambda-declarator "7.5.6.1General[expr.prim.lambda.general]") [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[*lambda-introducer*](expr.prim.lambda.general#nt:lambda-introducer "7.5.6.1General[expr.prim.lambda.general]") < [*template-parameter-list*](temp.pre#nt:template-parameter-list "13.1Preamble[temp.pre]") > [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*lambda-declarator*](expr.prim.lambda.general#nt:lambda-declarator "7.5.6.1General[expr.prim.lambda.general]") [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[lambda-introducer:](expr.prim.lambda.general#nt:lambda-introducer "7.5.6.1General[expr.prim.lambda.general]")
[ [*lambda-capture*](expr.prim.lambda.capture#nt:lambda-capture "7.5.6.3Captures[expr.prim.lambda.capture]")opt ]
[lambda-declarator:](expr.prim.lambda.general#nt:lambda-declarator "7.5.6.1General[expr.prim.lambda.general]")
[*lambda-specifier-seq*](expr.prim.lambda.general#nt:lambda-specifier-seq "7.5.6.1General[expr.prim.lambda.general]") [*noexcept-specifier*](except.spec#nt:noexcept-specifier "14.5Exception specifications[except.spec]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*trailing-return-type*](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")opt
[*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
[*noexcept-specifier*](except.spec#nt:noexcept-specifier "14.5Exception specifications[except.spec]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*trailing-return-type*](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")opt [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
[*trailing-return-type*](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")opt [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
( [*parameter-declaration-clause*](dcl.fct#nt:parameter-declaration-clause "9.3.4.6Functions[dcl.fct]") ) [*lambda-specifier-seq*](expr.prim.lambda.general#nt:lambda-specifier-seq "7.5.6.1General[expr.prim.lambda.general]")opt [*noexcept-specifier*](except.spec#nt:noexcept-specifier "14.5Exception specifications[except.spec]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*trailing-return-type*](dcl.decl.general#nt:trailing-return-type "9.3.1General[dcl.decl.general]")opt [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")opt [*function-contract-specifier-seq*](dcl.contract.func#nt:function-contract-specifier-seq "9.4.1General[dcl.contract.func]")opt
[lambda-specifier:](expr.prim.lambda.general#nt:lambda-specifier "7.5.6.1General[expr.prim.lambda.general]")
consteval
constexpr
mutable
static
[lambda-specifier-seq:](expr.prim.lambda.general#nt:lambda-specifier-seq "7.5.6.1General[expr.prim.lambda.general]")
[*lambda-specifier*](expr.prim.lambda.general#nt:lambda-specifier "7.5.6.1General[expr.prim.lambda.general]") [*lambda-specifier-seq*](expr.prim.lambda.general#nt:lambda-specifier-seq "7.5.6.1General[expr.prim.lambda.general]")opt
[lambda-capture:](expr.prim.lambda.capture#nt:lambda-capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[*capture-default*](expr.prim.lambda.capture#nt:capture-default "7.5.6.3Captures[expr.prim.lambda.capture]")
[*capture-list*](expr.prim.lambda.capture#nt:capture-list "7.5.6.3Captures[expr.prim.lambda.capture]")
[*capture-default*](expr.prim.lambda.capture#nt:capture-default "7.5.6.3Captures[expr.prim.lambda.capture]") , [*capture-list*](expr.prim.lambda.capture#nt:capture-list "7.5.6.3Captures[expr.prim.lambda.capture]")
[capture-default:](expr.prim.lambda.capture#nt:capture-default "7.5.6.3Captures[expr.prim.lambda.capture]")
&
=
[capture-list:](expr.prim.lambda.capture#nt:capture-list "7.5.6.3Captures[expr.prim.lambda.capture]")
[*capture*](expr.prim.lambda.capture#nt:capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[*capture-list*](expr.prim.lambda.capture#nt:capture-list "7.5.6.3Captures[expr.prim.lambda.capture]") , [*capture*](expr.prim.lambda.capture#nt:capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[capture:](expr.prim.lambda.capture#nt:capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[*simple-capture*](expr.prim.lambda.capture#nt:simple-capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[*init-capture*](expr.prim.lambda.capture#nt:init-capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[simple-capture:](expr.prim.lambda.capture#nt:simple-capture "7.5.6.3Captures[expr.prim.lambda.capture]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") ...opt
& [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") ...opt
this
* this
[init-capture:](expr.prim.lambda.capture#nt:init-capture "7.5.6.3Captures[expr.prim.lambda.capture]")
...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*initializer*](dcl.init.general#nt:initializer "9.5.1General[dcl.init.general]")
& ...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*initializer*](dcl.init.general#nt:initializer "9.5.1General[dcl.init.general]")
[fold-expression:](expr.prim.fold#nt:fold-expression "7.5.7Fold expressions[expr.prim.fold]")
( [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]") [*fold-operator*](expr.prim.fold#nt:fold-operator "7.5.7Fold expressions[expr.prim.fold]") ... )
( ... [*fold-operator*](expr.prim.fold#nt:fold-operator "7.5.7Fold expressions[expr.prim.fold]") [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]") )
( [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]") [*fold-operator*](expr.prim.fold#nt:fold-operator "7.5.7Fold expressions[expr.prim.fold]") ... [*fold-operator*](expr.prim.fold#nt:fold-operator "7.5.7Fold expressions[expr.prim.fold]") [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]") )
[fold-operator:](expr.prim.fold#nt:fold-operator "7.5.7Fold expressions[expr.prim.fold]") one of
+ - * / % ^ & | << >>
+= -= *= /= %= ^= &= |= <<= >>= =
== != < > <= >= && || , .* ->*
[requires-expression:](expr.prim.req.general#nt:requires-expression "7.5.8.1General[expr.prim.req.general]")
requires [*requirement-parameter-list*](expr.prim.req.general#nt:requirement-parameter-list "7.5.8.1General[expr.prim.req.general]")opt [*requirement-body*](expr.prim.req.general#nt:requirement-body "7.5.8.1General[expr.prim.req.general]")
[requirement-parameter-list:](expr.prim.req.general#nt:requirement-parameter-list "7.5.8.1General[expr.prim.req.general]")
( [*parameter-declaration-clause*](dcl.fct#nt:parameter-declaration-clause "9.3.4.6Functions[dcl.fct]") )
[requirement-body:](expr.prim.req.general#nt:requirement-body "7.5.8.1General[expr.prim.req.general]")
{ [*requirement-seq*](expr.prim.req.general#nt:requirement-seq "7.5.8.1General[expr.prim.req.general]") }
[requirement-seq:](expr.prim.req.general#nt:requirement-seq "7.5.8.1General[expr.prim.req.general]")
[*requirement*](expr.prim.req.general#nt:requirement "7.5.8.1General[expr.prim.req.general]") [*requirement-seq*](expr.prim.req.general#nt:requirement-seq "7.5.8.1General[expr.prim.req.general]")opt
[requirement:](expr.prim.req.general#nt:requirement "7.5.8.1General[expr.prim.req.general]")
[*simple-requirement*](expr.prim.req.simple#nt:simple-requirement "7.5.8.2Simple requirements[expr.prim.req.simple]")
[*type-requirement*](expr.prim.req.type#nt:type-requirement "7.5.8.3Type requirements[expr.prim.req.type]")
[*compound-requirement*](expr.prim.req.compound#nt:compound-requirement "7.5.8.4Compound requirements[expr.prim.req.compound]")
[*nested-requirement*](expr.prim.req.nested#nt:nested-requirement "7.5.8.5Nested requirements[expr.prim.req.nested]")
[simple-requirement:](expr.prim.req.simple#nt:simple-requirement "7.5.8.2Simple requirements[expr.prim.req.simple]")
[*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") ;
[type-requirement:](expr.prim.req.type#nt:type-requirement "7.5.8.3Type requirements[expr.prim.req.type]")
typename [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*type-name*](dcl.type.simple#nt:type-name "9.2.9.3Simple type specifiers[dcl.type.simple]") ;
typename [*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]")
typename [*splice-specialization-specifier*](basic.splice#nt:splice-specialization-specifier "6.6Splice specifiers[basic.splice]")
[compound-requirement:](expr.prim.req.compound#nt:compound-requirement "7.5.8.4Compound requirements[expr.prim.req.compound]")
{ [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") } noexceptopt [*return-type-requirement*](expr.prim.req.compound#nt:return-type-requirement "7.5.8.4Compound requirements[expr.prim.req.compound]")opt ;
[return-type-requirement:](expr.prim.req.compound#nt:return-type-requirement "7.5.8.4Compound requirements[expr.prim.req.compound]")
-> [*type-constraint*](temp.param#nt:type-constraint "13.2Template parameters[temp.param]")
[nested-requirement:](expr.prim.req.nested#nt:nested-requirement "7.5.8.5Nested requirements[expr.prim.req.nested]")
requires [*constraint-expression*](temp.constr.decl#nt:constraint-expression "13.5.3Constrained declarations[temp.constr.decl]") ;
[splice-expression:](expr.prim.splice#nt:splice-expression "7.5.9Expression splicing[expr.prim.splice]")
[*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]")
template [*splice-specifier*](basic.splice#nt:splice-specifier "6.6Splice specifiers[basic.splice]")
template [*splice-specialization-specifier*](basic.splice#nt:splice-specialization-specifier "6.6Splice specifiers[basic.splice]")
[postfix-expression:](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]")
[*primary-expression*](expr.prim.grammar#nt:primary-expression "7.5.1Grammar[expr.prim.grammar]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") [ [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt ]
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt )
[*simple-type-specifier*](dcl.type.simple#nt:simple-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]") ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt )
[*typename-specifier*](temp.res.general#nt:typename-specifier "13.8.1General[temp.res.general]") ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt )
[*simple-type-specifier*](dcl.type.simple#nt:simple-type-specifier "9.2.9.3Simple type specifiers[dcl.type.simple]") [*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[*typename-specifier*](temp.res.general#nt:typename-specifier "13.8.1General[temp.res.general]") [*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") . templateopt [*id-expression*](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") . [*splice-expression*](expr.prim.splice#nt:splice-expression "7.5.9Expression splicing[expr.prim.splice]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") -> templateopt [*id-expression*](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") -> [*splice-expression*](expr.prim.splice#nt:splice-expression "7.5.9Expression splicing[expr.prim.splice]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") ++
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]") --
dynamic_cast < [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") > ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
static_cast < [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") > ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
reinterpret_cast < [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") > ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
const_cast < [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") > ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
typeid ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
typeid ( [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") )
[expression-list:](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")
[*initializer-list*](dcl.init.general#nt:initializer-list "9.5.1General[dcl.init.general]")
[unary-expression:](expr.unary.general#nt:unary-expression "7.6.2.1General[expr.unary.general]")
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1General[expr.post.general]")
[*unary-operator*](expr.unary.general#nt:unary-operator "7.6.2.1General[expr.unary.general]") [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
++ [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
-- [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[*await-expression*](expr.await#nt:await-expression "7.6.2.4Await[expr.await]")
sizeof [*unary-expression*](expr.unary.general#nt:unary-expression "7.6.2.1General[expr.unary.general]")
sizeof ( [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") )
sizeof ... ( [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") )
alignof ( [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") )
[*noexcept-expression*](expr.unary.noexcept#nt:noexcept-expression "7.6.2.7noexcept operator[expr.unary.noexcept]")
[*new-expression*](expr.new#nt:new-expression "7.6.2.8New[expr.new]")
[*delete-expression*](expr.delete#nt:delete-expression "7.6.2.9Delete[expr.delete]")
[*reflect-expression*](expr.reflect#nt:reflect-expression "7.6.2.10The reflection operator[expr.reflect]")
[unary-operator:](expr.unary.general#nt:unary-operator "7.6.2.1General[expr.unary.general]") one of
* & + - ! ~
[await-expression:](expr.await#nt:await-expression "7.6.2.4Await[expr.await]")
co_await [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[noexcept-expression:](expr.unary.noexcept#nt:noexcept-expression "7.6.2.7noexcept operator[expr.unary.noexcept]")
noexcept ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") )
[new-expression:](expr.new#nt:new-expression "7.6.2.8New[expr.new]")
::opt new [*new-placement*](expr.new#nt:new-placement "7.6.2.8New[expr.new]")opt [*new-type-id*](expr.new#nt:new-type-id "7.6.2.8New[expr.new]") [*new-initializer*](expr.new#nt:new-initializer "7.6.2.8New[expr.new]")opt
::opt new [*new-placement*](expr.new#nt:new-placement "7.6.2.8New[expr.new]")opt ( [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") ) [*new-initializer*](expr.new#nt:new-initializer "7.6.2.8New[expr.new]")opt
[new-placement:](expr.new#nt:new-placement "7.6.2.8New[expr.new]")
( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]") )
[new-type-id:](expr.new#nt:new-type-id "7.6.2.8New[expr.new]")
[*type-specifier-seq*](dcl.type.general#nt:type-specifier-seq "9.2.9.1General[dcl.type.general]") [*new-declarator*](expr.new#nt:new-declarator "7.6.2.8New[expr.new]")opt
[new-declarator:](expr.new#nt:new-declarator "7.6.2.8New[expr.new]")
[*ptr-operator*](dcl.decl.general#nt:ptr-operator "9.3.1General[dcl.decl.general]") [*new-declarator*](expr.new#nt:new-declarator "7.6.2.8New[expr.new]")opt
[*noptr-new-declarator*](expr.new#nt:noptr-new-declarator "7.6.2.8New[expr.new]")
[noptr-new-declarator:](expr.new#nt:noptr-new-declarator "7.6.2.8New[expr.new]")
[ [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")opt ] [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[*noptr-new-declarator*](expr.new#nt:noptr-new-declarator "7.6.2.8New[expr.new]") [ [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") ] [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt
[new-initializer:](expr.new#nt:new-initializer "7.6.2.8New[expr.new]")
( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt )
[*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[delete-expression:](expr.delete#nt:delete-expression "7.6.2.9Delete[expr.delete]")
::opt delete [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
::opt delete [ ] [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[reflect-expression:](expr.reflect#nt:reflect-expression "7.6.2.10The reflection operator[expr.reflect]")
^^ ::
^^ [*reflection-name*](expr.reflect#nt:reflection-name "7.6.2.10The reflection operator[expr.reflect]")
^^ [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]")
^^ [*id-expression*](expr.prim.id.general#nt:id-expression "7.5.5.1General[expr.prim.id.general]")
[reflection-name:](expr.reflect#nt:reflection-name "7.6.2.10The reflection operator[expr.reflect]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") template [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[cast-expression:](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[*unary-expression*](expr.unary.general#nt:unary-expression "7.6.2.1General[expr.unary.general]")
( [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]") ) [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[pm-expression:](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]")
[*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[*pm-expression*](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]") .* [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[*pm-expression*](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]") ->* [*cast-expression*](expr.cast#nt:cast-expression "7.6.3Explicit type conversion (cast notation)[expr.cast]")
[multiplicative-expression:](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]")
[*pm-expression*](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]")
[*multiplicative-expression*](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]") * [*pm-expression*](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]")
[*multiplicative-expression*](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]") / [*pm-expression*](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]")
[*multiplicative-expression*](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]") % [*pm-expression*](expr.mptr.oper#nt:pm-expression "7.6.4Pointer-to-member operators[expr.mptr.oper]")
[additive-expression:](expr.add#nt:additive-expression "7.6.6Additive operators[expr.add]")
[*multiplicative-expression*](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]")
[*additive-expression*](expr.add#nt:additive-expression "7.6.6Additive operators[expr.add]") + [*multiplicative-expression*](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]")
[*additive-expression*](expr.add#nt:additive-expression "7.6.6Additive operators[expr.add]") - [*multiplicative-expression*](expr.mul#nt:multiplicative-expression "7.6.5Multiplicative operators[expr.mul]")
[shift-expression:](expr.shift#nt:shift-expression "7.6.7Shift operators[expr.shift]")
[*additive-expression*](expr.add#nt:additive-expression "7.6.6Additive operators[expr.add]")
[*shift-expression*](expr.shift#nt:shift-expression "7.6.7Shift operators[expr.shift]") << [*additive-expression*](expr.add#nt:additive-expression "7.6.6Additive operators[expr.add]")
[*shift-expression*](expr.shift#nt:shift-expression "7.6.7Shift operators[expr.shift]") >> [*additive-expression*](expr.add#nt:additive-expression "7.6.6Additive operators[expr.add]")
[compare-expression:](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]")
[*shift-expression*](expr.shift#nt:shift-expression "7.6.7Shift operators[expr.shift]")
[*compare-expression*](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]") <=> [*shift-expression*](expr.shift#nt:shift-expression "7.6.7Shift operators[expr.shift]")
[relational-expression:](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]")
[*compare-expression*](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]")
[*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]") < [*compare-expression*](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]")
[*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]") > [*compare-expression*](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]")
[*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]") <= [*compare-expression*](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]")
[*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]") >= [*compare-expression*](expr.spaceship#nt:compare-expression "7.6.8Three-way comparison operator[expr.spaceship]")
[equality-expression:](expr.eq#nt:equality-expression "7.6.10Equality operators[expr.eq]")
[*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]")
[*equality-expression*](expr.eq#nt:equality-expression "7.6.10Equality operators[expr.eq]") == [*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]")
[*equality-expression*](expr.eq#nt:equality-expression "7.6.10Equality operators[expr.eq]") != [*relational-expression*](expr.rel#nt:relational-expression "7.6.9Relational operators[expr.rel]")
[and-expression:](expr.bit.and#nt:and-expression "7.6.11Bitwise AND operator[expr.bit.and]")
[*equality-expression*](expr.eq#nt:equality-expression "7.6.10Equality operators[expr.eq]")
[*and-expression*](expr.bit.and#nt:and-expression "7.6.11Bitwise AND operator[expr.bit.and]") & [*equality-expression*](expr.eq#nt:equality-expression "7.6.10Equality operators[expr.eq]")
[exclusive-or-expression:](expr.xor#nt:exclusive-or-expression "7.6.12Bitwise exclusive OR operator[expr.xor]")
[*and-expression*](expr.bit.and#nt:and-expression "7.6.11Bitwise AND operator[expr.bit.and]")
[*exclusive-or-expression*](expr.xor#nt:exclusive-or-expression "7.6.12Bitwise exclusive OR operator[expr.xor]") ^ [*and-expression*](expr.bit.and#nt:and-expression "7.6.11Bitwise AND operator[expr.bit.and]")
[inclusive-or-expression:](expr.or#nt:inclusive-or-expression "7.6.13Bitwise inclusive OR operator[expr.or]")
[*exclusive-or-expression*](expr.xor#nt:exclusive-or-expression "7.6.12Bitwise exclusive OR operator[expr.xor]")
[*inclusive-or-expression*](expr.or#nt:inclusive-or-expression "7.6.13Bitwise inclusive OR operator[expr.or]") | [*exclusive-or-expression*](expr.xor#nt:exclusive-or-expression "7.6.12Bitwise exclusive OR operator[expr.xor]")
[logical-and-expression:](expr.log.and#nt:logical-and-expression "7.6.14Logical AND operator[expr.log.and]")
[*inclusive-or-expression*](expr.or#nt:inclusive-or-expression "7.6.13Bitwise inclusive OR operator[expr.or]")
[*logical-and-expression*](expr.log.and#nt:logical-and-expression "7.6.14Logical AND operator[expr.log.and]") && [*inclusive-or-expression*](expr.or#nt:inclusive-or-expression "7.6.13Bitwise inclusive OR operator[expr.or]")
[logical-or-expression:](expr.log.or#nt:logical-or-expression "7.6.15Logical OR operator[expr.log.or]")
[*logical-and-expression*](expr.log.and#nt:logical-and-expression "7.6.14Logical AND operator[expr.log.and]")
[*logical-or-expression*](expr.log.or#nt:logical-or-expression "7.6.15Logical OR operator[expr.log.or]") || [*logical-and-expression*](expr.log.and#nt:logical-and-expression "7.6.14Logical AND operator[expr.log.and]")
[conditional-expression:](expr.cond#nt:conditional-expression "7.6.16Conditional operator[expr.cond]")
[*logical-or-expression*](expr.log.or#nt:logical-or-expression "7.6.15Logical OR operator[expr.log.or]")
[*logical-or-expression*](expr.log.or#nt:logical-or-expression "7.6.15Logical OR operator[expr.log.or]") ? [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") : [*assignment-expression*](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")
[yield-expression:](expr.yield#nt:yield-expression "7.6.17Yielding a value[expr.yield]")
co_yield [*assignment-expression*](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")
co_yield [*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1General[dcl.init.general]")
[throw-expression:](expr.throw#nt:throw-expression "7.6.18Throwing an exception[expr.throw]")
throw [*assignment-expression*](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")opt
[assignment-expression:](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")
[*conditional-expression*](expr.cond#nt:conditional-expression "7.6.16Conditional operator[expr.cond]")
[*yield-expression*](expr.yield#nt:yield-expression "7.6.17Yielding a value[expr.yield]")
[*throw-expression*](expr.throw#nt:throw-expression "7.6.18Throwing an exception[expr.throw]")
[*logical-or-expression*](expr.log.or#nt:logical-or-expression "7.6.15Logical OR operator[expr.log.or]") [*assignment-operator*](expr.assign#nt:assignment-operator "7.6.19Assignment and compound assignment operators[expr.assign]") [*initializer-clause*](dcl.init.general#nt:initializer-clause "9.5.1General[dcl.init.general]")
[assignment-operator:](expr.assign#nt:assignment-operator "7.6.19Assignment and compound assignment operators[expr.assign]") one of
= *= /= %= += -= >>= <<= &= ^= |=
[expression:](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")
[*assignment-expression*](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")
[*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") , [*assignment-expression*](expr.assign#nt:assignment-expression "7.6.19Assignment and compound assignment operators[expr.assign]")
[constant-expression:](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")
[*conditional-expression*](expr.cond#nt:conditional-expression "7.6.16Conditional operator[expr.cond]")

22
cppdraft/gram/general.md Normal file
View File

@@ -0,0 +1,22 @@
[gram.general]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.1 General [gram.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/grammar.tex#L5)
This summary of C++ grammar is intended to be an aid to comprehension[.](#1.sentence-1)
It is not an exact statement of the language[.](#1.sentence-2)
In particular, the grammar described here accepts
a superset of valid C++ constructs[.](#1.sentence-3)
Disambiguation rules ([[stmt.ambig]](stmt.ambig "8.11Ambiguity resolution"), [[dcl.spec]](dcl.spec "9.2Specifiers"), [[class.member.lookup]](class.member.lookup "6.5.2Member name lookup"))
are applied to distinguish expressions from declarations[.](#1.sentence-4)
Further, access control, ambiguity, and type rules are used
to weed out syntactically valid but meaningless constructs[.](#1.sentence-5)

34
cppdraft/gram/key.md Normal file
View File

@@ -0,0 +1,34 @@
[gram.key]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.2 Keywords [gram.key]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/grammar.tex#L19)
New context-dependent keywords are introduced into a program bytypedef ([[dcl.typedef]](dcl.typedef "9.2.4The typedef specifier")),namespace ([[namespace.def]](namespace.def "9.9.2Namespace definition")),
class ([[class]](class "11Classes")), enumeration ([[dcl.enum]](dcl.enum "9.8.1Enumeration declarations")), andtemplate ([[temp]](temp "13Templates"))
declarations[.](#1.sentence-1)
[*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4The typedef specifier[dcl.typedef]"):
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*namespace-name*](namespace.def.general#nt:namespace-name "9.9.2.1General[namespace.def.general]"):
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*namespace-alias*](namespace.alias#nt:namespace-alias "9.9.3Namespace alias[namespace.alias]")
[*namespace-alias*](namespace.alias#nt:namespace-alias "9.9.3Namespace alias[namespace.alias]"):
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*class-name*](class.pre#nt:class-name "11.1Preamble[class.pre]"):
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*enum-name*](dcl.enum#nt:enum-name "9.8.1Enumeration declarations[dcl.enum]"):
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]"):
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")

353
cppdraft/gram/lex.md Normal file
View File

@@ -0,0 +1,353 @@
[gram.lex]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.3 Lexical conventions [gram.lex]
[n-char:](lex.universal.char#nt:n-char "5.3.2Universal character names[lex.universal.char]")
any member of the translation character set except the U+007d right curly bracket or new-line character
[n-char-sequence:](lex.universal.char#nt:n-char-sequence "5.3.2Universal character names[lex.universal.char]")
[*n-char*](lex.universal.char#nt:n-char "5.3.2Universal character names[lex.universal.char]") [*n-char-sequence*](lex.universal.char#nt:n-char-sequence "5.3.2Universal character names[lex.universal.char]")opt
[named-universal-character:](lex.universal.char#nt:named-universal-character "5.3.2Universal character names[lex.universal.char]")
\N{ [*n-char-sequence*](lex.universal.char#nt:n-char-sequence "5.3.2Universal character names[lex.universal.char]") }
[hex-quad:](lex.universal.char#nt:hex-quad "5.3.2Universal character names[lex.universal.char]")
[*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]") [*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]") [*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]") [*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]")
[simple-hexadecimal-digit-sequence:](lex.universal.char#nt:simple-hexadecimal-digit-sequence "5.3.2Universal character names[lex.universal.char]")
[*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]") [*simple-hexadecimal-digit-sequence*](lex.universal.char#nt:simple-hexadecimal-digit-sequence "5.3.2Universal character names[lex.universal.char]")opt
[universal-character-name:](lex.universal.char#nt:universal-character-name "5.3.2Universal character names[lex.universal.char]")
\u [*hex-quad*](lex.universal.char#nt:hex-quad "5.3.2Universal character names[lex.universal.char]")
\U [*hex-quad*](lex.universal.char#nt:hex-quad "5.3.2Universal character names[lex.universal.char]") [*hex-quad*](lex.universal.char#nt:hex-quad "5.3.2Universal character names[lex.universal.char]")
\u{ [*simple-hexadecimal-digit-sequence*](lex.universal.char#nt:simple-hexadecimal-digit-sequence "5.3.2Universal character names[lex.universal.char]") }
[*named-universal-character*](lex.universal.char#nt:named-universal-character "5.3.2Universal character names[lex.universal.char]")
[preprocessing-token:](lex.pptoken#nt:preprocessing-token "5.5Preprocessing tokens[lex.pptoken]")
[*header-name*](lex.header#nt:header-name "5.6Header names[lex.header]")
import-keyword
module-keyword
export-keyword
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]")
[*character-literal*](lex.ccon#nt:character-literal "5.13.3Character literals[lex.ccon]")
[*user-defined-character-literal*](lex.ext#nt:user-defined-character-literal "5.13.9User-defined literals[lex.ext]")
[*string-literal*](lex.string#nt:string-literal "5.13.5String literals[lex.string]")
[*user-defined-string-literal*](lex.ext#nt:user-defined-string-literal "5.13.9User-defined literals[lex.ext]")
[*preprocessing-op-or-punc*](lex.operators#nt:preprocessing-op-or-punc "5.8Operators and punctuators[lex.operators]")
each non-whitespace character that cannot be one of the above
[header-name:](lex.header#nt:header-name "5.6Header names[lex.header]")
< [*h-char-sequence*](lex.header#nt:h-char-sequence "5.6Header names[lex.header]") >
" [*q-char-sequence*](lex.header#nt:q-char-sequence "5.6Header names[lex.header]") "
[h-char-sequence:](lex.header#nt:h-char-sequence "5.6Header names[lex.header]")
[*h-char*](lex.header#nt:h-char "5.6Header names[lex.header]") [*h-char-sequence*](lex.header#nt:h-char-sequence "5.6Header names[lex.header]")opt
[h-char:](lex.header#nt:h-char "5.6Header names[lex.header]")
any member of the translation character set except new-line and U+003e greater-than sign
[q-char-sequence:](lex.header#nt:q-char-sequence "5.6Header names[lex.header]")
[*q-char*](lex.header#nt:q-char "5.6Header names[lex.header]") [*q-char-sequence*](lex.header#nt:q-char-sequence "5.6Header names[lex.header]")opt
[q-char:](lex.header#nt:q-char "5.6Header names[lex.header]")
any member of the translation character set except new-line and U+0022 quotation mark
[pp-number:](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]")
[*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
. [*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") [*identifier-continue*](lex.name#nt:identifier-continue "5.11Identifiers[lex.name]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") ' [*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") ' [*nondigit*](lex.name#nt:nondigit "5.11Identifiers[lex.name]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") e [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") E [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") p [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") P [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")
[*pp-number*](lex.ppnumber#nt:pp-number "5.7Preprocessing numbers[lex.ppnumber]") .
[preprocessing-op-or-punc:](lex.operators#nt:preprocessing-op-or-punc "5.8Operators and punctuators[lex.operators]")
[*preprocessing-operator*](lex.operators#nt:preprocessing-operator "5.8Operators and punctuators[lex.operators]")
[*operator-or-punctuator*](lex.operators#nt:operator-or-punctuator "5.8Operators and punctuators[lex.operators]")
[preprocessing-operator:](lex.operators#nt:preprocessing-operator "5.8Operators and punctuators[lex.operators]") one of
# ## %: %:%:
[operator-or-punctuator:](lex.operators#nt:operator-or-punctuator "5.8Operators and punctuators[lex.operators]") one of
{ } [ ] ( ) [: :]
<% %> <: :> ; : ...
? :: . .* -> ->* ^^ ~
! + - * / % ^ & |
= += -= *= /= %= ^= &= |=
== != < > <= >= <=> && ||
<< >> <<= >>= ++ -- ,
and or xor not bitand bitor compl
and_eq or_eq xor_eq not_eq
[token:](lex.token#nt:token "5.10Tokens[lex.token]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*keyword*](lex.key#nt:keyword "5.12Keywords[lex.key]")
[*literal*](lex.literal.kinds#nt:literal "5.13.1Kinds of literals[lex.literal.kinds]")
[*operator-or-punctuator*](lex.operators#nt:operator-or-punctuator "5.8Operators and punctuators[lex.operators]")
[identifier:](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[*identifier-start*](lex.name#nt:identifier-start "5.11Identifiers[lex.name]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*identifier-continue*](lex.name#nt:identifier-continue "5.11Identifiers[lex.name]")
[identifier-start:](lex.name#nt:identifier-start "5.11Identifiers[lex.name]")
[*nondigit*](lex.name#nt:nondigit "5.11Identifiers[lex.name]")
an element of the translation character set with the Unicode property XID_Start
[identifier-continue:](lex.name#nt:identifier-continue "5.11Identifiers[lex.name]")
[*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
[*nondigit*](lex.name#nt:nondigit "5.11Identifiers[lex.name]")
an element of the translation character set with the Unicode property XID_Continue
[nondigit:](lex.name#nt:nondigit "5.11Identifiers[lex.name]") one of
a b c d e f g h i j k l m
n o p q r s t u v w x y z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z _
[digit:](lex.name#nt:digit "5.11Identifiers[lex.name]") one of
0 1 2 3 4 5 6 7 8 9
[keyword:](lex.key#nt:keyword "5.12Keywords[lex.key]")
any identifier listed in Table [5](lex.key#tab:lex.key "Table 5: Keywords")
*import-keyword*
*module-keyword*
*export-keyword*
[literal:](lex.literal.kinds#nt:literal "5.13.1Kinds of literals[lex.literal.kinds]")
[*integer-literal*](lex.icon#nt:integer-literal "5.13.2Integer literals[lex.icon]")
[*character-literal*](lex.ccon#nt:character-literal "5.13.3Character literals[lex.ccon]")
[*floating-point-literal*](lex.fcon#nt:floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[*string-literal*](lex.string#nt:string-literal "5.13.5String literals[lex.string]")
[*boolean-literal*](lex.bool#nt:boolean-literal "5.13.7Boolean literals[lex.bool]")
[*pointer-literal*](lex.nullptr#nt:pointer-literal "5.13.8Pointer literals[lex.nullptr]")
[*user-defined-literal*](lex.ext#nt:user-defined-literal "5.13.9User-defined literals[lex.ext]")
[integer-literal:](lex.icon#nt:integer-literal "5.13.2Integer literals[lex.icon]")
[*binary-literal*](lex.icon#nt:binary-literal "5.13.2Integer literals[lex.icon]") [*integer-suffix*](lex.icon#nt:integer-suffix "5.13.2Integer literals[lex.icon]")opt
[*octal-literal*](lex.icon#nt:octal-literal "5.13.2Integer literals[lex.icon]") [*integer-suffix*](lex.icon#nt:integer-suffix "5.13.2Integer literals[lex.icon]")opt
[*decimal-literal*](lex.icon#nt:decimal-literal "5.13.2Integer literals[lex.icon]") [*integer-suffix*](lex.icon#nt:integer-suffix "5.13.2Integer literals[lex.icon]")opt
[*hexadecimal-literal*](lex.icon#nt:hexadecimal-literal "5.13.2Integer literals[lex.icon]") [*integer-suffix*](lex.icon#nt:integer-suffix "5.13.2Integer literals[lex.icon]")opt
[binary-literal:](lex.icon#nt:binary-literal "5.13.2Integer literals[lex.icon]")
0b [*binary-digit*](lex.icon#nt:binary-digit "5.13.2Integer literals[lex.icon]")
0B [*binary-digit*](lex.icon#nt:binary-digit "5.13.2Integer literals[lex.icon]")
[*binary-literal*](lex.icon#nt:binary-literal "5.13.2Integer literals[lex.icon]") 'opt [*binary-digit*](lex.icon#nt:binary-digit "5.13.2Integer literals[lex.icon]")
[octal-literal:](lex.icon#nt:octal-literal "5.13.2Integer literals[lex.icon]")
0
[*octal-literal*](lex.icon#nt:octal-literal "5.13.2Integer literals[lex.icon]") 'opt [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]")
[decimal-literal:](lex.icon#nt:decimal-literal "5.13.2Integer literals[lex.icon]")
[*nonzero-digit*](lex.icon#nt:nonzero-digit "5.13.2Integer literals[lex.icon]")
[*decimal-literal*](lex.icon#nt:decimal-literal "5.13.2Integer literals[lex.icon]") 'opt [*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
[hexadecimal-literal:](lex.icon#nt:hexadecimal-literal "5.13.2Integer literals[lex.icon]")
[*hexadecimal-prefix*](lex.icon#nt:hexadecimal-prefix "5.13.2Integer literals[lex.icon]") [*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]")
[binary-digit:](lex.icon#nt:binary-digit "5.13.2Integer literals[lex.icon]") one of
0 1
[octal-digit:](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]") one of
0 1 2 3 4 5 6 7
[nonzero-digit:](lex.icon#nt:nonzero-digit "5.13.2Integer literals[lex.icon]") one of
1 2 3 4 5 6 7 8 9
[hexadecimal-prefix:](lex.icon#nt:hexadecimal-prefix "5.13.2Integer literals[lex.icon]") one of
0x 0X
[hexadecimal-digit-sequence:](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]")
[*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]")
[*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]") 'opt [*hexadecimal-digit*](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]")
[hexadecimal-digit:](lex.icon#nt:hexadecimal-digit "5.13.2Integer literals[lex.icon]") one of
0 1 2 3 4 5 6 7 8 9
a b c d e f
A B C D E F
[integer-suffix:](lex.icon#nt:integer-suffix "5.13.2Integer literals[lex.icon]")
[*unsigned-suffix*](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]") [*long-suffix*](lex.icon#nt:long-suffix "5.13.2Integer literals[lex.icon]")opt
[*unsigned-suffix*](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]") [*long-long-suffix*](lex.icon#nt:long-long-suffix "5.13.2Integer literals[lex.icon]")opt
[*unsigned-suffix*](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]") [*size-suffix*](lex.icon#nt:size-suffix "5.13.2Integer literals[lex.icon]")opt
[*long-suffix*](lex.icon#nt:long-suffix "5.13.2Integer literals[lex.icon]") [*unsigned-suffix*](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]")opt
[*long-long-suffix*](lex.icon#nt:long-long-suffix "5.13.2Integer literals[lex.icon]") [*unsigned-suffix*](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]")opt
[*size-suffix*](lex.icon#nt:size-suffix "5.13.2Integer literals[lex.icon]") [*unsigned-suffix*](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]")opt
[unsigned-suffix:](lex.icon#nt:unsigned-suffix "5.13.2Integer literals[lex.icon]") one of
u U
[long-suffix:](lex.icon#nt:long-suffix "5.13.2Integer literals[lex.icon]") one of
l L
[long-long-suffix:](lex.icon#nt:long-long-suffix "5.13.2Integer literals[lex.icon]") one of
ll LL
[size-suffix:](lex.icon#nt:size-suffix "5.13.2Integer literals[lex.icon]") one of
z Z
[character-literal:](lex.ccon#nt:character-literal "5.13.3Character literals[lex.ccon]")
[*encoding-prefix*](lex.ccon#nt:encoding-prefix "5.13.3Character literals[lex.ccon]")opt ' [*c-char-sequence*](lex.ccon#nt:c-char-sequence "5.13.3Character literals[lex.ccon]") '
[encoding-prefix:](lex.ccon#nt:encoding-prefix "5.13.3Character literals[lex.ccon]") one of
u8 u U L
[c-char-sequence:](lex.ccon#nt:c-char-sequence "5.13.3Character literals[lex.ccon]")
[*c-char*](lex.ccon#nt:c-char "5.13.3Character literals[lex.ccon]") [*c-char-sequence*](lex.ccon#nt:c-char-sequence "5.13.3Character literals[lex.ccon]")opt
[c-char:](lex.ccon#nt:c-char "5.13.3Character literals[lex.ccon]")
[*basic-c-char*](lex.ccon#nt:basic-c-char "5.13.3Character literals[lex.ccon]")
[*escape-sequence*](lex.ccon#nt:escape-sequence "5.13.3Character literals[lex.ccon]")
[*universal-character-name*](lex.universal.char#nt:universal-character-name "5.3.2Universal character names[lex.universal.char]")
[basic-c-char:](lex.ccon#nt:basic-c-char "5.13.3Character literals[lex.ccon]")
any member of the translation character set except the U+0027 apostrophe,
U+005c reverse solidus, or new-line character
[escape-sequence:](lex.ccon#nt:escape-sequence "5.13.3Character literals[lex.ccon]")
[*simple-escape-sequence*](lex.ccon#nt:simple-escape-sequence "5.13.3Character literals[lex.ccon]")
[*numeric-escape-sequence*](lex.ccon#nt:numeric-escape-sequence "5.13.3Character literals[lex.ccon]")
[*conditional-escape-sequence*](lex.ccon#nt:conditional-escape-sequence "5.13.3Character literals[lex.ccon]")
[simple-escape-sequence:](lex.ccon#nt:simple-escape-sequence "5.13.3Character literals[lex.ccon]")
\ [*simple-escape-sequence-char*](lex.ccon#nt:simple-escape-sequence-char "5.13.3Character literals[lex.ccon]")
[simple-escape-sequence-char:](lex.ccon#nt:simple-escape-sequence-char "5.13.3Character literals[lex.ccon]") one of
' " ? \ a b f n r t v
[numeric-escape-sequence:](lex.ccon#nt:numeric-escape-sequence "5.13.3Character literals[lex.ccon]")
[*octal-escape-sequence*](lex.ccon#nt:octal-escape-sequence "5.13.3Character literals[lex.ccon]")
[*hexadecimal-escape-sequence*](lex.ccon#nt:hexadecimal-escape-sequence "5.13.3Character literals[lex.ccon]")
[simple-octal-digit-sequence:](lex.ccon#nt:simple-octal-digit-sequence "5.13.3Character literals[lex.ccon]")
[*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]") [*simple-octal-digit-sequence*](lex.ccon#nt:simple-octal-digit-sequence "5.13.3Character literals[lex.ccon]")opt
[octal-escape-sequence:](lex.ccon#nt:octal-escape-sequence "5.13.3Character literals[lex.ccon]")
\ [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]")
\ [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]") [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]")
\ [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]") [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]") [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]")
\o{ [*simple-octal-digit-sequence*](lex.ccon#nt:simple-octal-digit-sequence "5.13.3Character literals[lex.ccon]") }
[hexadecimal-escape-sequence:](lex.ccon#nt:hexadecimal-escape-sequence "5.13.3Character literals[lex.ccon]")
\x [*simple-hexadecimal-digit-sequence*](lex.universal.char#nt:simple-hexadecimal-digit-sequence "5.3.2Universal character names[lex.universal.char]")
\x{ [*simple-hexadecimal-digit-sequence*](lex.universal.char#nt:simple-hexadecimal-digit-sequence "5.3.2Universal character names[lex.universal.char]") }
[conditional-escape-sequence:](lex.ccon#nt:conditional-escape-sequence "5.13.3Character literals[lex.ccon]")
\ [*conditional-escape-sequence-char*](lex.ccon#nt:conditional-escape-sequence-char "5.13.3Character literals[lex.ccon]")
[conditional-escape-sequence-char:](lex.ccon#nt:conditional-escape-sequence-char "5.13.3Character literals[lex.ccon]")
any member of the basic character set that is not an [*octal-digit*](lex.icon#nt:octal-digit "5.13.2Integer literals[lex.icon]"), a [*simple-escape-sequence-char*](lex.ccon#nt:simple-escape-sequence-char "5.13.3Character literals[lex.ccon]"), or the characters N, o, u, U, or x
[floating-point-literal:](lex.fcon#nt:floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[*decimal-floating-point-literal*](lex.fcon#nt:decimal-floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[*hexadecimal-floating-point-literal*](lex.fcon#nt:hexadecimal-floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[decimal-floating-point-literal:](lex.fcon#nt:decimal-floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[*fractional-constant*](lex.fcon#nt:fractional-constant "5.13.4Floating-point literals[lex.fcon]") [*exponent-part*](lex.fcon#nt:exponent-part "5.13.4Floating-point literals[lex.fcon]")opt [*floating-point-suffix*](lex.fcon#nt:floating-point-suffix "5.13.4Floating-point literals[lex.fcon]")opt
[*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]") [*exponent-part*](lex.fcon#nt:exponent-part "5.13.4Floating-point literals[lex.fcon]") [*floating-point-suffix*](lex.fcon#nt:floating-point-suffix "5.13.4Floating-point literals[lex.fcon]")opt
[hexadecimal-floating-point-literal:](lex.fcon#nt:hexadecimal-floating-point-literal "5.13.4Floating-point literals[lex.fcon]")
[*hexadecimal-prefix*](lex.icon#nt:hexadecimal-prefix "5.13.2Integer literals[lex.icon]") [*hexadecimal-fractional-constant*](lex.fcon#nt:hexadecimal-fractional-constant "5.13.4Floating-point literals[lex.fcon]") [*binary-exponent-part*](lex.fcon#nt:binary-exponent-part "5.13.4Floating-point literals[lex.fcon]") [*floating-point-suffix*](lex.fcon#nt:floating-point-suffix "5.13.4Floating-point literals[lex.fcon]")opt
[*hexadecimal-prefix*](lex.icon#nt:hexadecimal-prefix "5.13.2Integer literals[lex.icon]") [*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]") [*binary-exponent-part*](lex.fcon#nt:binary-exponent-part "5.13.4Floating-point literals[lex.fcon]") [*floating-point-suffix*](lex.fcon#nt:floating-point-suffix "5.13.4Floating-point literals[lex.fcon]")opt
[fractional-constant:](lex.fcon#nt:fractional-constant "5.13.4Floating-point literals[lex.fcon]")
[*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")opt . [*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")
[*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]") .
[hexadecimal-fractional-constant:](lex.fcon#nt:hexadecimal-fractional-constant "5.13.4Floating-point literals[lex.fcon]")
[*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]")opt . [*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]")
[*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]") .
[exponent-part:](lex.fcon#nt:exponent-part "5.13.4Floating-point literals[lex.fcon]")
e [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")opt [*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")
E [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")opt [*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")
[binary-exponent-part:](lex.fcon#nt:binary-exponent-part "5.13.4Floating-point literals[lex.fcon]")
p [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")opt [*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")
P [*sign*](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]")opt [*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")
[sign:](lex.fcon#nt:sign "5.13.4Floating-point literals[lex.fcon]") one of
+ -
[digit-sequence:](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]")
[*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
[*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]") 'opt [*digit*](lex.name#nt:digit "5.11Identifiers[lex.name]")
[floating-point-suffix:](lex.fcon#nt:floating-point-suffix "5.13.4Floating-point literals[lex.fcon]") one of
f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16
[string-literal:](lex.string#nt:string-literal "5.13.5String literals[lex.string]")
[*encoding-prefix*](lex.ccon#nt:encoding-prefix "5.13.3Character literals[lex.ccon]")opt " [*s-char-sequence*](lex.string#nt:s-char-sequence "5.13.5String literals[lex.string]")opt "
[*encoding-prefix*](lex.ccon#nt:encoding-prefix "5.13.3Character literals[lex.ccon]")opt R [*raw-string*](lex.string#nt:raw-string "5.13.5String literals[lex.string]")
[s-char-sequence:](lex.string#nt:s-char-sequence "5.13.5String literals[lex.string]")
[*s-char*](lex.string#nt:s-char "5.13.5String literals[lex.string]") [*s-char-sequence*](lex.string#nt:s-char-sequence "5.13.5String literals[lex.string]")opt
[s-char:](lex.string#nt:s-char "5.13.5String literals[lex.string]")
[*basic-s-char*](lex.string#nt:basic-s-char "5.13.5String literals[lex.string]")
[*escape-sequence*](lex.ccon#nt:escape-sequence "5.13.3Character literals[lex.ccon]")
[*universal-character-name*](lex.universal.char#nt:universal-character-name "5.3.2Universal character names[lex.universal.char]")
[basic-s-char:](lex.string#nt:basic-s-char "5.13.5String literals[lex.string]")
any member of the translation character set except the U+0022 quotation mark,
U+005c reverse solidus, or new-line character
[raw-string:](lex.string#nt:raw-string "5.13.5String literals[lex.string]")
" [*d-char-sequence*](lex.string#nt:d-char-sequence "5.13.5String literals[lex.string]")opt ( [*r-char-sequence*](lex.string#nt:r-char-sequence "5.13.5String literals[lex.string]")opt ) [*d-char-sequence*](lex.string#nt:d-char-sequence "5.13.5String literals[lex.string]")opt "
[r-char-sequence:](lex.string#nt:r-char-sequence "5.13.5String literals[lex.string]")
[*r-char*](lex.string#nt:r-char "5.13.5String literals[lex.string]") [*r-char-sequence*](lex.string#nt:r-char-sequence "5.13.5String literals[lex.string]")opt
[r-char:](lex.string#nt:r-char "5.13.5String literals[lex.string]")
any member of the translation character set, except a U+0029 right parenthesis followed by
the initial [*d-char-sequence*](lex.string#nt:d-char-sequence "5.13.5String literals[lex.string]") (which may be empty) followed by a U+0022 quotation mark
[d-char-sequence:](lex.string#nt:d-char-sequence "5.13.5String literals[lex.string]")
[*d-char*](lex.string#nt:d-char "5.13.5String literals[lex.string]") [*d-char-sequence*](lex.string#nt:d-char-sequence "5.13.5String literals[lex.string]")opt
[d-char:](lex.string#nt:d-char "5.13.5String literals[lex.string]")
any member of the basic character set except:
U+0020 space, U+0028 left parenthesis, U+0029 right parenthesis, U+005c reverse solidus,
U+0009 character tabulation, U+000b line tabulation, U+000c form feed, and new-line
[unevaluated-string:](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]")
[*string-literal*](lex.string#nt:string-literal "5.13.5String literals[lex.string]")
[boolean-literal:](lex.bool#nt:boolean-literal "5.13.7Boolean literals[lex.bool]")
false
true
[pointer-literal:](lex.nullptr#nt:pointer-literal "5.13.8Pointer literals[lex.nullptr]")
nullptr
[user-defined-literal:](lex.ext#nt:user-defined-literal "5.13.9User-defined literals[lex.ext]")
[*user-defined-integer-literal*](lex.ext#nt:user-defined-integer-literal "5.13.9User-defined literals[lex.ext]")
[*user-defined-floating-point-literal*](lex.ext#nt:user-defined-floating-point-literal "5.13.9User-defined literals[lex.ext]")
[*user-defined-string-literal*](lex.ext#nt:user-defined-string-literal "5.13.9User-defined literals[lex.ext]")
[*user-defined-character-literal*](lex.ext#nt:user-defined-character-literal "5.13.9User-defined literals[lex.ext]")
[user-defined-integer-literal:](lex.ext#nt:user-defined-integer-literal "5.13.9User-defined literals[lex.ext]")
[*decimal-literal*](lex.icon#nt:decimal-literal "5.13.2Integer literals[lex.icon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*octal-literal*](lex.icon#nt:octal-literal "5.13.2Integer literals[lex.icon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*hexadecimal-literal*](lex.icon#nt:hexadecimal-literal "5.13.2Integer literals[lex.icon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*binary-literal*](lex.icon#nt:binary-literal "5.13.2Integer literals[lex.icon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[user-defined-floating-point-literal:](lex.ext#nt:user-defined-floating-point-literal "5.13.9User-defined literals[lex.ext]")
[*fractional-constant*](lex.fcon#nt:fractional-constant "5.13.4Floating-point literals[lex.fcon]") [*exponent-part*](lex.fcon#nt:exponent-part "5.13.4Floating-point literals[lex.fcon]")opt [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*digit-sequence*](lex.fcon#nt:digit-sequence "5.13.4Floating-point literals[lex.fcon]") [*exponent-part*](lex.fcon#nt:exponent-part "5.13.4Floating-point literals[lex.fcon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*hexadecimal-prefix*](lex.icon#nt:hexadecimal-prefix "5.13.2Integer literals[lex.icon]") [*hexadecimal-fractional-constant*](lex.fcon#nt:hexadecimal-fractional-constant "5.13.4Floating-point literals[lex.fcon]") [*binary-exponent-part*](lex.fcon#nt:binary-exponent-part "5.13.4Floating-point literals[lex.fcon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*hexadecimal-prefix*](lex.icon#nt:hexadecimal-prefix "5.13.2Integer literals[lex.icon]") [*hexadecimal-digit-sequence*](lex.icon#nt:hexadecimal-digit-sequence "5.13.2Integer literals[lex.icon]") [*binary-exponent-part*](lex.fcon#nt:binary-exponent-part "5.13.4Floating-point literals[lex.fcon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[user-defined-string-literal:](lex.ext#nt:user-defined-string-literal "5.13.9User-defined literals[lex.ext]")
[*string-literal*](lex.string#nt:string-literal "5.13.5String literals[lex.string]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[user-defined-character-literal:](lex.ext#nt:user-defined-character-literal "5.13.9User-defined literals[lex.ext]")
[*character-literal*](lex.ccon#nt:character-literal "5.13.3Character literals[lex.ccon]") [*ud-suffix*](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[ud-suffix:](lex.ext#nt:ud-suffix "5.13.9User-defined literals[lex.ext]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")

34
cppdraft/gram/module.md Normal file
View File

@@ -0,0 +1,34 @@
[gram.module]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.8 Modules [gram.module]
[module-declaration:](module.unit#nt:module-declaration "10.1Module units and purviews[module.unit]")
export-keywordopt module-keyword [*module-name*](module.unit#nt:module-name "10.1Module units and purviews[module.unit]") [*module-partition*](module.unit#nt:module-partition "10.1Module units and purviews[module.unit]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ;
[module-name:](module.unit#nt:module-name "10.1Module units and purviews[module.unit]")
[*module-name-qualifier*](module.unit#nt:module-name-qualifier "10.1Module units and purviews[module.unit]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[module-partition:](module.unit#nt:module-partition "10.1Module units and purviews[module.unit]")
: [*module-name-qualifier*](module.unit#nt:module-name-qualifier "10.1Module units and purviews[module.unit]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[module-name-qualifier:](module.unit#nt:module-name-qualifier "10.1Module units and purviews[module.unit]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") .
[*module-name-qualifier*](module.unit#nt:module-name-qualifier "10.1Module units and purviews[module.unit]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") .
[export-declaration:](module.interface#nt:export-declaration "10.2Export declaration[module.interface]")
export [*name-declaration*](dcl.pre#nt:name-declaration "9.1Preamble[dcl.pre]")
export { [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt }
export-keyword [*module-import-declaration*](module.import#nt:module-import-declaration "10.3Import declaration[module.import]")
[module-import-declaration:](module.import#nt:module-import-declaration "10.3Import declaration[module.import]")
import-keyword [*module-name*](module.unit#nt:module-name "10.1Module units and purviews[module.unit]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ;
import-keyword [*module-partition*](module.unit#nt:module-partition "10.1Module units and purviews[module.unit]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ;
import-keyword [*header-name*](lex.header#nt:header-name "5.6Header names[lex.header]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ;
[global-module-fragment:](module.global.frag#nt:global-module-fragment "10.4Global module fragment[module.global.frag]")
module-keyword ; [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt
[private-module-fragment:](module.private.frag#nt:private-module-fragment "10.5Private module fragment[module.private.frag]")
module-keyword : private ; [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1Preamble[dcl.pre]")opt

19
cppdraft/gram/over.md Normal file
View File

@@ -0,0 +1,19 @@
[gram.over]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.10 Overloading [gram.over]
[operator-function-id:](over.oper.general#nt:operator-function-id "12.4.1General[over.oper.general]")
operator [*operator*](over.oper.general#nt:operator "12.4.1General[over.oper.general]")
[operator:](over.oper.general#nt:operator "12.4.1General[over.oper.general]") one of
new delete new[] delete[] co_await ( ) [ ] -> ->*
~ ! + - * / % ^ &
| = += -= *= /= %= ^= &=
|= == != < > <= >= <=> &&
|| << >> <<= >>= ++ -- ,
[literal-operator-id:](over.literal#nt:literal-operator-id "12.6User-defined literals[over.literal]")
operator [*unevaluated-string*](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
operator [*user-defined-string-literal*](lex.ext#nt:user-defined-string-literal "5.13.9User-defined literals[lex.ext]")

93
cppdraft/gram/stmt.md Normal file
View File

@@ -0,0 +1,93 @@
[gram.stmt]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.6 Statements [gram.stmt]
[statement:](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
[*labeled-statement*](stmt.label#nt:labeled-statement "8.2Label[stmt.label]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*expression-statement*](stmt.expr#nt:expression-statement "8.3Expression statement[stmt.expr]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*selection-statement*](stmt.select.general#nt:selection-statement "8.5.1General[stmt.select.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*iteration-statement*](stmt.iter.general#nt:iteration-statement "8.6.1General[stmt.iter.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*expansion-statement*](stmt.expand#nt:expansion-statement "8.7Expansion statements[stmt.expand]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*jump-statement*](stmt.jump.general#nt:jump-statement "8.8.1General[stmt.jump.general]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*assertion-statement*](stmt.contract.assert#nt:assertion-statement "8.9Assertion statement[stmt.contract.assert]")
[*declaration-statement*](stmt.dcl#nt:declaration-statement "8.10Declaration statement[stmt.dcl]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*try-block*](except.pre#nt:try-block "14.1Preamble[except.pre]")
[init-statement:](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]")
[*expression-statement*](stmt.expr#nt:expression-statement "8.3Expression statement[stmt.expr]")
[*simple-declaration*](dcl.pre#nt:simple-declaration "9.1Preamble[dcl.pre]")
[*alias-declaration*](dcl.pre#nt:alias-declaration "9.1Preamble[dcl.pre]")
[condition:](stmt.pre#nt:condition "8.1Preamble[stmt.pre]")
[*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]") [*brace-or-equal-initializer*](dcl.init.general#nt:brace-or-equal-initializer "9.5.1General[dcl.init.general]")
[*structured-binding-declaration*](dcl.pre#nt:structured-binding-declaration "9.1Preamble[dcl.pre]") [*initializer*](dcl.init.general#nt:initializer "9.5.1General[dcl.init.general]")
[for-range-declaration:](stmt.pre#nt:for-range-declaration "8.1Preamble[stmt.pre]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*decl-specifier-seq*](dcl.spec.general#nt:decl-specifier-seq "9.2.1General[dcl.spec.general]") [*declarator*](dcl.decl.general#nt:declarator "9.3.1General[dcl.decl.general]")
[*structured-binding-declaration*](dcl.pre#nt:structured-binding-declaration "9.1Preamble[dcl.pre]")
[for-range-initializer:](stmt.pre#nt:for-range-initializer "8.1Preamble[stmt.pre]")
[*expr-or-braced-init-list*](dcl.init.general#nt:expr-or-braced-init-list "9.5.1General[dcl.init.general]")
[label:](stmt.label#nt:label "8.2Label[stmt.label]")
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") :
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt case [*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]") :
[*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt default :
[labeled-statement:](stmt.label#nt:labeled-statement "8.2Label[stmt.label]")
[*label*](stmt.label#nt:label "8.2Label[stmt.label]") [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
[expression-statement:](stmt.expr#nt:expression-statement "8.3Expression statement[stmt.expr]")
[*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")opt ;
[compound-statement:](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
{ [*statement-seq*](stmt.block#nt:statement-seq "8.4Compound statement or block[stmt.block]")opt [*label-seq*](stmt.block#nt:label-seq "8.4Compound statement or block[stmt.block]")opt }
[statement-seq:](stmt.block#nt:statement-seq "8.4Compound statement or block[stmt.block]")
[*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]") [*statement-seq*](stmt.block#nt:statement-seq "8.4Compound statement or block[stmt.block]")opt
[label-seq:](stmt.block#nt:label-seq "8.4Compound statement or block[stmt.block]")
[*label*](stmt.label#nt:label "8.2Label[stmt.label]") [*label-seq*](stmt.block#nt:label-seq "8.4Compound statement or block[stmt.block]")opt
[selection-statement:](stmt.select.general#nt:selection-statement "8.5.1General[stmt.select.general]")
if constexpropt ( [*init-statement*](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]")opt [*condition*](stmt.pre#nt:condition "8.1Preamble[stmt.pre]") ) [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
if constexpropt ( [*init-statement*](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]")opt [*condition*](stmt.pre#nt:condition "8.1Preamble[stmt.pre]") ) [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]") else [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
if !opt consteval [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
if !opt consteval [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]") else [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
switch ( [*init-statement*](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]")opt [*condition*](stmt.pre#nt:condition "8.1Preamble[stmt.pre]") ) [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
[iteration-statement:](stmt.iter.general#nt:iteration-statement "8.6.1General[stmt.iter.general]")
while ( [*condition*](stmt.pre#nt:condition "8.1Preamble[stmt.pre]") ) [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
do [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]") while ( [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]") ) ;
for ( [*init-statement*](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]") [*condition*](stmt.pre#nt:condition "8.1Preamble[stmt.pre]")opt ; [*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")opt ) [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
for ( [*init-statement*](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]")opt [*for-range-declaration*](stmt.pre#nt:for-range-declaration "8.1Preamble[stmt.pre]") : [*for-range-initializer*](stmt.pre#nt:for-range-initializer "8.1Preamble[stmt.pre]") ) [*statement*](stmt.pre#nt:statement "8.1Preamble[stmt.pre]")
[expansion-statement:](stmt.expand#nt:expansion-statement "8.7Expansion statements[stmt.expand]")
template for ([*init-statement*](stmt.pre#nt:init-statement "8.1Preamble[stmt.pre]")opt [*for-range-declaration*](stmt.pre#nt:for-range-declaration "8.1Preamble[stmt.pre]") :[*expansion-initializer*](stmt.expand#nt:expansion-initializer "8.7Expansion statements[stmt.expand]") ) [*compound-statement*](stmt.block#nt:compound-statement "8.4Compound statement or block[stmt.block]")
[expansion-initializer:](stmt.expand#nt:expansion-initializer "8.7Expansion statements[stmt.expand]")
[*expression*](expr.comma#nt:expression "7.6.20Comma operator[expr.comma]")
[*expansion-init-list*](stmt.expand#nt:expansion-init-list "8.7Expansion statements[stmt.expand]")
[expansion-init-list:](stmt.expand#nt:expansion-init-list "8.7Expansion statements[stmt.expand]")
{ [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1General[expr.post.general]")opt }
[jump-statement:](stmt.jump.general#nt:jump-statement "8.8.1General[stmt.jump.general]")
break ;
continue ;
return [*expr-or-braced-init-list*](dcl.init.general#nt:expr-or-braced-init-list "9.5.1General[dcl.init.general]")opt ;
[*coroutine-return-statement*](stmt.return.coroutine#nt:coroutine-return-statement "8.8.5The co_­return statement[stmt.return.coroutine]")
goto [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") ;
[coroutine-return-statement:](stmt.return.coroutine#nt:coroutine-return-statement "8.8.5The co_­return statement[stmt.return.coroutine]")
co_return [*expr-or-braced-init-list*](dcl.init.general#nt:expr-or-braced-init-list "9.5.1General[dcl.init.general]")opt ;
[assertion-statement:](stmt.contract.assert#nt:assertion-statement "8.9Assertion statement[stmt.contract.assert]")
contract_assert [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt ( [*conditional-expression*](expr.cond#nt:conditional-expression "7.6.16Conditional operator[expr.cond]") ) ;
[declaration-statement:](stmt.dcl#nt:declaration-statement "8.10Declaration statement[stmt.dcl]")
[*block-declaration*](dcl.pre#nt:block-declaration "9.1Preamble[dcl.pre]")

107
cppdraft/gram/temp.md Normal file
View File

@@ -0,0 +1,107 @@
[gram.temp]
# Annex A (informative) Grammar summary [[gram]](./#gram)
## A.11 Templates [gram.temp]
[template-declaration:](temp.pre#nt:template-declaration "13.1Preamble[temp.pre]")
[*template-head*](temp.pre#nt:template-head "13.1Preamble[temp.pre]") [*declaration*](dcl.pre#nt:declaration "9.1Preamble[dcl.pre]")
[*template-head*](temp.pre#nt:template-head "13.1Preamble[temp.pre]") [*concept-definition*](temp.concept#nt:concept-definition "13.7.9Concept definitions[temp.concept]")
[template-head:](temp.pre#nt:template-head "13.1Preamble[temp.pre]")
template < [*template-parameter-list*](temp.pre#nt:template-parameter-list "13.1Preamble[temp.pre]") > [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")opt
[template-parameter-list:](temp.pre#nt:template-parameter-list "13.1Preamble[temp.pre]")
[*template-parameter*](temp.param#nt:template-parameter "13.2Template parameters[temp.param]")
[*template-parameter-list*](temp.pre#nt:template-parameter-list "13.1Preamble[temp.pre]") , [*template-parameter*](temp.param#nt:template-parameter "13.2Template parameters[temp.param]")
[requires-clause:](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")
requires [*constraint-logical-or-expression*](temp.pre#nt:constraint-logical-or-expression "13.1Preamble[temp.pre]")
[constraint-logical-or-expression:](temp.pre#nt:constraint-logical-or-expression "13.1Preamble[temp.pre]")
[*constraint-logical-and-expression*](temp.pre#nt:constraint-logical-and-expression "13.1Preamble[temp.pre]")
[*constraint-logical-or-expression*](temp.pre#nt:constraint-logical-or-expression "13.1Preamble[temp.pre]") || [*constraint-logical-and-expression*](temp.pre#nt:constraint-logical-and-expression "13.1Preamble[temp.pre]")
[constraint-logical-and-expression:](temp.pre#nt:constraint-logical-and-expression "13.1Preamble[temp.pre]")
[*primary-expression*](expr.prim.grammar#nt:primary-expression "7.5.1Grammar[expr.prim.grammar]")
[*constraint-logical-and-expression*](temp.pre#nt:constraint-logical-and-expression "13.1Preamble[temp.pre]") && [*primary-expression*](expr.prim.grammar#nt:primary-expression "7.5.1Grammar[expr.prim.grammar]")
[template-parameter:](temp.param#nt:template-parameter "13.2Template parameters[temp.param]")
[*type-parameter*](temp.param#nt:type-parameter "13.2Template parameters[temp.param]")
[*parameter-declaration*](dcl.fct#nt:parameter-declaration "9.3.4.6Functions[dcl.fct]")
[*type-tt-parameter*](temp.param#nt:type-tt-parameter "13.2Template parameters[temp.param]")
[*variable-tt-parameter*](temp.param#nt:variable-tt-parameter "13.2Template parameters[temp.param]")
[*concept-tt-parameter*](temp.param#nt:concept-tt-parameter "13.2Template parameters[temp.param]")
[type-parameter:](temp.param#nt:type-parameter "13.2Template parameters[temp.param]")
[*type-parameter-key*](temp.param#nt:type-parameter-key "13.2Template parameters[temp.param]") ...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt
[*type-parameter-key*](temp.param#nt:type-parameter-key "13.2Template parameters[temp.param]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt = [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]")
[*type-constraint*](temp.param#nt:type-constraint "13.2Template parameters[temp.param]") ...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt
[*type-constraint*](temp.param#nt:type-constraint "13.2Template parameters[temp.param]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt = [*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]")
[type-parameter-key:](temp.param#nt:type-parameter-key "13.2Template parameters[temp.param]")
class
typename
[type-constraint:](temp.param#nt:type-constraint "13.2Template parameters[temp.param]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*concept-name*](temp.concept#nt:concept-name "13.7.9Concept definitions[temp.concept]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*concept-name*](temp.concept#nt:concept-name "13.7.9Concept definitions[temp.concept]") < [*template-argument-list*](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]")opt >
[type-tt-parameter:](temp.param#nt:type-tt-parameter "13.2Template parameters[temp.param]")
[*template-head*](temp.pre#nt:template-head "13.1Preamble[temp.pre]") [*type-parameter-key*](temp.param#nt:type-parameter-key "13.2Template parameters[temp.param]") ...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt
[*template-head*](temp.pre#nt:template-head "13.1Preamble[temp.pre]") [*type-parameter-key*](temp.param#nt:type-parameter-key "13.2Template parameters[temp.param]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt [*type-tt-parameter-default*](temp.param#nt:type-tt-parameter-default "13.2Template parameters[temp.param]")
[type-tt-parameter-default:](temp.param#nt:type-tt-parameter-default "13.2Template parameters[temp.param]")
= [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
= [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") template [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
[variable-tt-parameter:](temp.param#nt:variable-tt-parameter "13.2Template parameters[temp.param]")
[*template-head*](temp.pre#nt:template-head "13.1Preamble[temp.pre]") auto ...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt
[*template-head*](temp.pre#nt:template-head "13.1Preamble[temp.pre]") auto [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt = [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
[concept-tt-parameter:](temp.param#nt:concept-tt-parameter "13.2Template parameters[temp.param]")
template < [*template-parameter-list*](temp.pre#nt:template-parameter-list "13.1Preamble[temp.pre]") > concept ...opt [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt
template < [*template-parameter-list*](temp.pre#nt:template-parameter-list "13.1Preamble[temp.pre]") > concept [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")opt = [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
[simple-template-id:](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]") < [*template-argument-list*](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]")opt >
[template-id:](temp.names#nt:template-id "13.3Names of template specializations[temp.names]")
[*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[*operator-function-id*](over.oper.general#nt:operator-function-id "12.4.1General[over.oper.general]") < [*template-argument-list*](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]")opt >
[*literal-operator-id*](over.literal#nt:literal-operator-id "12.6User-defined literals[over.literal]") < [*template-argument-list*](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]")opt >
[template-name:](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[template-argument-list:](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]")
[*template-argument*](temp.names#nt:template-argument "13.3Names of template specializations[temp.names]") ...opt
[*template-argument-list*](temp.names#nt:template-argument-list "13.3Names of template specializations[temp.names]") , [*template-argument*](temp.names#nt:template-argument "13.3Names of template specializations[temp.names]") ...opt
[template-argument:](temp.names#nt:template-argument "13.3Names of template specializations[temp.names]")
[*constant-expression*](expr.const#nt:constant-expression "7.7Constant expressions[expr.const]")
[*type-id*](dcl.name#nt:type-id "9.3.2Type names[dcl.name]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]")opt [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") template [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]")
[constraint-expression:](temp.constr.decl#nt:constraint-expression "13.5.3Constrained declarations[temp.constr.decl]")
[*logical-or-expression*](expr.log.or#nt:logical-or-expression "7.6.15Logical OR operator[expr.log.or]")
[deduction-guide:](temp.deduct.guide#nt:deduction-guide "13.7.2.3Deduction guides[temp.deduct.guide]")
[*explicit-specifier*](dcl.fct.spec#nt:explicit-specifier "9.2.3Function specifiers[dcl.fct.spec]")opt [*template-name*](temp.names#nt:template-name "13.3Names of template specializations[temp.names]") ( [*parameter-declaration-clause*](dcl.fct#nt:parameter-declaration-clause "9.3.4.6Functions[dcl.fct]") ) -> [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]") [*requires-clause*](temp.pre#nt:requires-clause "13.1Preamble[temp.pre]")opt ;
[concept-definition:](temp.concept#nt:concept-definition "13.7.9Concept definitions[temp.concept]")
concept [*concept-name*](temp.concept#nt:concept-name "13.7.9Concept definitions[temp.concept]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1Attribute syntax and semantics[dcl.attr.grammar]")opt = [*constraint-expression*](temp.constr.decl#nt:constraint-expression "13.5.3Constrained declarations[temp.constr.decl]") ;
[concept-name:](temp.concept#nt:concept-name "13.7.9Concept definitions[temp.concept]")
[*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
[typename-specifier:](temp.res.general#nt:typename-specifier "13.8.1General[temp.res.general]")
typename [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]")
typename [*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]") templateopt [*simple-template-id*](temp.names#nt:simple-template-id "13.3Names of template specializations[temp.names]")
[explicit-instantiation:](temp.explicit#nt:explicit-instantiation "13.9.3Explicit instantiation[temp.explicit]")
externopt template [*declaration*](dcl.pre#nt:declaration "9.1Preamble[dcl.pre]")
[explicit-specialization:](temp.expl.spec#nt:explicit-specialization "13.9.4Explicit specialization[temp.expl.spec]")
template < > [*declaration*](dcl.pre#nt:declaration "9.1Preamble[dcl.pre]")