| 1 |
// PR c++/97195 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
|
| 4 |
#include "construct_at.h" |
| 5 |
|
| 6 |
constexpr bool |
| 7 |
foo () |
| 8 |
{ |
| 9 |
int a = 5; |
| 10 |
int *p = std::construct_at (&a, -1); |
| 11 |
if (p[0] != -1) |
| 12 |
throw 1; |
| 13 |
return true; |
| 14 |
} |
| 15 |
constexpr bool b = foo (); |