|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2006-11-05 13:59:00
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".
<snip>
WOW! That's cool.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk