std::codecvt::out() returns a no-op in marginal situations

Paolo Carlini pcarlini@suse.de
Mon Jan 21 10:58:00 GMT 2008


Hi,
> So, if out() returns with:
>
> 1) from_next < from_end, and
>
> 2) to_next < to_end
>
> then can I assume that out() wants a larger output buffer? And, is the
> similar true for inp() as well? I don't seem to find anything in
> ISO/IEC 14882 that suggests this.
I think the issue boils down to the fact that we are using wcsnrtombs,
under the hood, and adjusting some details not clearly spelled out in
the standard to its behavior (in the standard there is also the sentence
in 22.2.1.5.2/2, "It always leaves the from_next and to_next pointers
pointing on beyond the last element successfully converted"). Whether we
must and can do better within the current constraints, I'm not sure,
maybe Bo has something to add... I'll also think a bit more about the issue.

Paolo.




More information about the Libstdc++ mailing list