Boost logo

Boost Users :

Subject: Re: [Boost-users] [iostreams] How can I use the Stream Insertion operator (<<) with a filtering_streambuf?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-07-28 23:45:54


On 07/26/13 21:26, Stephen Greenfield wrote:
[snip]
>
> 3) Holger Gerth questioned why I was using filtering_streambuf when I
> could've been using filtering_stream. Truth is, I wasn't sure, however,
> in my experiments I could neither construct the ostream (which I
> required to pass to other functions) from the filtering_stream, nor
> could I pass the filtering_stream in place of the ostream I required.
>
> Even after reading several articles on filtering_streambuf vs
> filtering_stream, I'm still mystified how and why (FOR MY PURPOSE) I
> would use the filtering_stream over constructing an ostream from a
> filtering_streambuf.
[snip]
Hi Stephen,

I thought the filtering_stream would be derived from std::ostream, at
least according to:

  Derived class of std::basic_istream, std::basic_ostream or
  std::basic_iostream, used to perform filtering.

quoted from:

http://www.boost.org/doc/libs/1_54_0/libs/iostreams/doc/classes/filtering_stream.html

Did you not find this so, or do you needs require something more
specific than std::ostream& to be passed to the other functions you
mention?

-regards,
Larry


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net