summaryrefslogtreecommitdiff
path: root/src/KingSystem/Utils/IteratorUtil.h
AgeCommit message (Collapse)Author
2022-07-01IteratorUtil: Fix missing constexpr on getIndex()Léo Lam
2022-07-01IteratorUtil: Forward (non-reference) return types correctlyLéo Lam
With auto&, an operator[] that returns a value (and not a reference) would result in the proxy returning a reference to a local temporary, which is UB
2022-06-22ksys/util: Add range() and indexIter() for convenienceLéo Lam
- range() is similar to Python's range() - indexIter() can be used to simplify `for (int i = 0, n = c.size(); i < n; ++i)` index-based loops