As an extension to this question Are const_iterators faster?, I have another question on const_iterators. How to remove constness of a const_iterator
const_iterators
const_iterator
Scott Meyer's article on preferring iterators over const_iterators answers this. Visage's answer is the only safe pre-C++11 alternative, but is actually constant time for well-implemented random access iterators, and linear time for others.