[RFC] 9533: sixth iteration
Paolo Carlini
pcarlini@unitus.it
Mon Mar 24 14:27:00 GMT 2003
Pétur Runólfsson wrote:
>This looks great, but if this is meant for 3.3 this:
>
>+ if (__cvt.encoding() >= 0)
>+ __ret += _M_file.showmanyc_helper(__sync) / __cvt.max_length();
>
>should be changed to:
>
>+ if (__cvt.always_noconv())
>+ __ret += _M_file.showmanyc_helper(__sync);
>
>since codecvt<wchar_t, char, mbstate_t>::encoding() and max_length() in
>3.3 return garbage (they are not perfect in 3.4 either :-).
>
Actually, the patch was tested with 3.4: I'm reluctant to apply
something first to 3.3, then to trunk.
Thanks for the info, anyway, which will be much useful in the near future.
What do you mean exactly by "garbage" (*)? Could you provide some more
info or, even better, a patch, enabling us to use safely the much more
correct code on top?
Thanks,
Paolo.
(*) Your colorful language often reminds me that of H.J. Lu ;-)
More information about the Libstdc++
mailing list