Swapped the standard and non-standard overrides for do_length.

This commit is contained in:
Andrey Semashev
2017-10-29 19:31:28 +03:00
parent aee87734a8
commit cf6808b26f
2 changed files with 5 additions and 4 deletions

View File

@ -179,7 +179,7 @@ protected:
// How many char objects can I process to get <= max_limit
// wchar_t objects?
virtual int do_length(
const std::mbstate_t &,
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit
@ -189,8 +189,9 @@ protected:
#endif
;
// Nonstandard override
virtual int do_length(
std::mbstate_t & s,
const std::mbstate_t & s,
const char * from,
const char * from_end,
std::size_t max_limit
@ -200,7 +201,7 @@ protected:
#endif
{
return do_length(
const_cast<const std::mbstate_t &>(s),
const_cast<std::mbstate_t &>(s),
from,
from_end,
max_limit

View File

@ -177,7 +177,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_out(
// How many char objects can I process to get <= max_limit
// wchar_t objects?
int utf8_codecvt_facet::do_length(
const std::mbstate_t &,
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit