| 1 | #define _GLIBCXX_DEBUG 1
|
|---|
| 2 | #include <boost/iterator/zip_iterator.hpp>
|
|---|
| 3 | #include <vector>
|
|---|
| 4 |
|
|---|
| 5 | int main() {
|
|---|
| 6 | typedef std::vector<int>::iterator iterator;
|
|---|
| 7 | typedef boost::tuple<iterator, iterator> it_tuple;
|
|---|
| 8 |
|
|---|
| 9 | std::vector<int> int_v;
|
|---|
| 10 | it_tuple t_begin(int_v.begin(), int_v.begin());
|
|---|
| 11 | it_tuple t_end(int_v.end(), int_v.end());
|
|---|
| 12 |
|
|---|
| 13 | typedef boost::zip_iterator<it_tuple> zip_iterator;
|
|---|
| 14 | zip_iterator begin(t_begin);
|
|---|
| 15 | zip_iterator end(t_end);
|
|---|
| 16 |
|
|---|
| 17 | std::vector<boost::tuple<int, int> > int_int_v;
|
|---|
| 18 | int_int_v.insert(int_int_v.end(), begin, end);
|
|---|
| 19 |
|
|---|
| 20 | return 0;
|
|---|
| 21 | }
|
|---|