C++: Add constexpr if testcase.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-07-31 13:08:49 +01:00
parent 59e22f6cd9
commit 4e62dc81d2

View File

@@ -62,3 +62,9 @@ Virtual getAVirtual();
void test9() {
typeid(getAVirtual()); // unevaluated
}
void constExprIf() {
if constexpr(sizeof(int) == 4) { } // unevaluated
}
// semmle-extractor-options: -std=c++20