[Bug c++/80265] __builtin_{memcmp,memchr,strlen} are not usable in constexpr functions

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 23 11:23:00 GMT 2018


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

--- Comment #22 from Jonathan Wakely <redi at gcc dot gnu.org> ---
No, it worked around it by implementing char_traits a different way.

We also use these functions in <algorithm>, e.g. std::equal uses
__builtin_memcmp, and that needs to be constexpr too.

We could keep using Pedro's trick everywhere, but it's not very scalable.


More information about the Gcc-bugs mailing list