octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto and const_iterators


From: Rik
Subject: Re: auto and const_iterators
Date: Wed, 2 May 2018 15:06:27 -0700

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.

--Rik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]