Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-13 17:00:46


You have to ask Aleksey for his rationale, but AFAIK template template
parameters are much less flexible. For example, how do you write a
compile-time bind2nd if metafunctions are templates?

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, December 13, 2001 4:47 PM
Subject: Re: [boost] typelists: MPL tutorial + partial review

> 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.
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


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