+ const wchar_t* const prev_input_ptr = cur_input_ptr;
+ utf::code_point c = decoder::decode(cur_input_ptr, end_input_ptr);
+ // If incomplete restore to beginning of incomplete char to use on next buffer
+ if(c == utf::incomplete)
+ {
+ cur_input_ptr = prev_input_ptr;
+ break;
+ }
+ if(c == utf::illegal)