26 Aug
2002
26 Aug
'02
3:19 p.m.
void set(const boost::shared_ptr<A>& ptr) { b.swap( boost::shared_static_cast<B>( ptr ) ); // L21 } Why not simply
b = boost::shared_static_cast<B>( ptr ); I want to swap the pointers inside for further use (for saving the old ptr contents and restoring for circumstances
If you actually want to swap b and ptr, then shouldn't ptr be declared non-const? Tanton