Boost.Serialization not building
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
It is even not compiling with base struct Foo alone. I probably miss the crucial point somewhere. The documentation is really hard to follow.
I could track it down to the differnce of the nested shared_ptr_helper::non_polymorphic struct versus shared_ptr_helper::polymorphic struct within boost::archive::detail namespace. This non_polymorphic struct uses the singleton and returns the shared_ptr wrapped type (thru the 'get_const_instance()' function), while the polymorphic variant adds an extra call to get the extended type info. So my guess is that it will never work, but ofc who am I to judge :)
Folks, I've filed the issue with details on that: https://svn.boost.org/trac/boost/ticket/3677 This is a serious regression that prevents updating, because the application that is known to work fails to build. Please, suggest a workaround. Alexander Churanov, maintainer of devel/boost-* on FreeBSD
Ramey did mention he fixed it in another trac item, but didn't mention which one. After browsing some time, I think he is referring to https://svn.boost.org/trac/boost/ticket/3638
ok problem is already detected in other mailing list: http://thread.gmane.org/gmane.comp.lib.boost.devel/196802
participants (2)
-
Alexander Churanov
-
gast128