Top "Shared-ptr" questions

Reference counted smart pointer class implementing shared ownership

Conversion from boost::shared_ptr to std::shared_ptr?

I got a library that internally uses Boost's version of shared_ptr and exposes only those. For my application, I'd …

c++ boost shared-ptr std
Why isn't there a std::shared_ptr<T[]> specialisation?

The standard provides a template specialization of std::unique_ptr which correctly calls the delete[] from its destructor: void func() { …

c++ c++11 shared-ptr
shared_ptr and cyclic references

I was trying with the cyclic references for boost::shared_ptr, and devised following sample: class A{ // Trivial class public: …

c++ shared-ptr weak-ptr cyclic-reference
Double inheritance of enable_shared_from_this

I have an object (Z) which derives from two other objects (A and B). A and B both derive from …

c++ shared-ptr multiple-inheritance enable-shared-from-this
up-casting std::shared_ptr using std::dynamic_pointer_cast

I'm starting to work with smart pointers in C++0X/11 and I've run into a peculiar situation. I want to …

c++ c++11 shared-ptr upcasting
Shared void pointers. Why does this work?

To solve a very peculiar problem in my application I need a shared-pointer to allocated data, but to the outside …

c++ visual-c++ c++11 shared-ptr smart-pointers
Boost async_* functions and shared_ptr's

I frequently see this pattern in code, binding shared_from_this as the first parameter to a member function and …

c++ boost boost-asio shared-ptr
Is there a weak_ptr equivalent to shared_from_this?

I have a class which I know will always be owned by a std::shared_ptr. However passing shared_ptr …

c++ pointers c++14 shared-ptr weak-ptr
C++/CLI Wrapping a Function that Returns a std::shared_ptr

I'm currently wrapping a C++ class with C++/CLI for .NET interoperability following the standard process of holding a native …

.net c++-cli wrapper shared-ptr mixed-mode
shared_ptr in std::tr1

I am working on a platform with a gcc compiler however boost cannot compile on it. I am wondering what …

c++ gcc boost shared-ptr tr1