c++ Programming Glossary: static_pointer_cast
Passing shared pointers as arguments http://stackoverflow.com/questions/10826541/passing-shared-pointers-as-arguments in case #2 though. Examples of such functions include std static_pointer_cast custom comparators or predicates. For example if you need to..
Downcasting shared_ptr<Base> to shared_ptr<Derived>? http://stackoverflow.com/questions/1358143/downcasting-shared-ptrbase-to-shared-ptrderived shared_polymorphic_downcast or dynamic_pointer_cast or static_pointer_cast for that matter I'm trying to initialize a shared pointer to.. new Base boost shared_ptr Derived derived derived boost static_pointer_cast Derived base derived boost dynamic_pointer_cast Derived base.. it but it serves to illustrate the difference nicely. The static_pointer_cast will just do it . This will result in an invalid pointer and..
questions regarding shared_from_this http://stackoverflow.com/questions/5232712/questions-regarding-shared-from-this derived from enable_shared_from_this . You could then use static_pointer_cast or dynamic_pointer_cast to cast the result of shared_from_this..
static_cast with boost::shared_ptr? http://stackoverflow.com/questions/624854/static-cast-with-boostshared-ptr ptr static cast share improve this question Use boost static_pointer_cast boost shared_ptr Base b new Base boost shared_ptr Derived d..
How to enable_shared_from_this of both parend and derived http://stackoverflow.com/questions/657155/how-to-enable-shared-from-this-of-both-parend-and-derived foo do_it n shared_ptr bar2 shared_from_this return boost static_pointer_cast bar2 foo shared_from_this public virtual function void get_callback..
|