|
Boost Users : |
Subject: [Boost-users] 1.39 serialisation: buggy warning message for shared_ptr
From: Avi Bahra (avibahra_at_[hidden])
Date: 2010-02-24 12:55:58
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 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