The std::meta::define_static_string uses a StringLiteral expression to construct its static storage. This is essentially a lazy approach, which has the consequence of disallowing the returned pointer from being used in a string literal (e.g., godbolt). We should instead manually allocate the result in a null-terminated character array with static storage duration.
The
std::meta::define_static_string
uses aStringLiteral
expression to construct its static storage. This is essentially a lazy approach, which has the consequence of disallowing the returned pointer from being used in a string literal (e.g., godbolt). We should instead manually allocate the result in a null-terminated character array with static storage duration.