Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-03-03 01:21:02

Larry Evans wrote:
> If the template arguments are grammars then shift_right<L,R>::type is
> not an expression type.

Correct, it's a grammar type.

> AFAICT, it's of no use.

That's not true. The fact that shift_right<L,R>::type creates
expressions when L and R are expressions, and grammars when L and R are
grammars, is an important symmetry that is leveraged extensively within
Proto. And what would the alternative be? To have two classes,
expression::shift_right<> that generates expression types, and
grammar::shift_right<> that creates grammar rules? This would surely be
worse for users. Why have two when one works just as well? Or are you
suggesting something else?

Eric Niebler
Boost Consulting

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