Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-03-22 11:29:19

On 03/03/08 15:51, Eric Niebler wrote:
> shift_right<L,R>::type is *very* simple. It is expr<tag::shift_right,
> args2<L, R> >. Always. It's just a 2-element container and a tag. If L
> and R are expressions, it is an expression. If they're grammars, it is a
> grammar, suitable for use as the second template parameter to
> proto::matches. It is simple, IMO, and leads to a very straightforward

So why is there expr<Tag,Args,Arity>::type if it's always the same
as its enclosing class, expr<Tag,Args,Arity>. IIRC, mpl requires it
for some metaprogramming reason, but it seems that's an implementation
detail; consequently, although the user can use it, there's no need
for the user to use it. If so, then why do many of the examples have:

   terminal<...>::type a_term_expr={{}};

instead of just:

   terminal<...> a_term_expr={{}};


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