diff --git a/ostd/string.hh b/ostd/string.hh index 64a96f9..6d60b06 100644 --- a/ostd/string.hh +++ b/ostd/string.hh @@ -818,8 +818,9 @@ namespace utf { * If none were written, the encoding failed and the string is not * advanced. */ - template - inline std::size_t encode(R &sink, basic_char_range &r) { + template + inline std::size_t encode(OR &sink, IR &r) { + using IC = std::remove_const_t>; if constexpr(max_units == 1) { std::size_t n = 0; if (!r.empty() && (n = utf::encode(sink, char32_t(r.front())))) { @@ -845,8 +846,8 @@ namespace utf { return 0; } - template - inline std::size_t encode(R &sink, basic_char_range &r) { + template + inline std::size_t encode(OR &sink, IR &r) { return encode>(sink, r); }