
10 Aug
2009
10 Aug
'09
11 a.m.
Hello Igor,
Why not: boost::static_pointer_cast<B>(shared_from_this());
Yes, inside B (as in the example), static_pointer_cast is the right choice. The same rules apply as for the corresponding C++ casts, so when downcasting, shared_pointer_cast should be used instead. Cheers, Bjorn Karlsson www.skeletonsoftware.net