Adding indexes + serialization for MultiIndex
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:
// version 1:
BOOST_CLASS_VERSION(Thingy,1);
typedef multi_index_container
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
myset1_t; typedef multi_index_container 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
participants (2)
-
Joaquín Mª López Muñoz
-
Sohail Somani