subsurface/desktop-widgets
Berthold Stoeger cea171ffd4 core: implement an enumerating iterator
In the printing-template code, we loop through a vector and
then determine the index of the current element by searching
the vector. This irks me.

Since looping over a collection with an index is a rather
common theme, implement an enumerating iterator that can
be used as in:
	for (auto [idx, item]: enumerated_range(v)) {
		...
	}

For now, use it for the above vexing case. Convert other
iterations of this theme later.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-10-30 21:57:39 +01:00
..
2015-10-30 10:36:49 -07:00
2020-10-26 19:27:03 -07:00
2017-11-30 23:14:46 -08:00
2020-01-24 09:51:02 -08:00
2020-03-19 08:37:59 -07:00
2020-09-03 11:46:16 -07:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2015-10-30 10:36:49 -07:00
2017-11-30 23:14:46 -08:00