shared-ptr
null shared_ptr can access to member functions
I can access member functions of a null shared_ptr object : #include <memory> #include <iostream>[详细]
2023-02-22 05:37 分类:问答shared_ptr as class member corrupts stack?
I have a shared_ptr开发者_如何学运维 in the class like this class App { public: App(){}; ~App(){};[详细]
2023-02-21 17:45 分类:问答Using C++ std::equal on a container of shared_ptr
I have a container of std::shared_ptr.I want to compare two containers using std::equal.The class A has operator== defined.I want equal to compare if each element is equivalent using its operator==, n[详细]
2023-02-20 22:29 分类:问答Using STL algorithms with shared_ptr, function objects
I have a set of shared_ptr, and I\'d like to use remove_copy_if with a custom function object for the predicate.I didn\'t know the \"best\" way to do it.Right now, I\'ve got this working:[详细]
2023-02-19 15:44 分类:问答Should I convert shared_ptr to weak_ptr when passed to a method?
there are already a couple of questions regarding this topic, but I am still not sure what to do: Our codebase uses shared_ptr at many places. I have to admit that we did not define ownership clearly[详细]
2023-02-19 11:23 分类:问答need single header file for boost::shared_ptr
Boost::shared_ptr is really great. But using it you need lots of header file. Is thare any single header file available that will provide shared_ptr function开发者_运维百科ality?[详细]
2023-02-19 04:34 分类:问答Issue with using shared_ptr with custom equality operator and STL
There seems to be an issue when using shared pointers together with a custom equality operator and an std::list.[详细]
2023-02-18 01:24 分类:问答boost shared_ptr: difference between operator= and reset?
Are there any differences between the two pieces of code below? Is any of them preferable to the other?[详细]
2023-02-17 10:50 分类:问答C++ Templates - How to use across multiple MTU's
class A : boost::noncopyable { int type; A(int type, enum e) : type(type) { /* ... */ } } typedef boost::shared_ptr<A> A_ptr;[详细]
2023-02-16 20:52 分类:问答throwing a boost::shared_ptr< customException>
is there any pitfall of the f开发者_如何学Pythonollowing; if (someCondition) throw boost::shared_ptr<SomeException>( new SomeException( \"foo!\" ) );[详细]
2023-02-15 13:20 分类:问答