Boost logo

Boost Users :

From: Markus Werle (yg-boost-users_at_[hidden])
Date: 2003-06-25 07:56:08


Peter Dimov wrote:

> I have to repeat my usual advice here, use the correct algorithm (even if
> it's not standard).
>
> template<class It, class F> void for_each_pair(It first, It last, F f)
> {
> for(; first != last; ++first) f(first->first, first->second);
> }
>
> for_each_pair(m.begin(), m.end(), std::cout << _2 << " ");

OK, that's a solution.

Many thanks,

Markus

-- 
Build your own Expression Template Library with Daixtrose!
Visit http://daixtrose.sourceforge.net/ 

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