I\'m working on a section of code that has many possible failure points which cause it to exit the function early.The libraries I\'m interacting with r开发者_StackOverflowequire that C-style arrays be
If I use SWIG to wrap this C++ function: boost::shared_ptr<Client> Client::create() { return boost::shared_ptr<Client>(new Client());
Does somebody have any idead on how to pass boost::shared_ptr - by value or by reference. On my platform (32bit) sizeof(shared_ptr) equals 8 bytes and it looks like I should pass them by reference, b
I have two classes with a parent-child relationship (customer&order directory&file etc) I have
I have some shared pointer shared_ptr<T> pointer1(new T(1));. Now, in some other part of code I have an explicit copy of pointer2 (guess it would be stored in a std::map or some other container)
GCC 4.1 uses the开发者_运维知识库 <tr1/memory> header and GCC 4.3 uses <memory> header, I need a portable way to use shared_ptr with GCC 4.3.2 and with GCC 4.2.1, is there any way to do th
In C++ I\'m using boost::shared_ptr and boost::weak_ptr to automatically delete objects that are no longer needed. I know these work with reference counting.
I was looking into how std::tr1::shared_ptr<>开发者_如何学运维 provides the ability to cast to bool.I\'ve got caught out in the past when trying to create a smart pointer that can be casted to b
I use boost shared_ptr to wrap a pointer. However I can only get the correct value in test_shared_ptr(), while in main(), I get the wrong value.
I have a std::vector< tr1::shared_ptr<mapObject> > that I\'m trying build from data contained in a compressed file.Here\'s the function I\'m attempting to do that with: