Hello

Suppose I have:

Code:
boost::iostreams::file_source		file_source_("somefile.txt");
boost::iostreams::filtering_istream  filter_stream_;
some_filter some_filter_;

filter_stream_.push(boost::ref(some_filter_));
filter_stream_.push(boost::ref(file_source_));
Here I dont have any problems figuring if the file is open or not, by doing:

Code:
if (file_source_.is_open()) { }

But how can I tell if the file is_open() when I use boost iostreams this way (that I pass file_source as an object not as a reference):

Code:
boost::iostreams::filtering_istream  filter_stream_;
some_filter some_filter_;

filter_stream_.push(boost::ref(some_filter_));
filter_stream_.push(boost::iostreams::file_source("somefile.txt", std::ios::in | std::ios::binary));
Anyone knows how is that possible?

Thanks a lot for help

Regards