Boost logo

Boost Users :

Subject: Re: [Boost-users] [Iostreams] Safely returning filtering_istream from function
From: Szymon Gatner (szymon.gatner_at_[hidden])
Date: 2013-06-06 03:41:15


2013/6/5 Larry Evans <cppljevans_at_[hidden]>

>
> Hi Szymon,
>
> Could you not create a derived version of filtering_istream where
> the 1st base class contained all the filters and the 2nd base
> class was a filtering_istream. Then, I'd guess you could just
> pass references to filters in 1st base class to the 2nd base
> class, and they would live *almost* as long as the 2nd base
> class. I say almost because the 1st base class would be
> destroyed 1st. Would that be a problem? Hmm. Maybe the
> 1st base could be just a wrapped pointer which would be
> deleted in the derived class?
>
> -regards,
> Larry
>
>
I actually thought about the same thing, possibly using boost
base-from-member utility.

Still, this feels like working against Iostreams not with it :(

Thanks,
SImon



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