
23 Jan
2009
23 Jan
'09
4:25 p.m.
Daniel Lidström:
I have already found a workaround, but it is a little bit annoying:
struct Sub : public Base, public tr1::enable_shared_from_this<Sub> { void f() { BasePtr basePtr = tr1::dynamic_pointer_cast<Base>(shared_from_this()); } };
I would like to avoid explicit type casts like this.
You don't need the cast.
Of course. Sorry I didn't see the obvious this time. /Daniel