Modify

Opened 8 years ago

Closed 7 years ago

#3851 closed Bugs (fixed)

[iostreams] aggregate_filter incapable of handling character types other than char

Reported by: Benjamin.DeTroch@… Owned by: Jonathan Turkanis
Milestone: Boost 1.42.0 Component: iostreams
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

It appears aggreate_filter is incapable of handling character types other than char. When you for instance try using wchar_t, you'll get following compiler error:

boost/iostreams/filter/aggregate.hpp(95): error C2664: 'void boost::iostreams::aggregate_filter<Ch,Alloc>::do_write<Sink>(Sink &,const char *,std::streamsize)' : cannot convert parameter 2 from 'wchar_t *' to 'const char *'

with [

Ch= wchar_t, Alloc=std::allocator<wchar_t>, Sink=boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streamuf< wchar_t >>

] Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast.

Patch attached.

Attachments (1)

aggregate_filter.hpp.patch (488 bytes) - added by Benjamin.DeTroch@… 8 years ago.
Patch file

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Benjamin.DeTroch@…

Attachment: aggregate_filter.hpp.patch added

Patch file

comment:1 Changed 8 years ago by anonymous

#3279 seems to be related to this bug. It seems that in someplaces instead of the template parameter 'char_type' the type 'char' is used instead.

comment:2 Changed 7 years ago by Steven Watanabe

Resolution: fixed
Status: newclosed

(In [62994]) Make aggregate_filter work with wide characters. Fixes #3851.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonathan Turkanis.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.