|
Boost : |
Subject: Re: [boost] tie alternative?
From: Jonas Persson (l.j.persson_at_[hidden])
Date: 2008-10-28 03:20:50
David Abrahams skrev:
>> I'm curious on why it isn't covered by BOOST_FOREACH
>
> BOOST_FOREACH doesn't give you access to the iterator value, for what
> that's worth. Also some people don't like to use macros.
>
Ok. Dislike for macros is hard to argue against.
But if the reason mainly is about accessing iterators, perhaps an
indirection wrapper on vertices and BOOST_FOREACH is a more readable
alternative.
BOOST_FOREACH(vertex_iterator vi, keep_iterators(vertices(g))) {
/ Jonas
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk