https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105995
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Right, you can only use std::string as a local variable in a constexpr function. I don't think it's expected to work as a constexpr variable.