☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp23
/
consteval-if13.C
☽
☼
gcc/testsuite/g++.dg/cpp23/consteval-if13.C
code
plain
raw
1
// PR c++/115583
2
// { dg-do compile { target c++23 } }
3
// { dg-additional-options -O }
4
5
consteval int f(int i) {
6
return i;
7
}
8
const bool b = 0;
9
constexpr int g(int i) {
10
if consteval {
11
return f(i);
12
} else {
13
return i;
14
}
15
}
16
int main() {
17
return g(1);
18
}