boost::shared_ptr and stl algorithms