Boost logo

Boost Users :

From: chun ping wang (cablepuff_at_[hidden])
Date: 2006-05-04 00:52:30


So is there any way to treat lambda like an iterator so i can compare them
to another iterator value or perform iter_swap on them thanks?

On 4/26/06, chun ping wang <cablepuff_at_[hidden]> wrote:
>
> K the question is simple. How do i do iterator swap with lambda.
>
> lets say i have vector of U.
> vector<U> vecU;
>
> typedef vector<U>::iterator iter;
>
> iter beg(vecU.begin());
>
> for_each(vec.begin(), vec.end(),
> (
> if_(_1 == *beg)
> [
> // swap the iterator between the current one and begin.
> ]
> )
> );
>



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