std::unique_ptr is a smart pointer that retains sole ownership of an object through a pointer.
According to N3290, std::unique_ptr accepts a deleter argument in its constructor. However, I can't get that to work …
c++ c++11 unique-ptr delete-operatorA.hpp: class A { private: std::unique_ptr<std::ifstream> file; public: A(std::string filename); }; A.cpp: …
c++ smart-pointers ifstream unique-ptrIs there some equivalent class for C++1x's std::unique_ptr in the boost libraries? The behavior I'm looking for …
c++ boost c++11 unique-ptrDoesn't std::unique_ptr::get defeat the purpose of having a unique_ptr in the first place? I would have …
c++ c++11 pointers unique-ptrI am creating a class which interops with some Windows API code, now one of the pointers I have to …
c++ c++11 unique-ptrI have found it useful to use forward declaration of classes in combination with std::unique_ptr as in the …
c++ destructor forward-declaration unique-ptrAs it was the case in Boost, C++11 provides some functions for casting shared_ptr: std::static_pointer_cast std::…
c++ casting c++11 smart-pointers unique-ptrI have tried the following: std::function<void ()> getAction(std::unique_ptr<MyClass> &&psomething){ //…
c++ lambda c++11 unique-ptrI have a class hierarchy as follows: class BaseSession : public boost::enable_shared_from_this<BaseSession> class DerivedSessionA : …
c++ boost smart-pointers unique-ptr dynamic-castI'm trying to "modernize" some existing code. I have a class which currently has a member variable "Device* device_". It …
c++ smart-pointers unique-ptr