From aee87734a8474f4ffd5047845a3dd9bbabc74418 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 29 Oct 2017 19:27:04 +0300 Subject: [PATCH] Fixed do_length virtual override. Fixed a bug introduced by b47fccb4a4e7fb32b74d03f6f80250bc2cafe501, which commented the correct virtual function override and thus broke length() result. --- include/boost/detail/utf8_codecvt_facet.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/utf8_codecvt_facet.hpp b/include/boost/detail/utf8_codecvt_facet.hpp index bf22e0c..afe3f2c 100644 --- a/include/boost/detail/utf8_codecvt_facet.hpp +++ b/include/boost/detail/utf8_codecvt_facet.hpp @@ -188,7 +188,7 @@ protected: throw() #endif ; -/* + virtual int do_length( std::mbstate_t & s, const char * from, @@ -206,7 +206,7 @@ protected: max_limit ); } -*/ + // Largest possible value do_length(state,from,from_end,1) could return. virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW { return 6; // largest UTF-8 encoding of a UCS-4 character