Boost logo

Boost Users :

Subject: [Boost-users] Data type to handle C++ and Boost streams?
From: Adam Nielsen (a.nielsen_at_[hidden])
Date: 2009-09-12 21:59:04


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?

Many thanks,
Adam.


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