CodeQL library for C/C++
codeql/cpp-all 0.12.11 (changelog, source)
Search

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()