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