Boost C++ Libraries: Ticket #11072: [iostreams] mapped_file::size() returns the wrong size on 32-bit windows platforms for files larger than 4gb https://svn.boost.org/trac10/ticket/11072 <p> The signature is size_t mapped_file::size() which is uint32_t for 32-bit builds. This means files larger than 4gb will return an incorrect value. </p> <p> Looking at the windows implementation source for mapped_file <a class="ext-link" href="https://github.com/boostorg/iostreams/blob/master/src/mapped_file.cpp"><span class="icon">​</span>https://github.com/boostorg/iostreams/blob/master/src/mapped_file.cpp</a> around line 220. The size is queried and stored as a local boost::intmax_t but when assigning to size_ it is static_cast to the smaller type. </p> <p> I think the fix is to change the size member to be always 64-bit but I'm not familiar enough with the rest of the library to know if this would have any knock on effects. I suspect this is also an issue on linux as well but I am unable to easily test that at the moment, </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11072 Trac 1.4.3