Note that the tutorial programs do use BOOST_IS_ABSTRACT so I've always
assumed that
it functions as advertised. Since the demo doesn't use BOOST_EXPORT, I
suspect that
that there is some sort of problem related to instantiation of abstract base
class code
for exported types. I'lll look into it.
Robert Ramey
"RIVASSEAU Jean Noel" wrote in message
news:87F60F7FA02FF749AFB02BD9FCAA6B04DE1BE3@naserv31.nanterre.oberthurcs.com...
I quote the Boost serialization docs:
When serializing an object through a pointer to its base class and that base
class is abstract (i.e. has at least one virtual function assigned a value
of 0), A compile error will be emitted. This is addressable in one over
several ways:
remove the =0 in the base classes so that the base class is no longer
abstract.
implement is_abstract for your compiler. (code written according to the C++
standard is included with this library. But it is known to fail on several
compilers.
If the compiler suports "is_abstract" type trait - use that.
Otherwise assume a class is NOT abstract
unless BOOST_IS_ABSTRACT has been set for the class.
use the macro BOOST_IS_ABSTRACT(my_class) to indicate that the class is an
abstract base class. This will cause the compiler to avoid generating code
that causes this error.
I still do not understand part 2 of this advice, Robert. Could you explain?
Jean-Noël
Ps: as already mentioned, part 3 does not change anything for me, and I'd
like to avoid the solution of part 1 since I do want the base class to be
abstract.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users