|
Boost Users : |
Subject: [Boost-users] Boost.Serialization not building
From: gast128 (gast128_at_[hidden])
Date: 2009-11-26 07:30:20
Dear all,
we just upgrade to Boost 1.41 and get a compile error in Boost.Serialization:
1>c:\work sdk\boost_1_41_0\boost/archive/shared_ptr_helper.hpp(114) : error
C2440: 'return' : cannot convert from 'const
boost::serialization::extended_type_info_typeid<T>' to 'const
boost::serialization::extended_type_info *'
There was already a discussion about this on the newsgroup but no solution was
posted: http://thread.gmane.org/gmane.comp.lib.boost.user/52384/focus=52390
The case is easy reproducable:
struct Foo
{
//virtual ~Foo(){}
};
struct Foo2 : public Foo
{
template <class Archive>
void serialize(Archive& /*ar*/, const unsigned int /*version*/)
{
}
};
struct Bla
{
template <class Archive>
void serialize(Archive& ar, const unsigned int /*version*/)
{
ar & BOOST_SERIALIZATION_NVP(m_ptrFoo2);
}
boost::shared_ptr<Foo2> m_ptrFoo2;
};
void F()
{
std::stringstream sstr;
Bla bla;
boost::archive::xml_iarchive ia(sstr);
ia >> boost::serialization::make_nvp("bla", bla);
}
Can somebody help? Adding a virtual dtor does remove the problem (and is
exactly the difference with 'test_shared_ptr.cpp') but this is unwanted.
wkr
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