Boost logo

Boost :

From: Dirk Gerrits (dirkg_at_[hidden])
Date: 2002-05-11 15:00:54

----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, 11 May, 2002 20:54
Subject: Re: [boost] Overloading a function taking a boost::function

> > Wouldn't make_function work for std::unary_function,
> > and
> > boost::function too? But yes, handling arbitrary function objects would
> > difficult.
> Yes, it could be made to work with unary_function, binary_function, and
> boost::function.
> > Well I guess I'll write make_function myself then. It won't work for any
> > function
> > object but I can live with that.
> That's probably the best option. Sorry :(

Well it's good enough for my current project. I'll start coding
make_function for
0, 1 and 2 parameters. If I ever need more I can just add additional

> > Just one thing though, I'd like it to work for the result of a
> > as well.

> It wouldn't work anyway, because boost::bind function objects don't have
> exact argument types to deduce. <cut> Boost.Function doesn't (and can't)
> partial bindings.

Oops! Hadn't considered that. Thanks for pointing that out.

> There are workarounds for most compiler deficiencies, but of course we
> know until someone tries. I'll work on it sometime.


Dirk Gerrits

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