title: Cast an iterator of a vector of shared_ptr type
body: <p>How can I cast an iterator of a vector of shared_ptr type? Consider following example:</p>
  
  <pre><code>typedef boost::shared_ptr &lt; MyClass &gt; type_myClass;
  
  vector&lt; type_myClass &gt; vect;
  vector&lt; type_myClass &gt;::iterator itr = vect.begin();
  
  while(itr != vect.end())
  {
     //Following statement works, but I wish to rather cast this 
     //to MyClass and then call a function?
     (*itr)-&gt;doSomething(); 
  }
  </code></pre>