[RFC] A QoI problem with filebuf and POD charT != char, wchar_t
Paolo Carlini
pcarlini@suse.de
Wed May 19 12:20:00 GMT 2004
Paolo Carlini wrote:
> ... well, /almost/ identically, of course: a few sizeof(_CharT) would
> have
> to be sprinkled here and there.
Hi again.
For concreteness, I'm attaching below a draft patch, already regtested and
lightly tested on a few testcases similar to the posted one.
I briefly recall that the general philosophy is as follows: a codecvt
facet not
available is basically equivalent to always_noconv. In order to deal
with both
in the same way we only need to take into account sizeof(char_type).
When (the
most common case) char_type == char, no computational price is paid since
sizeof(char_type) == 1 and no actual divisions or any other additional code
is really involved.
If no one finds something basically flawed with this approach, I'll
refine the
patch further, prepare a basic set of new testcases (probably using a
short type
as char_type), and post the whole in a few days.
Thanks,
Paolo.
/////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_qoi_filebuf
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040519/cab40520/attachment.ksh>
More information about the Libstdc++
mailing list