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

--- Comment #23 from Pedro Alves <palves at redhat dot com> ---
I think support in the compiler directly is likely to have better compile-time
performance, and I've stated from the beginning that I'd prefer that, FWIW.

OTOH, meanwhile, AFAICT, there's nothing preventing factoring out the trick
bits from char_traits into libstdc++-internal
__constexpr_strlen/__constexpr_memcmp etc. functions, that fallback into the
__builtin_xxx functions when arguments are not constexpr (just like the
char_traits versions), and using those throughout instead in constexpr
functions.

Reply via email to