Boost logo

Boost :

Subject: Re: [boost] tie alternative?
From: David Abrahams (dave_at_[hidden])
Date: 2008-10-27 17:28:48


on Mon Oct 27 2008, "Michael G" <mgoldshteyn-AT-comcast.net> wrote:

> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:877i7uivdq.fsf_at_mcbain.luannocracy.com...
>> ...
>> However, we can make it much nicer, e.g.:
>>
>> for (vertex_iterator pv,ve = xxx(pv,vertices(g)); pv != ve; ++pv)
>> {
>> ...
>> }
>>
>> My only problem is how to spell xxx. The attached proof-of-concept uses
>> operator%, but I don't feel particularly good about that choice either.
>> Ideas?
>
> I would recommend one of the following, depending on your verbosity comfort
> level. The vertical bar, | , denotes alternation:
>
> (get|as|to)_iterators
> get_container_bounds

Again, quite verbose. But maybe BOOST_FOREACH is the right answer
anyway; I don't know.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk