Hi,
I receive a compile time error when I try to serialize
shared_ptr<string> in my class. Here are the relevant parts of this class:
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
#include
#include
#include
class chunk_data : public chunk_metadata {
public:
chunk_data(std::string s);
chunk_data(
chunk_metadata metadata,
boost::shared_ptrstd::string data_ptr);
chunk_data(
boost::filesystem::path path,
chunk_metadata::cuid_type chunk_id);
chunk_data(
boost::filesystem::path path,
chunk_metadata::cuid_type chunk_id,
boost::shared_ptrstd::string data_ptr);
virtual ~chunk_data();
template <typename Archive>
void serialize(Archive& ar, const unsigned int version) {
boost::serialization::base_object(*this);
ar & data_ptr_;
}
boost::shared_ptrstd::string data_ptr_;
};
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
And here are the relevant parts from compilation error.
invalid application of âsizeofâ to incomplete type
âboost::STATIC_ASSERTION_FAILURE<false>â
error: âstruct std::basic_stringâ has no member named âserializeâ
I haven't found any relevant hints about this error neither in the
documentation or on the boost mailing list. Also I've attached the compilation
log. I would really appreciate any help.
-Vjeko