On Tue, Jul 11, 2017 at 6:40 AM, Phil Endecott via Boost
The following code is totally untested.
template <typename ITER> bool is_valid_utf8(ITER i, ITER end, uint8_t& pending)
Ah, I see what you did - very nice! This is almost the same as the current version but smaller. I like the way you run the code-point-at-a-time until reaching alignment, and then run the mask loop. This is a better way of organizing the code, thanks. I've imported the code into Beast to plug it into the tests and benchmarks, but it fails the tests: https://github.com/vinniefalco/Beast/tree/utf8 https://github.com/vinniefalco/Beast/commit/29cd9d6a9e1e7217798be06ded299ffa... I tried to figured out what's wrong with the routine but my grasp of utf8 is not quite as good as yours. Thanks