https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111351

--- Comment #10 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
> > Would it be at least possible to make the error clearer?

> I don't think that's possible to do in the library.

Agreed. IMO this bug should be marked RESOLVED at this point, because James
Knight's patch was indeed accepted into libc++ in October 2023, so all STL
vendors now behave the same way in this situation (the only differences being
around SSO buffer size and, in libstdc++'s case, holding a pointer-to-self
whose value must *also* be a compile-time constant).

https://quuxplusone.github.io/blog/2023/10/13/constexpr-string-round-2/

Theodore has a good point that the compiler's own error message could perhaps
be better; but that should be opened as a new bug against the compiler.
libstdc++ can't do anything about it from their side.

Reply via email to