This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: [Patch] Fix (similarly) libstdc++/9178 and 11305
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: "Paolo Carlini" <pcarlini at unitus dot it>,<libstdc++ at gcc dot gnu dot org>
- Cc: "bkoz" <bkoz at redhat dot com>
- Date: Fri, 27 Jun 2003 11:30:03 -0000
- Subject: RE: [Patch] Fix (similarly) libstdc++/9178 and 11305
> + int __ext_multiplier = _M_codecvt->encoding();
> + if (__ext_multiplier == -1 || __ext_multiplier == 0)
> + __ext_multiplier = _M_codecvt->max_length();
I think this can be simplified to
int __ext_multiplier = _M_codecvt->max_length();
since _M_codecvt->encoding() == _M_codecvt->max_length() if
_M_codecvt->encoding() > 0
> + virtual int
> + do_length(const StateT&, const extern_type* from,
> + const extern_type* end, size_t max) const
> + {
According to the resolution to DR 75 (TC) the type of the first
parameter of length() and do_length() is StateT&, not const StateT&
(my fault, I wrote this testcase :-)
Thanks,
Petur