title: How to access std::shared_ptr methods
body: <p>everything is in the title.
  Im new in C++ and im not sure that I undertand shared_ptr properly...</p>
  
  <p>I've this method:</p>
  
  <pre><code>const std::set&lt;Something::Ptr, b&gt; &amp; getSome() const;
  </code></pre>
  
  <p>that I use to get a set of somethings :</p>
  
  <pre><code>auto s = u-&gt;second.getSome();
  </code></pre>
  
  <p>After that i want to iterate on it with :</p>
  
  <pre><code>for(auto i = s.begin();i != s; s.end();i++)
  
  //(so i=  std::shared_ptr&lt;Something&gt; referring to the first element in s )
  </code></pre>
  
  <p>My question is how can i access i methods? </p>
  
  <p>I tried to understand what I was working with by debugging and cout some things :</p>
  
  <pre><code>auto whatIsThat1 = *i;
  cout &lt;&lt; "hello" &lt;&lt; whatIsThat1; //&gt;&gt; hello0x13fd500
  
  auto whatIsThat2 = i-&gt;get();
  cout &lt;&lt; "hello" &lt;&lt; whatIsThat2; &gt;&gt; hello0x21c2500
  </code></pre>