I implement a generic list: A list with two types of iterators: List<T>::Iterator
and List<T>ConstIterator
.
I have the following methods:
typename List<T>::Iterator List<T>::begin() {} typename List<T>::ConstIterator List<T>::begin() const {}
Is this a suitable way to return a non-constant iterator for a non-constant list and a constant iterator for a list of constants?
source share