Annex A (informative)
Grammar summary
[gram]
A.9
Classes
[gram.class]
class-name
:
identifier
simple-template-id
class-specifier
:
class-head
{
member-specification
o
p
t
}
class-head
:
class-key
attribute-specifier-seq
o
p
t
class-head-name
class-virt-specifier
o
p
t
base-clause
o
p
t
class-key
attribute-specifier-seq
o
p
t
base-clause
o
p
t
class-head-name
:
nested-name-specifier
o
p
t
class-name
class-virt-specifier
:
final
class-key
:
class
struct
union
member-specification
:
member-declaration
member-specification
o
p
t
access-specifier
:
member-specification
o
p
t
member-declaration
:
attribute-specifier-seq
o
p
t
decl-specifier-seq
o
p
t
member-declarator-list
o
p
t
;
function-definition
friend-type-declaration
using-declaration
using-enum-declaration
static_assert-declaration
template-declaration
explicit-specialization
deduction-guide
alias-declaration
opaque-enum-declaration
empty-declaration
member-declarator-list
:
member-declarator
member-declarator-list
,
member-declarator
member-declarator
:
declarator
virt-specifier-seq
o
p
t
pure-specifier
o
p
t
declarator
requires-clause
declarator
brace-or-equal-initializer
identifier
o
p
t
attribute-specifier-seq
o
p
t
:
constant-expression
brace-or-equal-initializer
o
p
t
virt-specifier-seq
:
virt-specifier
virt-specifier-seq
virt-specifier
virt-specifier
:
override
final
pure-specifier
:
=
0
friend-type-declaration
:
friend
friend-type-specifier-list
;
friend-type-specifier-list
:
friend-type-specifier
.
.
.
o
p
t
friend-type-specifier-list
,
friend-type-specifier
.
.
.
o
p
t
friend-type-specifier
:
simple-type-specifier
elaborated-type-specifier
typename-specifier
conversion-function-id
:
operator
conversion-type-id
conversion-type-id
:
type-specifier-seq
conversion-declarator
o
p
t
conversion-declarator
:
ptr-operator
conversion-declarator
o
p
t
base-clause
:
:
base-specifier-list
base-specifier-list
:
base-specifier
.
.
.
o
p
t
base-specifier-list
,
base-specifier
.
.
.
o
p
t
base-specifier
:
attribute-specifier-seq
o
p
t
class-or-decltype
attribute-specifier-seq
o
p
t
virtual
access-specifier
o
p
t
class-or-decltype
attribute-specifier-seq
o
p
t
access-specifier
virtual
o
p
t
class-or-decltype
class-or-decltype
:
nested-name-specifier
o
p
t
type-name
nested-name-specifier
template
simple-template-id
computed-type-specifier
access-specifier
:
private
protected
public
ctor-initializer
:
:
mem-initializer-list
mem-initializer-list
:
mem-initializer
.
.
.
o
p
t
mem-initializer-list
,
mem-initializer
.
.
.
o
p
t
mem-initializer
:
mem-initializer-id
(
expression-list
o
p
t
)
mem-initializer-id
braced-init-list
mem-initializer-id
:
class-or-decltype
identifier