[ADT] Zip range adapter
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 12 Oct 2016 19:43:02 +0000 (19:43 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 12 Oct 2016 19:43:02 +0000 (19:43 +0000)
commit105a3ce06269eb5c45a4820aba9d04f26de1fbdf
tree9bc48d81e406291b2f2f2e91f854b267192f084d
parentbcdd6c60a09b96749647e494d67426827dd82747
[ADT] Zip range adapter

This augments the STLExtras toolset with a zip iterator and range
adapter. Zip comes in two varieties: `zip`, which will zip to the
shortest of the input ranges, and `zip_first`, which limits its
`begin() == end()` checks to just the first krange.

Patch by: Bryant Wong <github.com/bryant>

Differential Revision: https://reviews.llvm.org/D23252

llvm-svn: 284035
llvm/include/llvm/ADT/STLExtras.h
llvm/unittests/ADT/IteratorTest.cpp