Home Segments Index Top Previous Next

779: Mainline

For full generality, you need to define the iterator class to be a template class. The first step is to establish that each iterator class object contains private pointers of the appropriate type:

template 
class iterator {
  ...
  private: link* current__link_pointer;  
           link* first_link_pointer;     
};