| 1 |
// P2647R1 - Permitting static constexpr variables in constexpr functions |
| 2 |
// { dg-do compile { target c++23 } } |
| 3 |
|
| 4 |
constexpr char |
| 5 |
test () |
| 6 |
{ |
| 7 |
static const int x = 5; |
| 8 |
static constexpr char c[] = "Hello World"; |
| 9 |
return *(c + x); |
| 10 |
} |
| 11 |
|
| 12 |
static_assert (test () == ' '); |