|
Boost : |
From: Steven Burns (royalstream_at_[hidden])
Date: 2007-09-05 16:37:18
From: http://svn.boost.org:80/trac/boost/ticket/1232
Under windows, mapped_file_impl::handle_ gets set to INVALID_HANDLE_VALUE
when the file gets closed or on error.
But mapped_file_source::is_open() incorrectly assumes that if the handle is
invalid it will have a value of zero and it doesn't consider
INVALID_HANDLE_VALUE a possibility.
Obviously, adding INVALID_HANDLE_VALUE to mapped_file_source::is_open()
would be poor design. A better way would be to explose a
mapped_file_impl::is_valid() method that works as it should depending on the
platform and have mapped_file_source::is_open() call it.
Regards,
Steven Burns
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk