Boost logo

Boost :

Subject: Re: [boost] Adding support for auto in Boost.Foreach
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2012-02-15 17:15:46

paul Fultz wrote
> Also, on compilers that support variadiac macros, it would be nice to add
> support for commas in the type, such as:
> BOOST_FOREACH(pair<string, string> p, range) {}

I can't try the code below right now... but you should be able to use

BOOST_FOREACH(BOOST_IDENTITY_TYPE((pair<string, string>)) p, range) {}

This should work on all compilers because it does not require variadics.

(BTW, the comma issue is not a "bug"- it's the way the pp works by spec. If
anything, it can be considered a limitation of the pp specs.)


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at