Boost logo

Boost Users :

From: John Reid (john.reid_at_[hidden])
Date: 2006-04-03 07:27:16


Hi,

I had some problems serializing/deserializing a multi_index container.
I've tried a work around of copying the container into a vector and
serializing/deserializing this (which works). Does anyone know the
conditions under which serialization of multi_index containers do not
work? My guess is my operator< may not satisfy the requirements although
it has stood up to all the testing I have been able to do so far.

I am using VS2005 with boost 1_33_1.

FYI I'm getting an archive exception from this code in ordered_index.hpp:
   void rearranger(node_type* position,node_type *x)
   {
     node_type* before;
     if(!position){
       before=position=lower_bound(key(x->value)).get_node();
       node_type::decrement(before);
     }
     else{
       before=position;
       node_type::increment(position);
     }
     if(position!=x){
       /* check the rearrangement is consistent */
       if(!in_place(x->value,position,Category())){
         throw_exception(
           archive::archive_exception(
             archive::archive_exception::other_exception));
       }

       ordered_index_node_impl::rebalance_for_erase(
         x->impl(),header()->parent(),header()->left(),header()->right());
       ordered_index_node_impl::restore(
         x->impl(),before->impl(),position->impl(),header()->impl());
     }
   }

Thanks,
John.


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