Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.5.3
-
None
-
4f2203e481cc1663776e7b87b082cf0dd42849fd
Description
A sentence in "The foreach keyword" of "Generic Containers" needs a rewrite
Similarly, declaring the variable to be a non-const reference, in order to modify the current item in the list will not work either.
It does not make sense. Jon Berg explained it to me last year. If you know what the sentence means, you can parse it, but a new reader is unlikely to figure it out.
Perhaps
Since foreach creates a copy, using a non-const reference for the variable does not allow allow you to modify the original container. It only effects the copy, which is probably not what you want.