...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Zips sequences together to form a single sequence, whose members are tuples of the members of the component sequences.
template< typename Sequence1, typename Sequence2, ... typename SequenceN > struct zip { typedef unspecified type; };
result_of::zip
<Sequence1, Sequence2, ... SequenceN>::type
Return type: A model of the most restrictive
traversal category of sequences Sequence1
to SequenceN
.
Semantics: Return a sequence containing
tuples of elements from each sequence. For example, applying zip to tuples
(1, 2,
3)
and ('a', 'b',
'c')
would return ((1, 'a'),(2, 'b'),(3,
'c'))
Constant.
#include <boost/fusion/algorithm/transformation/zip.hpp> #include <boost/fusion/include/zip.hpp>