I am trying to implement a very clean Command Pattern in a library. I have the following structure right now (a few parts are still being finished up):
In cases where constructor dependency injection is required, what are the considerations for using injection by re开发者_Go百科ference vs. using boost::shared_ptr?
Recently i thought of a cunning plan(tm :P)) I have to update settings structure in my program(lets say every 15 seconds). Settings structure is used by multiple functions and every of those function
I have some logic where I am using std::shared_ptrs to objects in an inheritance hierarchy. At one point I need to handle these objects depending on their real type, so I am using a double dispatch (i
When trying to use an auto_ptr with a type that was declared with forward-declaration, like this: class A;
This question already has answers here: Where is shared_ptr? 开发者_运维技巧 (4 answers) Closed 9 years ago.
In this question I asked \"pimpl: shared_ptr or unique_ptr\" I\'ve been convinced that the proper usage of the pimpl idiom is to use a unique_ptr, not a shared_ptr. It should act to the user as if the
I\'m using reset() as a default value for my shared_pointer (equivalent to a NULL). But how do I check if开发者_如何学Python the shared_pointer is NULL?
I know this kind of question has been asked to death but I would like to know if there is anyway to do what I stated in the question without using Boost library pointers etc. Basically I have the foll
EDIT: Solved, my mistake; explained in my answer. I have this: std::vector < boost::shared_ptr < Entity > > entities;