Boost logo

Boost :

From: Bruno Martínez Aguerre (br1_at_[hidden])
Date: 2004-12-17 09:26:14


On Thu, 16 Dec 2004 23:52:45 +0100, JOAQUIN LOPEZ MU?Z <joaquin_at_[hidden]>
wrote:

>
>
> ----- Mensaje original -----
> De: Bruno Martínez Aguerre <br1_at_[hidden]>
> Fecha: Jueves, Diciembre 16, 2004 9:50 pm
> Asunto: [boost] Re: [multi_index] announce: added serialization support
>
>> Can serialization for iterator types be added?
>
> Ummm... yes, this can be done. It'd be trivial except
> that it interacts badly with Boost.MultiIndex
> safe mode. Let me think it over, I guess I can have
> something done after Xmas.
>
> Do you have the actual need to serialize iterators or
> is this more of an academic request? Have you tried the
> serialization capabilities in some compiler? Did you
> find any problem?

I haven't tried using multi_index nor it's serialization capabilities
yet. However, I do think there are practical uses of iterator
serialization.

For one, recently there was a conversation between you and Robert Ramey
about serialization of something like this:

container<SomeClass> v;
SomeClass* p; //point to an element of v

IIRC, this wasn't currently supported by the serialization library. An
iterator there instead of a pointer would be a workaround for this
situation.

Second, I believe it would be useful for freezing a computation. Say I'm
iterating over a multi_index, and I wan't to stop and remember where I
was. If I can serialize the iterator of the current position along with
the multi_index container, this can easily be achieved.

What do you think?

Bruno


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk