2 // { dg-do compile { target c++11 } }
4 constexpr int n[42] = {1};
5 constexpr int x1 = n ? 1 : 0;
6 constexpr int x2 = n + 1 ? 1 : 0;
7 constexpr int x3 = "abc" ? 1 : 0;
8 constexpr int x4 = "abc" + 1 ? 1 : 0;
9 constexpr bool x5 = "abc" + 1;
10 constexpr bool x6 = "abc" + 4;
11 constexpr bool x7 = n + 42;
12 static_assert (x1 == 1, "");
13 static_assert (x2 == 1, "");
14 static_assert (x3 == 1, "");
15 static_assert (x4 == 1, "");
16 static_assert (x5, "");
17 static_assert (x6, "");
18 static_assert (x7, "");