Xidorn Quan: > I asked a question in #developers that what is the best way to reversely > iterating nsTArray, and there are some suggestions:
For cases where we don’t need to know the index of the array, can we support something like: for (e : array.ReverseIterator()) { ... } or: for (e : ReverseIterator(array)) { ... } (I notice that boost::adaptors::reversed is something like this.) There’s a danger that it’s not clear what happens if you modify the array while using the iterator, but it’s probably no worse than using the indexes that would come from ReverseIntegerRange. -- Cameron McCormack ≝ http://mcc.id.au/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform