|
Boost : |
Subject: [boost] [iostream] closing filtering_ostream
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-11-22 14:29:07
Hello,
I must be missing something basic, but I cannot find that in Boost.Iostream documentation.
Suppose I am writing into filtering_ostream, and I'm done. I wish to close the ostream,
flushing whatever remaining data and reporting whatever I/O errors arise to user. However:
base64.cpp:17: error: âclass boost::iostreams::filtering_ostreamâ has no member named âcloseâ
The documentation say:
By default, if the Device at the end of the chain is popped or if the filtering_stream is complete
when it is destroyed, all the filters and devices in the chain are closed using the function close.
So I assume something is closed in destructor, but what if I don't want the destructor to
potentially throw, and instead what to close the stream explicitly?
- Volodya
P.S. Actually, I'm sure there's a Trac issue saying that potentially throwing destructor is not
good.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk