Boost logo

Boost :

From: Daniel Wallin (daniel_at_[hidden])
Date: 2006-11-05 20:23:42

Tobias Schwinger wrote:
> Daniel Wallin wrote:
>> Eric Niebler wrote:
>>> I'd still be curious what a PP solution looks like, though. The problem
>>> stumped me for quite some time.
>> I'll bite. It's a bit of a hack, but it works. :) It basically
>> accumulates the closing >'s as it goes, and expands them after the last
>> item. It keeps a looping counter that keeps track of when to split into
>> another mpl::and_<>.
> Here is an alternative implementation with a similar approach, using
> a sequence to "escape" the commas and SEQ_ENUM for "unescaping".

Yes, FWIW my rationale for doing it the way I did was that I wanted to
allow the predicates to have embedded commas. Also, it's *a lot* faster,
and this is a contest, right? ;)

Daniel Wallin
Boost Consulting

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