Boost logo

Boost Users :

Subject: Re: [Boost-users] Adding indexes + serialization for MultiIndex
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2013-02-28 02:09:06


El 27/02/2013 18:52, Sohail Somani escribió:
> I haven't actually happened upon this problem yet but I just want to
> know if I know how to deal with it for the future.
>
> My question is: how does the serialization work (or not work) if we
> add or remove indexes from the type?
>
> My suspicion is that one would have to do something like this:
>
> [...]
>
> typedef multi_index_container<thing,indexes> myset1_t;
> typedef multi_index_container<thing,indexes2> myset2_t;
>
> [...]
>
> Would this be OK, errors in syntax aside?

Yes, this would be the way to handle the situation. From the point of
view of serialization, myset1_t and myset2_t
are different, unrelated types: you just can't save a myset1_t out and
magically load a myset2_t back in.

Best,

Joaquín M López Muñoz
Telefónica Digital

________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx


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