Boost logo

Boost Users :

From: Jason Winnebeck (yg-boost-users_at_[hidden])
Date: 2003-07-18 16:50:28


I tried using enable_shared_from_this with virtual inheritance, just to
see if it would work. I couldn't get it to work. The first barrier is
that enable_shared_from_this is a templated class, and from what I
understand is that two template instantiations of a class are two
entirely different classes, so I didn't even try to use virtual on that.

Instead I tried to make the SharedThis class non-templated, and
virtually inherit from that. However it didn't work, because of pointer
casting issues. I'm not sure if this is what caused my errors, but I
heard that you can't downcast from a virtual base class * to a concrete
class without dynamic_cast.

Jason


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