Is std::streampos guaranteed to be unsigned long long?
If not so, how does std::istream::seekg work correctly on files larger
No, it's not guaranteed to be unsigned long long.
Especially with older compilers, it may not work with files larger than 4 GB (and in a few cases it was signed, so it only worked with files up to 2 GB--but when typical hard drives were 20 to 40 megabytes, that probably didn't seem like a major consideration).