[C++-sig] cross-module shared_ptr downcast
Jon Anderson
janders at users.sourceforge.net
Thu Jun 26 17:23:52 CEST 2003
I have a Container that holds shared_ptr's to a Base class. I can
successfully add and retrieve shared_ptrs to a Derived class, properly
downcasted on retrieval, as along as the bindings for both the Base and
Derived class are defined in the same module. However, when I have the Base
class bindings defined in module A, and the Container and Derived class
bindings defined in module B, the down cast no longer happens. Each module
is a separate .so.
Should this work, or am I limited to having them all in the same module in
order to make the downcasts work?
Thanks,
Jon
More information about the Cplusplus-sig
mailing list