mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-30 08:56:40 +00:00
b29c2901de
a sequence of values. It increments through the values in the half-open range: [Begin, End), producing those values when indirecting the iterator. It should support integers, iterators, and any other type providing these basic arithmetic operations. This came up in the C++ standards committee meeting, and it seemed like a useful construct that LLVM might want as well, and I wanted to understand how easily we could solve it. I suspect this can be used to write simpler counting loops even in LLVM along the lines of: for (int i : seq(0, v.size())) { ... }; As part of this, I had to fix the lack of a proxy object returned from the operator[] in our iterator facade. Differential Revision: http://reviews.llvm.org/D17870 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269390 91177308-0d34-0410-b5e6-96231b3b80d8