|
Boost : |
From: Klaus Gütter (Klaus.Guetter_at_[hidden])
Date: 2005-03-31 01:39:32
Hello Jason,
I get the same error message when trying to deserialize this class (MSVC
7.1):
class TestVector
{
private:
std::vector<int> v;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive& ar, const unsigned int version)
{
ar & BOOST_SERIALIZATION_NVP(v);
}
public:
TestVector()
{
}
};
Klaus
"Jason Earl" <jason_at_[hidden]> schrieb im Newsbeitrag
news:<004001c533fc$48724270$861aa8c0_at_system2600>...
> If you have look at my original code, it does use
> BOOST_SERIALIZATION_SPLIT_MEMBER() inside the class (sorry the code doesn't
> intend with tabs nicely).
>
> I also have tried including both...
>
> #include <boost/serialization/split_member.hpp>
> #include <boost/serialization/split_free.hpp>
>
> but neither work. I assume that the split free is obviously used by
> the list
> data type as it's not intrusive, and the member one is what I should include
> and have been including.
>
> I'll look running the tests later when I get round to figuring out how
> to
> run them etc. I'll need to RTFM first though. From the regression thingy, it
> said MSVC++7.1 worked OK though.
>
> I think this could be a little bug in the library (I won't speak too
> loudly
> here as I'm still a C++ beginner, and therefore there's a good chance I'm
> still doing something very dumb), maybe someone else could confirm they get
> the same problem as me when trying to serialize an class member varaible
> that is a list of objects using load / save methods that are class members
> under VS.NET 2003, like in my example....
>
> anotherwords I have class A with separate load/save members, and then
> I have
> class B which has a member inside it that is of type std::list<A*>.
>
> Sorry in advance if I break the threaded reply structure on this list.
> I
> didn't have the list mail me replies. I'm new to all this mailing list
> stuff.
>
> Jason
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk