Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-01-26 11:45:47


>>>But it's unfortunate to get assert like above -- newbie will immediately
>>>decide it's a bug in serialization library. OTOH, requiring that all
>>>archive headers are included before BOOST_CLASS_EXPORT is probably
>>>overkill.
>>
>> It would be worse than overkill - it would mean that code gets
>> instanticated
>> for all archives whether or not they are used. Code bloat. This way I
>> managed to get the right code and only the right code instantiated.

>I would very much prefer if I get an exception in this case, saying that
>"class is not exported to this archive". I somehow suspect that if you
>fix the bug where BOOST_CLASS_EXPORT confuses different archive types,
>such an exception would be trivial to add.

I much prefer detecting an error at compile time to run-time. There is a
comment at the point were the STATIC_ASSERT is invoked explaining
the issue. Compilers flag this code and hopefully the user is then
directed to this comment. Maybe changing the wording on this comment
would help.

Robert Ramey


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