class Container { // Make the iterator using one of these by convention. class iterator { ... }; using iterator = ...; // Need to define these. iterator begin(); iterator end(); // If you want const iterators (hint: you do), define these. const_iterator begin() const { return cbegin(); } const_iterator cbegin() const; const_iterator end() const { return cend(); } const_iterator cend() const; };