[RFC] Another look at LFS vs filebuf::showmanyc

Paolo Carlini pcarlini@suse.de
Mon Sep 20 15:54:00 GMT 2004


Paolo Carlini wrote:

> According to the C++ standard, filebuf::showmanyc returns a *streamsize*,
> which is a ptrdiff_t, that is **always** 32 bits on 32-bit platforms,
> even if LFS-enabled... Therefore, on real large files, a fixed showmanyc
> would typically overflow the type of its return value :( :(

What about returning numeric_limits<streamsize>::max() in such cases?

Paolo.



More information about the Libstdc++ mailing list