[serialization] problem with free funciton splitting
Hi, i have a code like this:
//LightSetup
template<class Archive> void save(Archive &a, const Mrl::LightSetup&
LightSetup, unsigned int version)
{
unsigned int Count=LightSetup.NumLights();
a & serialization::make_nvp("Count", Count);
for(unsigned int i=0; i
Well, I forgot to put the save/load functions into the boost::serialization namespace - now it works. Am 08.10.2011 13:06, schrieb Jonathan:
Hi, i have a code like this:
//LightSetup template<class Archive> void save(Archive &a, const Mrl::LightSetup& LightSetup, unsigned int version) { unsigned int Count=LightSetup.NumLights(); a & serialization::make_nvp("Count", Count);
for(unsigned int i=0; i
template<class Archive> void load(Archive &a, Mrl::LightSetup& LightSetup, unsigned int version) { unsigned int Count; a & serialization::make_nvp("Count", Count);
LightSetup=Mrl::LightSetup();//clear everything
for(unsigned int i=0; i
namespace boost { namespace serialization { template<class Archive> inline void serialize( Archive & ar, Mrl::LightSetup & t, const unsigned int file_version ){ split_free(ar, t, file_version); } }}
//BOOST_SERIALIZATION_SPLIT_FREE(Mrl::LightSetup)
(I tried both version, the makro and the serialize implementations, both give me the same error).
The compiler says: boost\boost/serialization/split_free.hpp(45): error C2664: 'boost::serialization::save': Konvertierung des Parameters 2 von 'const Mrl::LightSetup' in 'const boost_132::detail::shared_count &' nicht möglich
(converting parameter 2 not possible).
I have no idea what this shared_count is, so I don't know, what do do.
King regards
Jonathan Klein
participants (1)
-
Jonathan