
20 Dec
2011
20 Dec
'11
10:23 p.m.
Please don't top-post.
My case is like that: I have a number of polymorphic objects which can be used or referenced by other objects. I put them (the polymorphic objects) in MIC. And if one changes its type (not only its value), its users know it automatically by shared_ptr. I think I need MIC with shared_ptr pointing to scoped_ptr. Am I right? Or is there other way to easy handle it?
How can an object change its type?! In c++ type is a compile-type attribute. Perhaps you mean that you erase an object from the container and add another one, or replace some object. In any case, shared_ptr would be fine.