1 #ifndef SIMDUTF_ERROR_H
2 #define SIMDUTF_ERROR_H
23 INVALID_BASE64_CHARACTER,
26 BASE64_INPUT_REMAINDER,
30 OUTPUT_BUFFER_TOO_SMALL,
40 simdutf_really_inline
result() : error{error_code::SUCCESS}, count{0} {}
42 simdutf_really_inline
result(error_code err,
size_t pos)
43 : error{err}, count{pos} {}
52 : error{error_code::SUCCESS}, input_count{0}, output_count{0} {}
54 simdutf_really_inline
full_result(error_code err,
size_t pos_in,
56 : error{err}, input_count{pos_in}, output_count{pos_out} {}
58 simdutf_really_inline
operator result()
const noexcept {
59 if (error == error_code::SUCCESS ||
60 error == error_code::BASE64_INPUT_REMAINDER) {
61 return result{error, output_count};
63 return result{error, input_count};