Boost logo

Boost Users :

Subject: Re: [Boost-users] Data type to handle C++ and Boost streams?
From: Cory Nelson (phrosty_at_[hidden])
Date: 2009-09-13 11:17:23


On Sat, Sep 12, 2009 at 6:59 PM, Adam Nielsen <a.nielsen_at_[hidden]> wrote:
> Hi all,
>
> Bit of a basic question - I'd like to have some functions that work with files
> (using std::fstream) but can also handle boost::iostreams.  Is there a data
> type I can use that can handle both?  For example:
>
>  void writeSomeData(std::fstream out);
>
> I can't pass a boost::iostream::stream to this function.  What type can I use
> to achieve this?

void writeSomeData(std::ostream &out);

-- 
Cory Nelson
http://int64.org

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