Opened 13 years ago
Closed 13 years ago
#3011 closed Bugs (fixed)
code_converter doesn't support boost::ref( std::istream )
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | Boost 1.40.0 | Component: | iostreams |
Version: | Boost 1.38.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The documentations says that standard iostreams and streambufs model the Device concepts and that they need to be passed by reference via a boost::ref to components expecting a Device. This works in general, but not with the code_converter filter in 1.39. A short test case is:
#include <istream> #include <iostream> #include <boost/ref.hpp> #include <boost/iostreams/code_converter.hpp>
int main() {
namespace io = boost::iostreams; io::code_converter<std::istream> cvt( boost::ref(std::cin) );
}
A trivial patch that fixes this is attached.
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | iostream_codecvt.diff added |
---|
comment:1 by , 13 years ago
Is there any chance of this getting fixed? It is a clear case of the code not matching the documentation, and the provided patch is a trivial two-line change.
Patch