boost.iterator's zip_iterator::value_type should not be reference

14 Apr
2008
14 Apr
'08
11:40 p.m.
Hi, defining zip_iterator::value_type in the boost.iterator library to be the same as the reference type breaks some mutating algorithms on zip_iterators. for example sort (c++0x inside): template<class... Arrays> void array_multisort(Arrays& ... arrays) { using namespace boost; std::sort(make_zip_iterator(make_tuple(arrays.begin()...)), make_zip_iterator(make_tuple(arrays.end()...))); } won't work as expected. Patching zip_iterator to provide a more natural value_type makes the above code work as intended. The patch is attached to this message. mfg thomas
6270
Age (days ago)
6270
Last active (days ago)
0 comments
1 participants
participants (1)
-
thomas weidner