From: Robert Ramey (ramey_at_[hidden])
Date: 2005-06-23 11:07:07
Vladimir Prus wrote:
>> "all #includes from the boost/archive directory should preceed all
>> #includes from the serialization directory."
> This rule means that I can't include
> in my headers, and then in my cpp file first include my headers and
> then archive headers. And I do want to include my header first in
> .cpp, in order to detect any missing includes in the header itself.
I don't really understand this.
> No, even with the mandated order of includes, I still run into the
Send me a small example.
> 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.
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk