Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-05-07 02:47:18


Edward,

please see below.

On Wed, May 7, 2008 at 5:30 AM, Edward Diener <eldiener_at_[hidden]>
wrote:

> Ovanes Markarian wrote:
> > Edward,
> >
> > Just wanted to add my 2 cent. That might help. You need ::type when you
> > do type calculations.
> > For example:
> >
> > Access the type stored in a type sequence -> ::type
>
> OK
>
> > transform type sequence to another type sequence -> ::type
>
> OK
>
> > So meta-algorithms operate on types and result in new types -> ::type
>
> There is nothing in the book or documentation reference about
> "meta-algorithms", whatever they are.

The authors of the book make an analogy between STL and MPL. Especially by
introducing meta-functions which are algorithms.
Take a look at chapter 6.
6.1. Algorithms, Idioms, Reuse, and Abstraction
6.2. Algorithms in MPL
...

MPL meta-functions like transform, sort, copy, remove, reverse, replace etc.
are analogies to STL algorithms.

>
> >
> > You don't need ::type when you pass parameters or transport the
> > contained type(s), e.g.
>
> What do you mean by the above ?
>
> > Placeholder transports type parameter to a metafunction -> no ::type
>
> OK.
>
> > vector of type passed to a metafunction also transports type(s) -> no
> ::type
>
> OK
>
> >
> > Hope that helps.
>
[...]

Regards,
Ovanes



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net