Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2002-04-13 16:28:46

David Abrahams wrote:

> Once you understand that only types (not integers or templates) can be
> manipulated in a general way by the template system, you begin to
> appreciate the elegance of "next<N>::type" instead of "n + 1" and using
> metafunction classes in place of ordinary metafunctions. Until then,
> however, it just looks like a whole lot of extra complication. And, BTW,
> isn't there a meta-lambda version of the above which simplifies things a
> bit?

Actually, I appreciate the use of types to encapsulate integral
constants. What got me was next<N>. I have no idea what next<N>
means. Why not add1<N>::type? next<N> looks like some kind of
iterator, which I suppose it is in a sense (add 1 to a counter).


"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

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