Within my class, I have a method that returns a const_interator the the internal vector (a public method marked const). This is ok, because no one using my class can change the internal vector.
Now I need that exact same code again, but with a non-const i.e. a normal iterator internally. Sure, I could just duplicate the method, mark it private and remove the const word.
How can I reuse one of them in the other one? Code duplication is not so cool.