Opened 16 years ago
Closed 16 years ago
#805 closed Support Requests (Remind)
boost serialization operators & and << and >>
Reported by: | gorogoro | Owned by: | Robert Ramey |
---|---|---|---|
Milestone: | Component: | None | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
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
Note:
See TracTickets
for help on using tickets.