Boost C++ Libraries: Ticket #3011: code_converter doesn't support boost::ref( std::istream ) https://svn.boost.org/trac10/ticket/3011 <p> 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: </p> <p> #include &lt;istream&gt; #include &lt;iostream&gt; #include &lt;boost/ref.hpp&gt; #include &lt;boost/iostreams/code_converter.hpp&gt; </p> <p> int main() { </p> <blockquote> <p> namespace io = boost::iostreams; io::code_converter&lt;std::istream&gt; cvt( boost::ref(std::cin) ); </p> </blockquote> <p> } </p> <p> A trivial patch that fixes this is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3011 Trac 1.4.3 richard@… Sun, 10 May 2009 13:48:33 GMT attachment set https://svn.boost.org/trac10/ticket/3011 https://svn.boost.org/trac10/ticket/3011 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">iostream_codecvt.diff</span> </li> </ul> <p> Patch </p> Ticket anonymous Wed, 11 Nov 2009 13:47:59 GMT <link>https://svn.boost.org/trac10/ticket/3011#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3011#comment:1</guid> <description> <p> 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. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Thu, 12 Nov 2009 19:19:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3011#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3011#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57609" title="Support boost::ref(std::istream) in code_converter. Refs #3011. By ...">[57609]</a>) Support boost::ref(std::istream) in code_converter. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3011" title="#3011: Bugs: code_converter doesn't support boost::ref( std::istream ) (closed: fixed)">#3011</a>. </p> <p> By Richard Smith. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Sat, 02 Jan 2010 11:51:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3011#comment:3 https://svn.boost.org/trac10/ticket/3011#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58633" title="Merge iostream fixes, mostly by Richard Smith. Fixes #3612, #3311, ...">[58633]</a>) Merge iostream fixes, mostly by Richard Smith. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3612" title="#3612: Bugs: Throwing heap-allocated exceptions (closed: fixed)">#3612</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3311" title="#3311: Bugs: Unintentionally unthrown exceptions (closed: fixed)">#3311</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2094" title="#2094: Bugs: iostreams fails to compile with -fno-exceptions (closed: fixed)">#2094</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3010" title="#3010: Bugs: Missing include guard in boost/iostreams/device/mapped_file.hpp (closed: fixed)">#3010</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2894" title="#2894: Bugs: Incorrect type for buffer_size and pback_size parameters (closed: fixed)">#2894</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3011" title="#3011: Bugs: code_converter doesn't support boost::ref( std::istream ) (closed: fixed)">#3011</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3352" title="#3352: Patches: CRC not correctly computed on x64 during decompression of gzip archive (closed: fixed)">#3352</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3505" title="#3505: Bugs: mapped_file windows handle validity check patch against 1.40.0 (closed: fixed)">#3505</a>. </p> Ticket