Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-03-15 16:07:38


Markus Werle wrote:
> First of all: This is a very nice example.
> Fantastic idea to introduce index information stored
> in the terminals at this place in the docs - perfect.

Thanks.

> If you define arg as
>
> template<int I> struct arg {};
>
> and change the code accordingly the reader is not in need
> to know anything about mpl::int_ and IMHO the code

<snip>

Right, this is a good suggestion. And arg should be renamed to
placeholder to avoid confusion with proto::arg and to make it consistent
with Calc3. And I should make the same change to Calc1.

Note however that in the Calc3 example, the template parameter must stay
mpl::int_ instead of an int. Otherwise, the CalculatorGrammar won't
work. Non-type template parameters are the bane of metaprogramming.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk