[Bug c++/106889] __builtin_strlen fails for some constexpr constructs

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 8 16:48:32 GMT 2022


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You can either use char_traits<char>::length (which is actually required to
work in constexpr) or use __builtin_is_constant_evaluated() instead of your
workaround.


More information about the Gcc-bugs mailing list