
20 May
2007
20 May
'07
9:29 p.m.
On May 20, 2007, at 4:37 PM, Eric Niebler wrote:
Maurizio Vitale wrote:
Eric Niebler <eric@boost-consulting.com> 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? :-)
Oh, I see now. Maurizio