|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-03-18 00:28:43
Any existing header order dependency would be news to me and I would be
interested in seeing it fixed.
Given that you've expended the effort to find the problem in a specific
case, do you have any suggestion about what change should be made?
Robert Ramey
Clif Houck wrote:
> Well, I figured out what the problem was after diagnosing a little
> bit further. Apparently you must include at least one archive header
> before the shared_ptr header for correct compilation to occur.
>
> This example:
>
> //This header must come BEFORE the shared_ptr headers
> #include <boost/archive/binary_oarchive.hpp>
>
> #include <boost/serialization/shared_ptr_132.hpp>
> #include <boost/serialization/shared_ptr.hpp>
>
> int main()
> {
> return 0;
> }
>
> Was distilled from a larger, but still simple test program I wrote to
> make sure that I was writing code correctly to de-serialize 1.32 era
> shared_ptrs. In that program I made the mistake of including the
> archive headers AFTER the shared_ptr headers.
>
> I was under the impression that the serialization library had
> dispensed with header-order dependencies. I guess this isn't the
> case? Perhaps I didn't read the documentation closely enough. In any
> case, order dependencies for headers is very counter-intuitive and
> I'm sure a lot of other users have/will run into this problem. Is
> there some way to break the dependency?
>
> Clif Houck
>
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk