Boost logo

Boost :

Subject: Re: [boost] [1.44] Beta progress?
From: Matthias Troyer (troyer_at_[hidden])
Date: 2010-07-28 15:23:57


On 28 Jul 2010, at 14:00, Robert Ramey wrote:

> Matthias Troyer wrote:
>
>> On 28 Jul 2010, at 11:50, Robert Ramey wrote:
>> All you need to do is document what a class deriving from common
>> archive has to implement. These are
>
>> - the save/load function for
>> - a well-defined set of primitive types with a well-defined interfaced
>
> OK - that's not too bad. I'll find a place to put it into the
> documentation.
> There's around 10 of them and they're all convertable to some
> type of C++ integer so it shouldn't be too hard.
>
> My list of requirements on these is
> convertible to some type of c++ integer
> having serialization trait "primitive"

If you do that you should specify which type it is - easiest probably with a typedef.

>
> Do you want to add default constructble as well? As I said
> I haven't needed it and think that needing this is likely an
> error - but I would add it if you think it's necessary.

The Sun compiler wants it for some reason, although that's a compiler bug.

>
>> - and save_binary/load_binary.
> I think this is already specified by the archive concept.

I think so too, but it might be good stating that this function needs to be implemented as well.

>
>>> But he also got
>>> surprised when I changed class_id_type from unsigned
>>> int to least_16_t which surprised me since I thought
>>> the latter was just a typedef and not a true class.
>
>> Actually not. The breaking was caused by another change you did at the same
>> time.
>
> Would adding the above information address this as well?

Yes. If you add a comment that one should derive from archive::detail::common_archive and not from archive::binary_archive

Matthias


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