
Niklas Wiberg wrote:
Hi,
Here is the failing code: <code> void main() { typedef boost::iostreams::code_converter<boost::iostreams::file_sink, WideCharToUtf8Cvt> my_sink;
std::wstring teststr(L"Blah blah."); boost::iostreams::filtering_wostream out; boost::iostreams::file_sink myFile("out.txt"); out.push(my_sink(myFile)); out << teststr; } </code>
There's a bug in boost/iostreams/chain.hpp which can be fixed as follows. The fix will appear in 1.33.1. Thanks for bringing the problem to my attention. *** chain.hpp 9 Sep 2005 18:08:40 -0000 1.14.2.4 --- chain.hpp 11 Oct 2005 16:40:24 -0000 *************** *** 566,572 **** pimpl_->close(); streambuf_type* buf = 0; std::swap(buf, list().back()); ! buf->set_auto_close(auto_close()); buf->set_next(0); delete buf; list().pop_back(); --- 566,572 ---- pimpl_->close(); streambuf_type* buf = 0; std::swap(buf, list().back()); ! buf->set_auto_close(false); buf->set_next(0); delete buf; list().pop_back(); -- Jonathan Turkanis www.kangaroologic.com