Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-04-25 22:58:44


Eric Niebler wrote:
> Stefan Strasser wrote:
>> michael toksvig schrieb:
>>>
>>> BOOST_FOREACH(pair<Key, Value> &p, some_map)
>>>
>>> does not work, since the preprocessor just can't get over that first
>>> comma
>>>
>>
>> this could be worked around with C99 variadic macros if available,
>> something like:

> Clever, but there is an ambiguity here. What is the relations of the
> arguments in BOOST_FOREACH2(a1,a2,a3)? Do a1 and a2 together make up
> the loop variable declaration, or do a2 and a3 together form the
> collection expression

Maybe you could use something like this: http://tinyurl.com/8s7ba

Jonathan


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