Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-loop1.C

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