std::unique_ptr is a smart pointer that retains sole ownership of an object through a pointer.
I have a question about std::unique_ptr and std::shared_ptr. I know there are loads of questions about …
c++ c++11 shared-ptr smart-pointers unique-ptrPossible Duplicate: Returning unique_ptr from functions 20.7.1.2 [unique.ptr.single] defines copy constructor like this : // disable copy from lvalue unique_…
c++ g++ c++11 unique-ptrI am C++11-ing some code. I have class X { /* */ }; class A { std::vector<X*> va_x; }; class …
c++ c++11 unique-ptr ownershipI'm trying to figure out how/if I can use unique_ptr in a queue. // create queue std::queue<…
c++ c++11 unique-ptrThe 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-ptrWhat is the proper way of transferring ownership of a std::vector<unique_ptr<int> > to …
c++ c++11 stdvector unique-ptr ownershipI'm trying to use std::make_unique to instanciate a class whose constructor is to receive an std::initializer_list. …
c++ unique-ptr c++14 initializer-listIn C++11, you can use a shared_ptr<> to establish an ownership relation with an object or variable …
c++ c++11 unique-ptrI am Pimpling off the class STFT. Compiles just fine with this in the header: class STFT; // pimpl off to …
c++ c++11 unique-ptr pimpl-idiomSwapping two unique_ptrs is not guaranteed to be threadsafe. std::unique_ptr<T> a, b; std::swap(…
c++ c++11 unique-ptr lock-free atomic-swap