To measure position/offsets/size of streams, the standard specify std::streampos
, std::streamoff
and std::streamsize
, but they are implementation defined.
How to convert these types to long long int
in a secure and portable way ? (for example to measure a file size and inject it in a function that take a long long int as argument)