This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]