Russell Hind wrote:
Peter Dimov wrote:
class Child : public Base1, public Base2 {
No, you can't do that. Multiple enable_shared_from_this<> bases are not supported, there is no way to enumerate them.
Don't know if I've missed part of this thread, but couldn't you use virtual inheritance here?
That could be an idea, but I've never used it in practice. Virtual inheritance has always been solely an academic thing. That's probably going to get pretty complicated, and one I'd think would have to seriously question a design that invovled virtual inheritance. I might try it out just out of curiousity to see if I can get it to work. Maybe if it works it might be useful if I really want to do it. I've also always have wondered how virtual inheritance works under the hood, it might be a good time to look at that. Jason