https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95349
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Using auto t = new(p) std::uint64_t; std::memcpy(t, std::launder(storage), sizeof(storage)); return t; also prevents GCC from propagating the dynamic type of p to t.