Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::array < pair<>... > iterator adaptor
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-01 13:18:46


AMDG

Hicham Mouline wrote:
> I have a boost::array< pair<type1, type2>, maxsize > object, and I wish to
> iterate over the list of type1 elements, and the list of type2 elements...
>
> I gather I then need an iterator adaptor based on array's iterator and
> const_iterators...
> How may I write such a thing?
>
> I then can pass around iterators to type1 and type2 separately.
>

transform_iterator might be useful. I don't know off
the top of my head whether there is a more specialized
iterator adaptor in Boost somewhere.

In Christ,
Steven Watanabe


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