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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #5)
> N.B. for char_traits::char::find() we almost certainly want to use
> __builtin_strchr and have the FE expand it in-place in constant expressions,
> as the performance of our current code sucks, see PR 66414.

Oops, faulty memory - that bug's about string::find not char_traits::find. Our
char_traits<char>::find already uses __builtin_memchr (and should continue to
do so, which means we need that to be usable in a constexpr function if it
isn't already).

We still need the generic char_traits<CharT>::find to be constexpr too though.

Reply via email to