Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-01-12 11:21:31

Vladimir Prus wrote

>Robert Ramey wrote:

>> The intention was that it be used for:
>> struct A
>> {
>> int* content;
>> int size;
>> template<class A>
>> void serialize(A& a, unsigned version)
>> {
>> a & size;
>> a & make_binary_object(content, size*sizeof(int));
>> }
>> };

>At least, the docs do not document this intention. I also think that this
>implementation will crash at runtime, since 'serialize' is not allocating
>memory for 'content'. Looking at binary_object.hpp, I see the following:

This is a question of motivation, intent and utility.

a) motivation - I needed a method for save/loading raw bnary data.
the save_binary/load_binary fill this need but I found I had two
annoying features.
1) The above would have to use split
2) There was no way to specify an nvp wrapper.

I will make this clear in the documents

Robert Ramey

Boost list run by bdawes at, gregod at, cpdaniel at, john at