Opened 13 years ago

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

Download all attachments as: .zip

Change History (3)

by Benjamin.DeTroch@…, 13 years ago

Attachment: aggregate_filter.hpp.patch added

Patch file

comment:1 by anonymous, 13 years ago

#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 by Steven Watanabe, 12 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.