Opened 7 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: turkanis
Milestone: Boost 1.42.0 Component: iostreams
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:


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@… 7 years ago.
Patch file

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Benjamin.DeTroch@…

Patch file

comment:1 Changed 7 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 set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain turkanis.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.