[PATCH] Enable input using variable-width encodings
Pétur Runólfsson
peturr02@ru.is
Mon Sep 8 09:44:00 GMT 2003
Nathan Myers wrote:
> Streamsize is conceptually unsigned, but must be signed for conformance.
There are a number of places where streamsize is used to hold the
value -1.
> We should used unsigned values where we can, and accept that casts
> are needed sometimes. We should _not_ use streamsize to describe buffer
> sizes, but should use it only where the interface requires it, or where
> the use is clearly derived from that interface.
>
> This will matter more, and be more noticeable, when streamsize is
> uniformly 64 bits on all targets, and (possibly) a class object.
> (Soon, I hope.)
Did you mean streamoff here? streamsize is required to be a built-in
type and should be the same size as size_t. I don't see how changing
the type for streamoff affects uses of streamsize.
Regards,
Petur
More information about the Libstdc++
mailing list