/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-71537.C
bloba1c9f4f26ab8ab6a17a1e97520cfd6a8debdfdd0
1 // PR c++/71537
2 // { dg-do compile { target c++14 } }
4 constexpr bool
5 foo ()
7   constexpr int n[42] = { 1 };
8   constexpr int o = n ? 1 : 0;
9   constexpr int p = n + 1 ? 1 : 0;
10   constexpr int q = "abc" + 1 ? 1 : 0;
11   return o + p + q == 3;
14 static_assert (foo (), "");