Boost logo

Boost Users :

Subject: Re: [Boost-users] 1.39 serialisation: buggy warning message for shared_ptr
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-02-26 22:08:15


On Wed, Feb 24, 2010 at 10:55 AM, Avi Bahra <avibahra_at_[hidden]> 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.

For note to everyone in this thread, I had (and reported a few months
back) the *exact* same problem, fixed by adding a single unused
virtual function in the concrete class, on Visual Studio 8.


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