Boost logo

Boost :

Subject: Re: [boost] possible problem with boost::iostreams::file_descriptor
From: eg (egoots_at_[hidden])
Date: 2009-06-11 02:00:50


Zachary Turner wrote:

> ...
> and constructors / code should be changed accordingly. Otherwise following
> code (Windows) asserts, even though I don't think it should:
>
> bool is_open(HANDLE h) { return h && h!=INVALID_HANDLE_VALUE;}
>
> HANDLE h = ::CreateFile("C:\\autoexec.bat", GENERIC_READ,
> FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
>
> boost::iostreams::file_descriptor fd(h, false);
>
> BOOST_ASSERT(fd.is_open() == is_open(h));
>
>
> Thoughts?

I think there may be a related bug report :
https://svn.boost.org/trac/boost/ticket/2817


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk