Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2006-09-15 15:08:51


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of me22
> Sent: Friday, September 15, 2006 2:55 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Writing a more readable code
>
> use an iterator adapter that returns base_itr->second when
> dereferenced. I hear that it's simple to make one with
> Boost.Iterator.
>
> You'd then just do
> std::for_each( seconder(a.begin()), seconder(a.end()),
boost::bind(f,_1)
> );

[Nat] The need to adapt each of a.begin() and a.end() bothers me. (I've
dealt with similar but more complex situations.) Is there a nice way to
combine Boost.Iterator adaptors with Boost.Range to express this less
redundantly?


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