std::shared_ptr Iterator
<p>I have an iterator which iterates over a std::shared_ptr. So operator++ points the internally stored shared pointer to the next item.</p>

<pre><code>template&lt;class IT&gt;
class MyIterator
{
public:
    ...

    MyIterator&amp; operator++()
    {
        _i = ... // Call factory
        return *this;
    }
private:
    std::shared_ptr&lt;IT&gt; _i;
};
</code></pre>

<p>How should I implement the operator*() and operator->() operators?</p>

<p>How should I test if the iterator is pointing to NULL, i.e. if the internal shared pointer is pointing to NULL.</p>
