[Bug c++/106889] __builtin_strlen fails for some constexpr constructs
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 8 18:28:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106889
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> I think std::strlen isn't constexpr even in latest C++, so all of this is
> permitted by the standard...
Right, which is why I recommend using char_traits::length instead.
More information about the Gcc-bugs
mailing list