Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-04-13 05:39:52


"Joaquin M Lopez Munoz" <joaquin_at_[hidden]> wrote

>I think the possibility of having the type of a lambda expression
>is extremely interesting. IMHO, this facility can be conceptualized
>as a "static lambda" library...

>So it would be nice if Boost.Lambda is augmented with
>more or less comfortable syntax to produce static
>lambda types...

>Maybe this is quite a lot of work, but IMHO the
>potential of it is great. I don't know wheter
>MPL has already the possibility of doing something
>like this (I guess it doesn't), or on the contrary this
>static lambda library can be regarded as a cooperative
>add-on to MPL. Comments?

As far as Lambda is concerned, Boost.Function can abstract you from the
functor type (although at the expence of some overhead):

std::set<int, boost::function<bool(int)> > s(_1 < _2);

But in general, the technique to determine the type of an expression tree,
where each leave is a pre-registered type, and each other node is an
instance of a pre-registered template would be extremely interesting for
many libraries (and for RTL in particular).

If you have any specific thoughts about this, I would be very interested to
know...

Regards,
Arkadiy


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