using pairs with boost.foreach

Hi: Is it possible to use an std::pair with boost.foreach? I'm getting all sorts of errors when trying to do this. Any help appreciated.

Igor R escribió:
Is it possible to use an std::pair with boost.foreach?
typedef std::map
map_type; map_type my_map; //.... BOOT_FOREACH(map_type::reference pair, my_map) { pair.first = 1;
How can this possibly work, being keys constant? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Sean Farrow wrote:
Hi:
Is it possible to use an std::pair with boost.foreach?
I’m getting all sorts of errors when trying to do this.
Any help appreciated.
Do you mean using a std::pair of iterators to designate the range? That
should work. Or are you doing something like this:
BOOST_FOREACH( std::pair
participants (4)
-
Eric Niebler
-
Igor R
-
joaquin@tid.es
-
Sean Farrow