
"Robert Ramey" <ramey@rrsd.com> wrote in message news:gfj7f6$pmo$1@ger.gmane.org...
This case is descibed in the rationale section of the documentation.
I've had a good read of that, but I don't see the association. The rationale discusses object tracking; the code, as I see it, is not conflicting with that. This is simply compiling the reading code of a *non-polymorphic* type by shared_ptr. For example, if I change X to have a virtual destructor, then the warnings go away, i.e.: struct X { template <typename T> void serialize(T &ar, const unsigned int version) {} virtual ~X() {} };
Disregard/disable at your own risk. I don't recommend it. I recommend
Agreed.
changing your code to avoid situation which avoids warnings.
But in this case the code appears to be correct; the warnings, emitted from boost::serialization, should not be triggered. *The code has also been compiled on gcc 4.3.2 (with -Wall and -W) and does not generate any equivalent warnings.* On MSVC7.1: [...]\boost_1_37_0\boost\serialization\extended_type_info_typeid.hpp(88) : warning C4099: 'boost::serialization::static_warning_impl<false>::STATIC_WARNING' : type name first seen using 'struct' now seen using 'class' and on..