Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-24 02:03:21


Robert Ramey wrote:

>> How? Clearly, if I include base_object.hpp in a header, I cannot obey
>> the above rule. Ok leaving just:
>>
>> #include <boost/serialization/access.hpp>
>> #include <boost/serialization/split_member.hpp>
>> #include <boost/serialization/base_object.hpp>
>
> This is what I recommend. I envision that each class module describe its
> serialization independently of any particular archive. So I wouldn't
> expect
> any *archive headers to be found in any class module. If this is the
> case, the *archive.hpp first, *serialization.hpp second is very easy to
> implement. Note that this is a reflection of one of the fundamental
> principles of the serialization system - that serialization of classes
> should be defined independently of any particular archive.

I don't understand you. If A.hpp contains the above, and my .cpp files
contains

  #include "A.hpp"

  #include <boost/archive/text_oarchive.hpp>

Then the above rule is violated. And I do want to include my header first,
before anything at all.

>> in my header, and using the mandated includes order in .cpp file, I still
> get the same error.
>>
>> What should we do next?
>
> Send me the example. I would be happy to review it.

Please take a look at:

  http://zigzag.lvk.cs.msu.su/~ghost/serialization_problems/

The first example is for base_object problem. The second is for
STATIC_ASSERT.

Thanks,
Volodya


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