From d1612b8c111c240737f497819ba08ae02c90c193 Mon Sep 17 00:00:00 2001 From: Matthew Ratzloff Date: Fri, 4 Jul 2025 10:58:04 -0700 Subject: [PATCH] Fix some (not all) C++23 errors --- include/tinyutf8/tinyutf8.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/tinyutf8/tinyutf8.h b/include/tinyutf8/tinyutf8.h index 2e39697..49dc494 100644 --- a/include/tinyutf8/tinyutf8.h +++ b/include/tinyutf8/tinyutf8.h @@ -2374,10 +2374,11 @@ namespace tiny_utf8 bool starts_with( const value_type (&str)[LITLEN] ) const noexcept { size_type str_len = str[LITLEN-1] ? LITLEN : LITLEN-1; const_iterator it = cbegin(), end = cend(); + value_type const* str_ptr = str; while( it != end && str_len ){ if( *it != *str ) return false; - ++it, ++str, --str_len; + ++it, ++str_ptr, --str_len; } return !str_len; } @@ -2760,7 +2761,7 @@ template std::istream& operator>>( std::istream& stream , tiny_utf8::basic_string& str ) noexcept(TINY_UTF8_NOEXCEPT) { std::string tmp; stream >> tmp; - str = move(tmp); + str = std::move(tmp); return stream; }