Modify

Ticket #3851 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

[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:

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

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

Change History

Changed 4 years ago by Benjamin.DeTroch@…

Patch file

comment:1 Changed 4 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 4 years ago by steven_watanabe

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

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

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.