Re: Template specialisation of template class member function
Each type of STL container iterator has certain properties. std::vector's iterators are 'random access' (you can move the iterator any number of positions at one go) while std:list's are bidirectional (foreward/backward, one position at a time). Pointers are also random access iterators.
When writing a template that accepts iterators you may need to know what type of iterator you are dealing with, as you may be able to write a more efficient algorithm with, say, random access iterators. The iterator_traits template class allows you to discover this information at compile time and create specialisations of templated classes by checking the iterator's 'tag'.
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman