std::unique_ptr is a smart pointer that retains sole ownership of an object through a pointer.
I want to pass a unique_ptr to a helper function, and I want to make sure that the helper …
c++ c++11 unique-ptrI am trying to use unique_ptr to manage my memory, and VS2013 seems to be giving me trouble when …
c++ visual-c++ visual-studio-2013 unique-ptr oglplusI've written a static factory method that returns a new Foobar object populated from another data object. I've recently been …
c++ smart-pointers unique-ptr ownership-semanticsI am confused with unique_ptr and rvalue move philosophy. Let's say we have two collections: std::vector<std::…
c++ c++11 auto-ptr unique-ptrI'm trying to use the C++0x unique_ptr class inside a map like so: // compile with `g++ main.cpp …
c++ gcc c++11 stl unique-ptrWhen passing objects into functions, do the same rules apply to smart pointers as to other objects that contain dynamic …
c++ c++11 parameter-passing smart-pointers unique-ptrTrying to compile the following code: #include <iostream> #include <memory> struct Foo { Foo() { std::cout <&…
c++ c++11 unique-ptr dev-c++Here is a simplification of what I'm seeing when I try to use unique_ptr for pimpl. I chose unique_…
c++ c++11 pimpl-idiom unique-ptrI've been making some objects using the pimpl idiom, but I'm not sure whether to use std::shared_ptr or …
c++ c++11 shared-ptr pimpl-idiom unique-ptrIs unique_ptr thread safe? Is it impossible for the code below to print same number twice? #include <memory&…
c++ multithreading c++11 thread-safety unique-ptr