Files
cppdraft_translate/cppdraft/stmt/block.md
2025-10-25 03:02:53 +03:00

1.7 KiB

[stmt.block]

8 Statements [stmt]

8.4 Compound statement or block [stmt.block]

1

#

A compound statement (also known as a block) groups a sequence of statements into a single statement.

compound-statement:
{ statement-seqopt label-seqopt }

statement-seq:
statement statement-seqopt

label-seq:
label label-seqopt

A label at the end of a compound-statement is treated as if it were followed by a null statement.

2

#

[Note 1:

A compound statement defines a block scope ([basic.scope]).

A declaration is a statement ([stmt.dcl]).

— end note]