[Boost-bugs] [ boost-Support Requests-1630494 ] boost serialization operators & and << and >>

Support Requests item #1630494, was opened at 2007-01-08 11:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=207586&aid=1630494&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Miguel (gorogoro) Assigned to: Nobody/Anonymous (nobody) Summary: boost serialization operators & and << and >> Initial Comment: There is something wrong with my test examples of serialization using boost. Let's see: I have 3 classes to test this stuff. And my main problem is that I can't use the << or >> operator because I get this compile errors: \3rdparty\include\boost\archive\detail\oserializer.hpp(567) : error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>' with [ x=false ] \3rdparty\include\boost\archive\basic_text_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::save<Archive,T>(Archive &,T &)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \3rdparty\include\boost\archive\detail\interface_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::basic_text_oarchive<Archive>::save_override<T>(T &,int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \samples\silvestre\main2.cpp(190) : see reference to function template instantiation 'Archive &boost::archive::detail::interface_oarchive<Archive>::operator <<<FlowEngine::A*>(T &)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] But if I only use the & operator everithing works fine :S. And If I split the serialize function I get this errros: \3rdparty\include\boost\serialization\access.hpp(93) : error C2662: 'void FlowEngine::A::save<Archive>(Archive &,const unsigned int)' : cannot convert 'this' pointer from 'const FlowEngine::A' to 'FlowEngine::A &' with [ Archive=boost::archive::text_oarchive ] Conversion loses qualifiers \3rdparty\include\boost\serialization\split_member.hpp(43) : see reference to function template instantiation 'void boost::serialization::access::member_save<Archive,const T>(Archive &,T &,const unsigned int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\serialization\split_member.hpp(42) : while compiling class template member function 'void boost::serialization::detail::member_saver<Archive,T>::invoke(Archive &,const T &,const unsigned int)' with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\serialization\split_member.hpp(69) : see reference to class template instantiation 'boost::serialization::detail::member_saver<Archive,T>' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \samples\silvestre\main2.cpp(82) : see reference to function template instantiation 'void boost::serialization::split_member<Archive,FlowEngine::A>(Archive &,T &,const unsigned int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\serialization\access.hpp(109) : see reference to function template instantiation 'void FlowEngine::A::serialize<Archive>(Archive &,const unsigned int)' being compiled with [ Archive=boost::archive::text_oarchive ] \3rdparty\include\boost\serialization\serialization.hpp(81) : see reference to function template instantiation 'void boost::serialization::access::serialize<Archive,T>(Archive &,T &,const unsigned int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\serialization\serialization.hpp(140) : see reference to function template instantiation 'void boost::serialization::serialize<Archive,T>(Archive &,T &,const unsigned int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(152) : see reference to function template instantiation 'void boost::serialization::serialize_adl<Archive,T>(Archive &,T &,const unsigned int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(145) : while compiling class template member function 'void boost::archive::detail::oserializer<Archive,T>::save_object_data(boost::archive::detail::basic_oarchive &,const void *) const' with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(163) : see reference to class template instantiation 'boost::archive::detail::oserializer<Archive,T>' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(162) : while compiling class template member function 'const boost::archive::detail::basic_oserializer &boost::archive::detail::pointer_oserializer<T,Archive>::get_basic_serializer(void) const' with [ T=FlowEngine::A, Archive=boost::archive::text_oarchive ] \3rdparty\include\boost\archive\detail\oserializer.hpp(515) : see reference to class template instantiation 'boost::archive::detail::pointer_oserializer<T,Archive>' being compiled with [ T=FlowEngine::A, Archive=boost::archive::text_oarchive ] \3rdparty\include\boost\archive\detail\interface_oarchive.hpp(58) : see reference to function template instantiation 'const boost::archive::detail::basic_pointer_oserializer &boost::archive::detail::instantiate_pointer_oserializer<Archive,T>(Archive *,T *)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(344) : see reference to function template instantiation 'const boost::archive::detail::basic_pointer_oserializer *boost::archive::detail::interface_oarchive<Archive>::register_type<T>(const T *)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(343) : while compiling class template member function 'const boost::archive::detail::basic_pointer_oserializer *boost::archive::detail::save_pointer_type<Archive,TPtr>::non_abstract<T>::register_type(Archive &)' with [ Archive=boost::archive::text_oarchive, TPtr=FlowEngine::A *, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(360) : see reference to class template instantiation 'boost::archive::detail::save_pointer_type<Archive,TPtr>::non_abstract<T>' being compiled with [ Archive=boost::archive::text_oarchive, TPtr=FlowEngine::A *, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(460) : see reference to function template instantiation 'const boost::archive::detail::basic_pointer_oserializer *boost::archive::detail::save_pointer_type<Archive,TPtr>::register_type<FlowEngine::A>(Archive &,T &)' being compiled with [ Archive=boost::archive::text_oarchive, TPtr=FlowEngine::A *, T=FlowEngine::A ] \3rdparty\include\boost\archive\detail\oserializer.hpp(447) : while compiling class template member function 'void boost::archive::detail::save_pointer_type<Archive,TPtr>::invoke(Archive &,const TPtr)' with [ Archive=boost::archive::text_oarchive, TPtr=FlowEngine::A * ] \3rdparty\include\boost\archive\detail\oserializer.hpp(536) : see reference to class template instantiation 'boost::archive::detail::save_pointer_type<Archive,TPtr>' being compiled with [ Archive=boost::archive::text_oarchive, TPtr=FlowEngine::A * ] \3rdparty\include\boost\archive\basic_text_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::save<Archive,const T>(Archive &,const T &)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \3rdparty\include\boost\archive\detail\interface_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::basic_text_oarchive<Archive>::save_override<T>(T &,int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \3rdparty\include\boost\archive\detail\interface_oarchive.hpp(86) : see reference to function template instantiation 'Archive &boost::archive::detail::interface_oarchive<Archive>::operator <<<const T>(T &)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \samples\silvestre\main2.cpp(190) : see reference to function template instantiation 'Archive &boost::archive::detail::interface_oarchive<Archive>::operator &<FlowEngine::A*>(T &)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] For a better understand of the problem I'll send a file with the code and you can also read this topic: http://www.gamedev.net/community/forums/topic.asp?topic_id=431080 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=207586&aid=1630494&group_id=7586 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs
participants (1)
-
SourceForge.net