Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-11-07 14:47:30


Alberto Ganesh Barbati wrote:
> Jonathan Turkanis wrote:
>>
>> My recollection is that all the is_open() functions should be const,
>> so I'm inclined to change [in]direct_streambuf. Could you give me an
>> example of something that won't currently compile, but should?
>>
>
> For example this:
>
> ----- test.cpp
> #include <boost/iostreams/stream.hpp>
>
> namespace io = boost::iostreams;
>
> class empty_source
> {
> public:
> typedef char char_type;
> typedef io::source_tag category;
>
> empty_source(int) {}
> std::streamsize read(char* s, std::streamsize n) { return -1; }
> };
>
> int main()
> {
> io::stream<empty_source> s(0);
> s.is_open();

Yeah, you're right. It looks like the regression tests only cover is_open() for
filtering_stream[buf].

I'll fix this, but I'm not sure if it can go into 1.33.1.

> Ganesh

-- 
Jonathan Turkanis
www.kangaroologic.com

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