Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-04-17 12:07:37

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

> On Wednesday 17 April 2002 10:09 am, you wrote:
> > 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]
> >
> Function already has a bunch of other template parameters (Allocator,
> and invocation Policy), so this isn't new territory. boost::function uses
> named template parameters to support these extra parameters in a
> manner:
> boost::function<void, int, float,
Well, that's a lot more writting... but it doesn't look bad now that I see
it :-)

> Or one can just use the numbered variants. I personally use the numbered
> variants instead of the generate template because it's rare for me to use
> Boost.Function object with more than 2 arguments, and I definately don't
> each of 0-10 arguments in one file :). Pulling in just
> <boost/function/function2.hpp> is much faster than <boost/function.hpp>.
Oh yes, I overlooked this possibility.

Fernando Cacciola
Sierra s.r.l.

Boost list run by bdawes at, gregod at, cpdaniel at, john at