| 1 |
// PR c++/71537 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
constexpr bool |
| 5 |
foo () |
| 6 |
{ |
| 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; |
| 12 |
} |
| 13 |
|
| 14 |
static_assert (foo (), ""); |