__builtin_memchr in constexpr function
AntonBikineev opened this issue · comments
Anton Bikineev commented
Hey Anton,
__builtin_memchr returns a pointer to void and then you explicitly cast it to const char*.
This seems to be not allowed in constexpr functions and clang rejects it, whereas gcc passes.
Is there another maybe-builtin-solution for such a case?
Antony Polukhin commented
This won't fix.
The example was designed to be a proof of concept, that it is possible to implement the constexpr char_traits. It was not intended to be a ready to use solution.