
22 Jan
2008
22 Jan
'08
6:48 p.m.
Rory O'Connor wrote:
In the file \boost\libs\iostreams\src\mapped_file.cpp on line 126 there is a simple member function called mapped_file_source::is_open().
It was assuming that an invalid handle was 0 but that is not true for a Windows bulid.
I changed the function to the following:
bool mapped_file_source::is_open() const
{
#ifdef BOOST_IOSTREAMS_WINDOWS
return !!pimpl_ && pimpl_->handle_ != INVALID_HANDLE_VALUE;
#else
return !!pimpl_ && pimpl_->handle_ != 0;
#endif
}
I think the preferred approach is to log a bug in the bug tracker against the iostreams component at http://svn.boost.org/trac/boost/ Perhaps a little test case which demonstrates the error too.