Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
CodeQL library for C/C++
codeql/cpp-all 5.0.0 (changelog, source)

Member predicate ConstexprIfStmt::hasElse

Holds if this ‘constexpr if’ statement has an ‘else’ statement.

For example, this holds for

if constexpr (b) { x = 1; } else { x = 2; }

but not for

if constexpr (b) { x = 1; }
predicate hasElse()