Assuming we have an implementation of a template class for a matrix.
I wish to represent the matrix by a std::vector
of type T
.
Now, I wish to return an iterator of the matrix by returning the vector's iterator. For that, I saw that using the keyword typename
is required in the public
section:
typedef typename std::vector<T>::iterator iterator.
First, I don't understand why typename
is required here.
Second, everyone can see that I use a std::vector
to represent the matrix.
What can I do to prevent that information exposing.
How can I achieve this goal without exposing the matrix representation?