$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [serialization] serialization of an ifstream/ofstream class member
From: Pablo Madoery (madoerypablo_at_[hidden])
Date: 2014-03-28 09:09:44
Hi. Do You know if there is a way to serialize an ifstream/ofstream class
member.
I have this class for example
class Object
{
public:
Object();
Object(string name);
virtual ~Object();
string getName() const;
private:
string name_;
ifstream file_;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & name_;
ar & file_;
}
};
when I try to serialize it throw compilation error :
error: 'struct std::basic_ifstream<char>' has no member named 'serialize'.
Is there a specific header i must include ?