|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-12-13 16:47:43
From: "David Abrahams" <david.abrahams_at_[hidden]>
> > I'm still not clear on what a "quoted"
> > function object is.
>
> I think you should forget that term, but what Mat means (and it's Mat's
> term, borrowed from lisp) is a class written this way:
>
> struct my_metafunction
> {
> template <class Param1, ...class ParamN>
> struct apply
> {
> ... // optional metacomputations here
> typedef type-expression type; // return value
> };
> };
>
> A uniform interface to metafunctions makes it possible to re-use them in
> different contexts. That's the metafunction formulation used in MPL.
Was this concept only introduced for portability reasons (BTW did you know
that VC 7 supports template template parameters) or there is a deeper
meaning? (I can see one difference right away but I'm interested in the
design rationale.)
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk