Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-05-20 16:37:14


Maurizio Vitale wrote:
> Eric Niebler <eric_at_[hidden]> writes:
>
>> Right. I should have suggested that in the first place. I tend to think
>> this approach (declaring an empty terminal and using its operator()())
>> is nicer because it reuses more of proto's machinery, but the two
>> approaches are equivalent.
>>
>> There are cases where this approach doesn't work, however. For example,
>> in xpressive, there is a repeat<>() function, for repeating
>> sub-expressions. For instance:
>>
>> repeat<3,6>('a')
>>
>
> But even there you could have had repeat< > return a proto::terminal and
> then let the generic overloading of operator()() take care of the rest.

Are you sure about that? :-)

-- 
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