Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-05-25 18:47:03


boost/serialization/utility.hpp since pair is in <utility>

Christian Henning wrote:
> Hi Robert, I would be interested in doing that. Here is what I would
> like to achieve:
>
> typedef tuple< string, string, string > Key;
> typedef map< Key, int > MyMap;
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> MyMap aMap;
>
> {
> const MyMap& caMap = aMap;
> ofstream ofs( "Settings.txt" );
> boost::archive::text_oarchive oa( ofs );
>
> oa & caMap;
> }
>
>
> return 0;
> }
>
> This code fails because no serialize function is defined for the Key
> type.
>
> Can you point me to the code section that does the serialization of
> std::pair.
>
> Thanks,
> Christian


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