Hmmm - I think the map size is already saved to disk.
If you just
copy the current templated implementation for map
loading and
instantiate a specialized version for your case, I
would think
that would handle the job.
Robert Ramey
-------------------------------------------------------
I am sorry. However, I do not quite understand.
Let me more specific to my case.
I have a data structure:
map
Cheok Yan Cheng wrote:
Hmmm - I think the map size is already saved to disk. If you just copy the current templated implementation for map loading and instantiate a specialized version for your case, I would think that would handle the job.
Robert Ramey
------------------------------------------------------- I am sorry. However, I do not quite understand.
Let me more specific to my case.
I have a data structure:
map
fiducialPairSearchRegionMap; Both FiducialPair and RectPair can be serialized with boost no problem.
I try to serialize the whole map by
void save(Archive & ar, const unsigned int version) const { ar & fiducialPairSearchRegionMap; }
void load(Archive & ar, const unsigned int version) { ar & fiducialPairSearchRegionMap; }
I would get the following error:
C:\Boost\include\boost-1_33_1\boost\archive\detail\iserializer.hpp(487): error C2440: 'reinterpret_cast' : cannot convert from 'typef *__w64 ' to 'void ** '
I wouldn't know what to do about the above. I don't even know what "typef" is. What compiler is this?
C:\Boost\include\boost-1_33_1\boost\archive\detail\iserializer.hpp(493): error C2664: 'T *boost::archive::detail::load_pointer_type
::pointer_tweak<const FiducialPair>(const boost::serialization::extended_type_info &,void *,T &)' : cannot convert parameter 2 from 'typef ' to 'void *' with [ T=const FiducialPair, Archive=boost::archive::text_iarchive, Tptr=typef ] Conversion loses qualifiers May I know how I can apply ur suggested solution to my case?
I would hope that the following blunt instrument might work: void load(Archive & ar, const unsigned int version) { ar >> reinterpret_cast
participants (2)
-
Cheok Yan Cheng
-
Robert Ramey