8
Statements
[stmt.stmt]
8.5
Selection statements
[stmt.select]
8.5.1
General
[stmt.select.general]
1
#
Selection statements choose one of several flows of control
.
selection-statement
:
if
constexpr
o
p
t
(
init-statement
o
p
t
condition
)
statement
if
constexpr
o
p
t
(
init-statement
o
p
t
condition
)
statement
else
statement
if
!
o
p
t
consteval
compound-statement
if
!
o
p
t
consteval
compound-statement
else
statement
switch
(
init-statement
o
p
t
condition
)
statement
See
[dcl.
meaning]
for the optional
attribute-specifier-seq
in a condition
.
[
Note
1
:
An
init-statement
ends with a semicolon
.
—
end note
]
2
#
[
Note
2
:
Each
selection-statement
and each substatement of a
selection-statement
has a block scope (
[basic.
scope.
block]
)
.
—
end note
]