Ok!
I'm starting to freaking out, because I just can't figure it out some
compilation errors when trying to use the boost serialization library.
I just can't manage what I'm doing wrong.
Ok, I think that the best way to translate my problem is to post the
code and the changes I'm trying to do:
So ans as you can see on the attached file:
My project and all of my classes are inside a namespace the FlowEngine.
I have 3 classes: A; B and C to test the boost serialization.
As it is now it compiles and runs good.
But I take the comments of class A to split member serialization, just
doing that I get this errors when compiling:
\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 &,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::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' 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 &,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 &,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 &,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 &,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::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' 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::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' 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 *)' 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::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::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::register_typeFlowEngine::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::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' 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 &)' 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 *
]
And if I just change the operator & with the operators << or >> on the
silv task class I get this compilation errors:
3rdparty\include\boost\archive\detail\oserializer.hpp(567) : error
C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'
with
[
x=false
]
d:\flow project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::save(Archive &,T &)' being compiled
with
[
Archive=boost::archive::text_oarchive,
T=FlowEngine::A *
]
d:\flow project\flowengine\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 *
]
d:\flow project\flowengine\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 *
]
Anyone???
Pleaaaaseeeee???????????
--
Miguel Silvestre