Skip to content

Do not assume that Track::states() returns a reference to a container

Gerhard Raven requested to merge only-compare-iterators-to-same-range into master

so do NOT compare iterators obtained from two distinct calls to Track::states() -- instead, assign the return value to a variable(*), and then call begin() and end() on that variable (or use a range based loop which does so implicitly)

(*) the variable could be a const &, as that extends the lifetime of any temporary it is bound to (in case a value is returned)

Edited by Marco Cattaneo

Merge request reports