shared_from_this() throws bad_weak_ptr if it's called in a derived destructor even if the object is heap allocated, does anyone know if this is intended? And if so, why?
What else could it do? if the dtor is running the refcount has reached zero... and, well, you know, the dtor is running.
If you created a shared_ptr to that object - what would happen when that new shared_ptr went out of scope? The refcount would reach zero (again) & the object would be double deleted.
What semantics were you expecting?