Boost logo

Boost :

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


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 {
        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;


Francis ANDRE

Boost list run by bdawes at, gregod at, cpdaniel at, john at