[ADT] Zip range adapter
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 19 Oct 2016 18:02:21 +0000 (18:02 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 19 Oct 2016 18:02:21 +0000 (18:02 +0000)
commita85154518feb42ee640d5866fe234128932b3a1d
treef42fcdbcf1270187015df1b9f1f45988b18c1a8d
parent5b1abfc88ec2d30801ac212b75ac1dfbcc195886
[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 range.

Recommit r284035 after MSVC2013 support has been dropped.

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

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

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