Am 05.11.2018 um 07:11 schrieb Dr. Sören Textor via Boost-users:
Hello We have a little problem with the boost serialization. It's seems to have problem with the final keyword (at least in boost v1.55). Is there any workaround for the example oder got it fixed already in the newest boost version? class Test final { public: Test() {} Test(time_t t1) :m_t(t1) {}
protected: friend class boost::serialization::access; template<class Archive> void serialize(Archive &ar,const unsigned int version ) { ar &m_t; }
time_t m_t = 12; };
int main(int argc ,char**argv ){ Test t1(45); std::stringstream ofs; boost::archive::binary_oarchive oa(ofs ); oa &t1; }
--> compile error: is_polymorphic.hpp(46) : error C3246: 'boost::detail::is_polymorphic_imp1<T>::d2' : cannot inherit from 'Test' as it has been declared as 'final' remarks: - the original class is a non polymorphic POD class that is declared a final. Like in th eexample! Best regards SirAnn
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users -- Dr.-Ing. Sören Textor Softwareentwicklung
phone | +49 6221 31698 225 fax | +49 6221 31698 399 email | s.textor@ditec-gmbh.de mailto:s.textor@ditec-gmbh.de web | http://www.ditec-gmbh.de DiTEC Dr. Siegfried Kahlich & Dierk Langer GmbH Im Breitspiel 19 | 69126 Heidelberg | Germany Handelsregister | Mannheim | HRB 341223 Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe, sowie Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, insbesondere für den Fall der Schutzrechtsanmeldung. This document has to be treated confidentially. Its contents are not to be passed on, duplicated, exploited or disclosed without our express permission. All rights reserved, especially the right to apply for protective rights.