Krzysztof Czainski:
>2012/11/22 Olivier Austina <
olivier.austina@gmail.com>
>
>> Hello,
>> I am a newbie of boost and I want to use it. I would like to serialize a
>> list. The list is defined with the following data type:
>>
>> typedef struct person {
>> char *name;
>> char *first_name;
>> struct person *next;
>> } person;
>>
>> person *list_person;
>>
>
> I'd suggest reorganizing your struct into struct person { std::string
> first_name; } and useing std::list<person> list. Then serializing and > other operations would probably be trivial.
Shalom
Another option would be an intrusive list --
.
The serialization library in Boost doesn't provide support
for intrusive containers, but the C++ Middleware Writer --
has support for intrusive list and rbtree.
If you use std::list, the C++ Middleware Writer has
some advantages --
over the serialization library in Boost. (There are
serialization and deserialization tests with std::list
there.)