Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Boost STATIC_WARNING when serializingshared_ptr of a type
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-01-14 15:36:41


This a pending error - there is an open TRAK item on it - ignore the warning.

Robert Ramey
  "Daniel Roberts" <impulsionaudio_at_[hidden]> wrote in message news:14125aaf0901141115w670002c9h30644752aacb6ba2_at_mail.gmail.com...
  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 mailing list
  Boost-users_at_[hidden]
  http://lists.boost.org/mailman/listinfo.cgi/boost-users



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