N4910 [stmt.pre] paragraph 2 states:
A substatement of a statement is one of the following:
l
…
l
for a
selection-statement, any of its statements (but not its init-statement), or…
Consteval if statements (and consteval if equivalent statements, if ! is present) have the following syntaxes:
if !opt
consteval
compound-statement
if !opt
consteval
compound-statement
else
statement
The syntaxes use
compound-statement as the if-block instead of statement, while the semantic implies that
compound-statement should be treated as a substatement (N4910 [stmt.if] paragraph 5):
If a consteval if statement is evaluated in a context that is manifestly constant-evaluated, the first substatement
is executed.
‘The first substatement’ can only refer to
compound-statement.
Does the definition of substatement exclude
compound-statement appearing in the syntaxes from being substatements? If so, this is clearly a defect.