File indexing completed on 2025-10-31 08:46:48
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 #ifndef BOOST_MYSQL_IMPL_INTERNAL_CALL_NEXT_CHAR_HPP
0009 #define BOOST_MYSQL_IMPL_INTERNAL_CALL_NEXT_CHAR_HPP
0010 
0011 #include <boost/mysql/character_set.hpp>
0012 
0013 #include <boost/assert.hpp>
0014 
0015 #include <cstddef>
0016 
0017 namespace boost {
0018 namespace mysql {
0019 namespace detail {
0020 
0021 inline std::size_t call_next_char(const character_set& charset, const char* first, const char* last) noexcept
0022 {
0023     
0024     BOOST_ASSERT(last > first);
0025 
0026     
0027     auto* data = reinterpret_cast<const unsigned char*>(first);
0028     if (*data < 0x80)
0029         return 1u;
0030 
0031     
0032     return charset.next_char({data, static_cast<std::size_t>(last - first)});
0033 }
0034 
0035 }  
0036 }  
0037 }  
0038 
0039 #endif