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