|
Boost Users : |
Subject: Re: [Boost-users] BOOST_FOREACH with Index
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-12-14 04:59:37
Nat Goodspeed wrote:
> Maybe this shouldn't be a BOOST_FOREACH feature at all. As with Python's
> builtin enumerate() function, maybe what we want here is an iterator
> adapter that dereferences to a std::pair<index_type,
> original_iterator_value_type>?
Couldn't you just do a BOOST_FOREACH over combine(count_range(), foos)
for that?
(uses zip_iterator)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net