A local-constant-declaration declares one or more local constants.
The type of a local-constant-declaration specifies the type of the constants introduced by the declaration. The type is followed by a list of constant-declarators, each of which introduces a new constant. A constant-declarator consists of an identifier that names the constant, followed by an "=
" token, followed by a constant-expression (§7.15) that gives the value of the constant.
The type and constant-expression of a local constant declaration must follow the same rules as those of a constant member declaration (§10.3).
The value of a local constant is obtained in an expression using a simple-name (§7.5.2).
The scope of a local constant extends from its declaration to the end of the block containing the declaration. The scope of a local constant does not include the constant-expression that provides its value. Within the scope of a local constant, it is an error to declare another local variable or constant with the same name.