 <p>I've omitted the dummy implementations I used but this compiled for me:</p> <pre><code>template&lt; class T &gt; class MyList { public: class const_iterator { public: const T&amp; operator*(); bool operator!=( const const_iterator&amp; ) const; const_iterator&amp; operator++(); }; const_iterator begin() const; const_iterator end() const; }; </code></pre>