18 Jul
2003
18 Jul
'03
9:50 p.m.
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