Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-04-17 09:09:16


----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, April 17, 2002 9:49 AM
Subject: Re: [boost] Loki Functor

> On Wednesday 17 April 2002 01:48 am, you wrote:
> > > Issue: passing argument types to the function object wrapper
> >
> > [...]
> >
> > > On the flip side, I personally still prefer the individual
template
> > > parameters. They feel like a more obvious translation from function
types
> > > to function object wrapper types. Functor<void, TYPELIST_3(int, float,
> > > double)> bothers me for some reason, and aesthetically I prefer
> > > Functor<void, int, float, double> (this could be the bias of seeing
the
> > > latter very often).
> >
> > This can easily be altered. I don't think anybody--even Andrei--would
want
> > those macros. :) There is an easy solution to this problem:
> >
> [snip code]
>
> Sorry, I wasn't clear enough. It's not the macro I dislike, but the
explicit
> packaging of the arguments in a type container. So I still wouldn't like:
>
> boost::function<void, boost::mpl::list<int, float, double> >
>
Have you thought already about adding the threading policy?
The packed interface has the benefit that the template has exactly two
arguments, so adding a third optional arg (a policy) is not a problem.
I can't think of a way to add an *optional* policy class to function<> given
its variable arguments.

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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