Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-local-compound1.C

raw
1 // { dg-do compile { target c++14 } }
2
3 #define SA(X) static_assert((X),#X)
4
5 constexpr int f(int i) { { int j = i+1; return j; } }
6
7 constexpr int i = f(41);
8
9 struct S
10 {
11 constexpr S() { { constexpr int j = 17; SA(j == 17); } }
12 };
13
14 SA(i==42);