| 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); |