Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-02-27 12:24:55


"RIVASSEAU Jean Noel" <JN.RIVASSEAU_at_[hidden]> wrote in message
news:87F60F7FA02FF749AFB02BD9FCAA6B04DA7ABF_at_naserv31.nanterre.oberthurcs.com...
Hello

This is my last problem with the BSL but the most important one (because
there is no workaround).

I am trying to serialize a class (whose name is "ClassSpecification") which
has a std::vector of pointers. The code for serializing the class the
pointer refer to (MemberVariableSpecification) is written and instantiated
correctly. However I cannot correctly serialize the std::vector. It fails
with a message complaining about:

C:/Boost/include/boost-1_33_1/boost/archive/detail/iserializer.hpp:115:
error: incomplete type
`boost::serialization::extended_type_info_null<std::vector<MemberVariableSpecification*,
std::allocator<MemberVariableSpecification*> > >' used in nested name
specifier

I do not understand why I need an extended_type_info for this vector. I sure
need it for the class the pointers refer to (and I did specify it), but the
std::vector itself is serialized as such, not as a pointer.

*** hmmm - can sympathise with you here. I suspect that this is a mistake.
It might
be an accidental side effect of the fact that the default serialization
trait for any class is tracked with
class information. You might try the following:

BOOST_CLASS_IMPLEMENTATION(
    std::vector<MemberVariableSpecification*,
std::allocator<MemberVariableSpecification*>,
    boost::serialization::object_serializable
)

Why do I get this error ???

I would have to look into it.

Can you please check the attached code and help me?

Thanks

Jean-Noël

Ps: using gcc 3.4.2

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net