Boost logo

Boost :

From: Iain K.Hanson (iain.hanson_at_[hidden])
Date: 2002-09-19 08:55:45


boost.org
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Terje Slettebø
> Sent: 19 September 2002 14:17
>
>
> >From: "Richard Crossley" <rdc_at_[hidden]>
>
> > > I can certainly acknowledge that. In fact, I've suggested
> > > that all metafunctions evaluate their own arguments.
> > > [Addition: I see you suggest the same below here. :) ]
> > > Similar to how apply_if evaluates the selected argument,
> as you say.

[ snip ]

Some of the issues are discussed in the paper by Dave A and Aleksey where
they discuss the difference between Metafunctions and MataFunction classes.

As you point out, factorial needs eager template instanciation or the
recursion
does not happen. Other Functions such as with if_ and apply_if you often do
not
want both branches fully instanciated. mpl has chosen the least abstract
form
which will offer the least suprise to newcommers. The downside is that as
you
become a more advanced user, there is more to bitew you in the backside ;-)
but then since when has that been new for C++ users!

/ikh


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