Chad Walters wrote:
[...]
This means that tee_filter's close() sets openmode to its default value of BOOST_IOS::in | BOOST_IOS::out. This mode is passed along to iostreams::close(), which ends up back in close_impl close() again as it is attempting to close the ChecksumFilter. However, now the check "if (in == ((which & BOOST_IOS::in) != 0))" fails, and so ChecksumFilter.close() is never invoked.
If I change the default value for openmode in tee_filter::close() to BOOST_IOS::out, everything works OK for me, but I am not really sure that this is the right thing to do.
It seems like a issue with close_impl
PS: And if you read this far, you probably understand the iostreams library more than well enough to confirm whether the possible (likely?) bug I reported earlier this week is really a bug (nobody has replied as of yet):
At the bottom of concepts.hpp, the following typedefs appear:
typedef multichar_filter<input> multichar_input_filter; typedef multichar_filter<input> multichar_input_wfilter; typedef multichar_filter<output> multichar_output_filter; typedef multichar_filter<output> multichar_output_wfilter; typedef multichar_filter
multichar_dual_use_filter; typedef multichar_filter multichar_dual_use_wfilter; I think the wfilter versions of these typedefs should use multichar_wfilter<...>. Agreed?
A copy-n-paste bug !? My $0.02