On 05/02/2018 02:52 PM, John W. Eaton wrote:
Either solution is OK with me, but I see more lines that remove
const_iterator than iterator. Are the only ones we have to change the
ones where the object itself is not const but we were accessing elements
with a const_iterator?
That's right. It's only when we want to confirm to the compiler that the
access should be read-only which is only necessary for a mutable object.
If the entire object is const already then all accesses are necessarily
read-only.