I\'m using boost::scoped_array in a container that I want to make copy-on-write but I fear that scoped_array won\'t work. Which boost::smart_ptr conta开发者_运维技巧iner is closest to cow-safe scoped
For boost::weak_ptr the 开发者_如何学Coperator< is defined, so that it can be used in associative containers.
Boost smart pointers can be used with polymorphism, but how do you cast the subclass back to the pointer?
Can boost::smart_ptr such as scoped_ptr and s开发者_JS百科hared_ptr be used in polymorphism? class SomeClass
I have a large body of C++ code that I\'ve wrapped with SWIG and am calling it from Java.The C++ code makes liberal use of boost smart pointers.
I simply want a class that does this: class cleanup : boost::noncopyable { public: typedef boost::function0<void> function;
I have a problem using a shared_ptr of a base class, I can\'t seem to be able to call the derived class\'s methods when dereferencing it. I believe code will be more verbose than me:
How would someone do that? for example: Client* client = it->second; where it->second is a boost::shared_ptr to Client
i have a shared_ptr and a weak_ptr typedef boost::weak_ptr<classname> classnamePtr; typedef boost::shared_ptr<x> xPtr;
I have 2 threads t开发者_开发知识库hat access this one object. Thread A: updates a boost hared_ptr member