[Iterator] zip iterator with std::tuple or std::pair
Hello,
as far as I understand the zip_iterator is compatible also with STL
tuple and pair.
However, when I try to create a zip_iterator with std::pair it fails to
compile.
Here, a simple test code:
#include <vector>
#include <utility>
#include , 0l>’:
/software/boost-1.62/include/boost/iterator/zip_iterator.hpp:180:17:
required from ‘struct
boost::iterators::detail::zip_iterator_base ’
/software/boost-1.62/include/boost/iterator/zip_iterator.hpp:237:9:
required from ‘class
boost::iterators::zip_iterator I get a similar results for std::tuple compiled c++11 enabled gcc.
I did not find any solution, except a 3 year old patch, which is said to
be applied to the boost::iterator library.
Any suggestions?
Best regards,
Matthias
Thank you! It works! Am 2017-03-23 14:50, schrieb Michel Morin via Boost-users:
Matthias Wohlgemuth wrote:
as far as I understand the zip_iterator is compatible also with STL tuple and pair.
Try #include
or #include . Regards, Michel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Matthias Wohlgemuth Arbeitsgruppe Prof. Dr. Roland Mitric Lehrstuhl für Theoretische Chemie Institut für Physikalische und Theoretische Chemie Julius-Maximilians Universität Würzburg Emil-Fischer-Straße 42 97074 Würzburg Tel: +49-931-31-88862 Mobil: +49-151-50678023 Mail: matthias.wohlgemuth@uni-wuerzburg.de
Try #include
or #include
Does the community think it's reasonable that `boost::zip_iterator` should automatically support `std::tuple` when c++11 or better is detected? It seems to me that this would be less surprising and encourage more use of the (fantastic) zip_iterator. On 23 March 2017 at 14:50, Michel Morin via Boost-users < boost-users@lists.boost.org> wrote:
Matthias Wohlgemuth wrote:
as far as I understand the zip_iterator is compatible also with STL tuple and pair.
Try #include
or #include . Regards, Michel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Matthias Wohlgemuth
-
Michel Morin
-
Richard Hodges