Reference counted smart pointer class implementing shared ownership
The question really fits in the title: I am curious to know what is the technical reason for this difference, …
c++ shared-ptr smart-pointers unique-ptrI want to compare two std::weak_ptr's or one std::weak_ptr and one std::shared_ptr for equality. …
c++ c++11 shared-ptr weak-ptrCan't find much on that for C++11 but only on boost. Consider the following class: class State { std::shared_ptr&…
c++11 shared-ptr deep-copyWhat are some ways you can shoot yourself in the foot when using boost::shared_ptr? In other words, what …
c++ boost pointers shared-ptrConsider: #include <cstdlib> #include <memory> #include <string> #include <vector> #include <algorithm&…
c++ c++11 shared-ptr rvalue-referenceHow do shared pointers know how many pointers point to that object? (shared_ptr, in this case)
c++ c++11 shared-ptrAs illustrated in the code here, the size of the object returned from make_shared is two pointers. However, why …
c++ c++11 shared-ptrHow can I access target of a std::tr1::shared_ptr in GDB. This doesn't work: (gdb) p sharedPtr->…
c++ gdb shared-ptr tr1I want to ask you for your best practices regarding constructors in C++. I am not quite sure what I …
c++ oop constructor shared-ptrWhen initializing a shared_ptr member variable: // .h class Customer { public: Customer(); private: std::shared_ptr<OtherClass> something_; } // .…
c++ c++11 shared-ptr initializer make-shared