https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103668
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't think this is valid C++. A vector created in a constexpr function must be destroyed there as well, it cannot escape from the function.