Modify

Ticket #3011 (closed Bugs: fixed)

Opened 5 years ago

Last modified 4 years ago

code_converter doesn't support boost::ref( std::istream )

Reported by: Richard Smith <richard@…> Owned by: 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

iostream_codecvt.diff Download (503 bytes) - added by richard@… 5 years ago.
Patch

Change History

Changed 5 years ago by richard@…

Patch

comment:1 Changed 4 years ago by anonymous

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.

comment:2 Changed 4 years ago by danieljames

(In [57609]) Support boost::ref(std::istream) in code_converter. Refs #3011.

By Richard Smith.

comment:3 Changed 4 years ago by danieljames

  • Status changed from new to closed
  • Resolution set to fixed

(In [58633]) Merge iostream fixes, mostly by Richard Smith.

Fixes #3612, #3311, #2094, #3010, #2894, #3011, #3352, #3505.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.