|
Boost Users : |
Subject: [Boost-users] [serialization] Boost STATIC_WARNING when serializing shared_ptr of a type
From: Daniel Roberts (impulsionaudio_at_[hidden])
Date: 2009-01-14 14:15:57
I am trying to serialize a std::vector< boost::shared_ptr<SomeType> > but I
am getting a boost STATIC_WARNING in get_derived_extended_type_info, when
compiling the cpp file of the class that owns the vector. Here are the first
few lines of the warning:
1>c:\program files
(x86)\boost\boost_1_36_0\boost\serialization\extended_type_info_typeid.hpp(88)
: warning C4099: 'boost::static_warning_impl<false>::STATIC_WARNING' : type
name first seen using 'struct' now seen using 'class'
1> c:\program files
(x86)\boost\boost_1_36_0\boost\static_warning.hpp(110) : see declaration of
'boost::static_warning_impl<false>::STATIC_WARNING'
1> c:\program files
(x86)\boost\boost_1_36_0\boost\serialization\extended_type_info_typeid.hpp(85)
: while compiling class template member function 'const
boost::serialization::extended_type_info
*boost::serialization::extended_type_info_typeid<T>::get_derived_extended_type_info(const
T &) const'
1> with
1> [
1> T=SomeNamespace::SomeType
1> ]
If I create a std::vector<SomeType*>, then the warning goes away. I am
including the serialization headers for std::vector and boost::shared_ptr.
SomeType itself serializes a std::vector<boost::shared_ptr<SomeOtherType> >,
where SomeOtherType IS polymorphic, and I get NO warnings for that one.
The warning, to me, suggests that the compiler thinks that SomeType is
polymorphic. Is the compiler really referring to SomeOtherType? Any
assistance would be appreciated.
Thanks
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