Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 2001-10-16 18:30:23

Lets say I have a function object that takes an int parameter. And I have a
function that doesn't take any parameters at all. I'd like to be able to
make the function object be the function, but discard the parameter.

This is sort of the "flip side" of bind.

    #include <boost/function.hpp>

    void g() { }

    int main()
        boost::function<void, int> f;
        f = g;

Is there a nice way of fitting this into Boost.Function, or is it maybe in
there already? Maybe Boost.Bind offers a way to do this? Or maybe this is
impossible to implement?

    -- Darin

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