Shared pointers cannot simply be cast using the standard bf(C++) style casts. Consider the following two classes: verb( struct Base {}; struct Derived: public Base {}; ) A tt(shared_ptr) can easily be defined. Since a tt(Derived) is also a tt(Base) a pointer to a tt(Derived) can be cast to a pointer to a tt(Base) using a static cast: verb( Derived d; static_cast(&d); ) However, a plain tt(static_cast) cannot be used when initializing a shared pointer to a tt(Base) using the object pointer of a shared pointer to a tt(Derived) object. I.e., the following statement will eventually result in an attempt to delete the dynamically allocated tt(Base) object twice: verb( shared_ptr sd(new Derived); shared_ptr sb(static_cast(sd.get())); ) Since tt(sd) and tt(sb) point at the same object tt(~Base) will be called for the same object when tt(sb) goes out of scope and when tt(sd) goes out of scope, resulting in premature termination of the program due to a emi(double free) error. These errors can be prevented using casts that were specifically designed for being used with tt(shared_ptrs). These casts use specialized constructors that create a tt(shared_ptr) pointing to memory but shares ownership (i.e., a reference count) with an existing tt(shared_ptr). These special casts are: itemization( ithtq(static_pointer_cast) (std::static_pointer_cast(std::shared_ptr ptr)) (A tt(shared_ptr) to a tt(Base) class object is returned. The returned tt(shared_ptr) refers to the base class portion of the tt(Derived) class to which the tt(shared_ptr ptr) refers. Example: verb( shared_ptr dp(new Derived()); shared_ptr bp = static_pointer_cast(dp); ) ) ithtq(const_pointer_cast) (std::const_pointer_cast(std::shared_ptr ptr)) (A tt(shared_ptr) to a tt(Class) class object is returned. The returned tt(shared_ptr) refers to a non-const tt(Class) object whereas the tt(ptr) argument refers to a tt(Class const) object. Example: verb( shared_ptr cp(new Derived()); shared_ptr ncp = const_pointer_cast(cp); ) ) ithtq(dynamic_pointer_cast) (std::dynamic_pointer_cast(std::shared_ptr ptr)) (A tt(shared_ptr) to a tt(Derived) class object is returned. The tt(Base) class must have at least one virtual member function, and the class tt(Derived), inheriting from tt(Base) may have overridden tt(Base)'s virtual member(s). The returned tt(shared_ptr) refers to a tt(Derived) class object if the dynamic cast from tt(Base *) to tt(Derived *) succeeded. If the dynamic cast did not succeed the tt(shared_ptr)'s tt(get) member returns 0. Example (assume tt(Derived) and tt(Derived2) were derived from tt(Base)): verb( shared_ptr bp(new Derived()); cout << dynamic_pointer_cast(bp).get() << ' ' << dynamic_pointer_cast(bp).get() << '\n'; ) The first tt(get) returns a non-0 pointer value, the second tt(get) returns 0. ) )