Boost logo

Boost Users :

From: Cheok Yan Cheng (yccheok_at_[hidden])
Date: 2006-08-01 05:59:29


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<const FiducialPair *, vector<RectPair> >
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 ** '
C:\Boost\include\boost-1_33_1\boost\archive\detail\iserializer.hpp(493):
error C2664: 'T
*boost::archive::detail::load_pointer_type<Archive,Tptr>::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?

Thank you.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net