[Boost-bugs] [Boost C++ Libraries] #4620: Range Adaptor: enumerate(d)

Subject: [Boost-bugs] [Boost C++ Libraries] #4620: Range Adaptor: enumerate(d)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-02 11:29:11

#4620: Range Adaptor: enumerate(d)
 Reporter: Ilya Murav'jov <muravev@…> | Owner: neilgroves
     Type: Patches | Status: new
Milestone: To Be Determined | Component: range
  Version: Boost 1.44.0 | Severity: Not Applicable
 Keywords: |
 I use B.Range with B.Foreach closely and consider
 boost::adaptors::indexed() not so good one. I would like to use it as
   std::vector<T> array;
   BOOST_FOREACH( boost::index_value<T&> iv, array | enumerated() )
      int i = iv.index();
      T& t = iv.value();

 I've implemented such one in my program (using indexed() as source),
 dvd/blobs/master/src/mlib/range/enumerate.h and hope it will be useful for
 others too.

Ticket URL: <https://svn.boost.org/trac/boost/ticket/4620>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC