C.5 Classes

class-specifier:
class-head
{ member-listopt }

class-head:
class-key ambient-model
opt identifieropt base-specopt class-key ambient-modelopt class-name base-specopt

member-list:
member-declaration member-list
opt
access-specifier
: member-listopt

member-declaration: decl-specifiersopt member-declaration-listopt ; function-definition ;opt qualified-name ;

member-declarator-list:
member-declarator
member-declarator-list
, member-declarator

member-declarator:
ms-modifier-list
opt declarator pure-specifieropt
identifier
opt : constant-expression

pure-specifier:
= 0

base-spec:
: base-list

base-list:
base-specifier
base-list
, base-specifier

base-specifier:
complete-class-name
virtual access-specifieropt complete-class-name
access-specifier
virtualopt complete-class-name

access-specifier:
private
protected
public

conversion-function-name:
operator conversion-type-name

conversion-type-name:
type-specifier-list ptr-operator
opt

ctor-initializer:
: mem-initializer-list

mem-initializer-list:
mem-initializer
mem-initializer
, mem-initializer-list

mem-initializer:
complete-class-name
( expression-listopt )
identifier
( expression-listopt )

operator-function-name:
operator operator

operator: one of
newdelete
+ – * / % ^ & | ~
! = < > += –= *= /= %=
^= &= |= << >> >>= <<= == !=
<= >= && || ++ –– , –>* –>
() []