
3 Mar
2008
3 Mar
'08
6:21 a.m.
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 www.boost-consulting.com