Boost logo

Boost :

From: Francis ANDRE (francis.andre_at_[hidden])
Date: 2004-11-08 04:13:35


Hi

In order to serialize a derivative class of boost/filesystem/path, one
cannot access the base class member m_path without changing its visibility
from private to protected:

I would suggest to change the visibility of this m_path member from
private: to protected, or to add an implicit definition of the serialize
method into the class boost::filesystem::path.

#include <boost/filesystem/path.hpp>
namespace boost { namespace serialization { class access; }}

class OSD : public boost::filesystem::path {
private:
        friend class boost::serialization::access;
        friend std::ostream & operator<<(std::ostream &os, const OSD&);
        template<class Archive>
        void serialize(Archive &ar, const unsigned int version) {
            ar & m_path;
        }
};

Regards

Francis ANDRE


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk