Boost C++ Libraries: Ticket #805: boost serialization operators & and << and >> https://svn.boost.org/trac10/ticket/805 <pre class="wiki">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 &lt;&lt; or &gt;&gt; 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&lt;x&gt;' with [ x=false ] \3rdparty\include\boost\archive\basic_text_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::save&lt;Archive,T&gt;(Archive &amp;,T &amp;)' 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&lt;Archive&gt;::save_override&lt;T&gt;(T &amp;,int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \samples\silvestre\main2.cpp(190) : see reference to function template instantiation 'Archive &amp;boost::archive::detail::interface_oarchive&lt;Archive&gt;::operator &lt;&lt;&lt;FlowEngine::A*&gt;(T &amp;)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] But if I only use the &amp; 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&lt;Archive&gt;(Archive &amp;,const unsigned int)' : cannot convert 'this' pointer from 'const FlowEngine::A' to 'FlowEngine::A &amp;' 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&lt;Archive,const T&gt;(Archive &amp;,T &amp;,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&lt;Archive,T&gt;::invoke(Archive &amp;,const T &amp;,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&lt;Archive,T&gt;' 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&lt;Archive,FlowEngine::A&gt;(Archive &amp;,T &amp;,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&lt;Archive&gt;(Archive &amp;,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&lt;Archive,T&gt;(Archive &amp;,T &amp;,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&lt;Archive,T&gt;(Archive &amp;,T &amp;,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&lt;Archive,T&gt;(Archive &amp;,T &amp;,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&lt;Archive,T&gt;::save_object_data(boost::archive::detail::basic_oarchive &amp;,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&lt;Archive,T&gt;' 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 &amp;boost::archive::detail::pointer_oserializer&lt;T,Archive&gt;::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&lt;T,Archive&gt;' 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 &amp;boost::archive::detail::instantiate_pointer_oserializer&lt;Archive,T&gt;(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&lt;Archive&gt;::register_type&lt;T&gt;(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&lt;Archive,TPtr&gt;::non_abstract&lt;T&gt;::register_type(Archive &amp;)' 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&lt;Archive,TPtr&gt;::non_abstract&lt;T&gt;' 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&lt;Archive,TPtr&gt;::register_type&lt;FlowEngine::A&gt;(Archive &amp;,T &amp;)' 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&lt;Archive,TPtr&gt;::invoke(Archive &amp;,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&lt;Archive,TPtr&gt;' 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&lt;Archive,const T&gt;(Archive &amp;,const T &amp;)' 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&lt;Archive&gt;::save_override&lt;T&gt;(T &amp;,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 &amp;boost::archive::detail::interface_oarchive&lt;Archive&gt;::operator &lt;&lt;&lt;const T&gt;(T &amp;)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] \samples\silvestre\main2.cpp(190) : see reference to function template instantiation 'Archive &amp;boost::archive::detail::interface_oarchive&lt;Archive&gt;::operator &amp;&lt;FlowEngine::A*&gt;(T &amp;)' 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 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/805 Trac 1.4.3 Robert Ramey Wed, 17 Jan 2007 19:13:37 GMT status changed https://svn.boost.org/trac10/ticket/805#comment:1 https://svn.boost.org/trac10/ticket/805#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket