Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-10-03 05:01:34


Robert Ramey wrote:
> Hmmm - but why is it a mistake?

Well it's harmless, but basically the auto-link header *cannot* be include
guarded because it really does have to be included multiple times, albeit
normally for different libraries. So if you include it multiple times for
the same lib, you will - if you have diagnostic messages turned on - get two
messages rather than one. But that's it, other than that it's harmless. To
prevent the multiple diagnostics just add your own include
serialisation-specific guard around it:

#ifndef BOOST_SERIALISATION_AUTO_LINKED
#define BOOST_SERIALISATION_AUTO_LINKED
// auto line setup goes here

#endif

and repeat in all the places where you need it.

Or factor out into a separate header of course.

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net