Can boost::smart_ptr such as scoped_ptr and shared_ptr be used in std containers such as std::map?
class SomeClass
{
std::map<int,boost::scoped_ptr<SomeOtherClass> > a_map;
};
As boost::smart_ptr can be used for polymorphism, is it true in this case as well? Will the destruction of the container, trigger the correct destruction of the subclasses?