I guess you could allow condexpr if statements to do the same (as long as you have no unmatched curly brackets { } inside) but it would look strange.
enum States
{
start_state,
intermediate_state,
end_state,
if condexpr (defined(DEBUG))
{
debug_state
}
};
Something else I also come to think about is scope...
It looks like condexpr if statements introduces a scope, but it doesn't, which is very confusing if you define variables inside there.
I guess you could define it in such a way that the opening and closing curly bracket { } of the condexpr if statement expands to opening and closing curly bracket { } in the resulting code but that would limit its usefulness a lot.