Boost logo

Boost Users :

Subject: [Boost-users] boost::bind for C function
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2012-12-20 18:30:20


Hello,

I have got a a C library function call, which defines a function:
typedef int (*CFunction) (State* K);

So I would like to use boost::bind / boost::function to create the binding
to a class method:

boost::function<CFunction>( boost::bind(&MyClass::myMethod, this) )

so that I can use the class method with the CFunction signature.
I would like to call a class method with the object context like a
C function.

Can anybody help me to create a correct binding?

Thanks

Phil


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net