Boost logo

Boost Users :

Subject: Re: [Boost-users] 1.39 serialisation: buggy warning message forshared_ptr
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-02-24 13:14:58


The only reason to export a type is if one needs to
serialize it through a base class pointer. So, to me
the best way to suppress the warning would be
to not export the type.

Robert Ramey

Avi Bahra wrote:
> When I want to serialise a vector of shared ptrs to
> concrete types, there are no warnings on gcc/Linux.
> and program runs correctly.
> However when I compile on HP-UX, I get the following:
>
> .../boost_1_39_0/boost/serialization/export.hpp", line 137:
> warning #2414-D: delete of pointer to incomplete class
> BOOST_STATIC_WARNING(boost::is_polymorphic<T>::value);
> ....
>
> It appears that boost shared ptr serialisation has made the
> assumption that the pointer must be polymorphic!
> Is this assumption correct ?
> i.e are we allowed to serialize shared ptrs to concrete types ?
>
> To get rid of the message I simply add a virtual member
> function.
>
> It appears in this case that HPUX compiler is more accurate,
> and I don't understand why this same warning does not appear
> with gcc.
>
> Best regards,
> Ta,
> Avi
>
>
>
>
>
> _______________________________________________
> 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