kylelutz/compute — pull request #51 by ddemidov (2014-01-09 19:00:29+00:00)
Title: Make zip_iterator take more than three elements

This uses Boost.Preprocessor macros to allow zip iterators to work with arbitrary number of elements (the current limit is maximum `boost::tuple` size which is 10 by default).

It seems that possible implementation with variadic templates would be more cumbersome, as it would require recursion for things like [this](https://github.com/kylelutz/compute/blob/43678410be226caf3f7033b817a2a9fd8d6eb00b/include/boost/compute/iterator/zip_iterator.hpp#L166-L168).

I also tried adding `detail::is_tuple`, and replacing multiple [operator<<](https://github.com/kylelutz/compute/blob/43678410be226caf3f7033b817a2a9fd8d6eb00b/include/boost/compute/iterator/zip_iterator.hpp#L314-L331) with a single one which would be guarded by `boost::enable_if`, but I run into ambiguity errors, so I gave up (but this approach worked [here](https://github.com/kylelutz/compute/blob/43678410be226caf3f7033b817a2a9fd8d6eb00b/include/boost/compute/iterator/zip_iterator.hpp#L95-L116)).

See also #50