|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-10-17 14:11:37
On Wednesday 17 October 2001 02:50, you wrote:
> I'm considering writing template C++ wrappers for the gnu GSL
> integration library instead. The issue there is that these routines
> are plain C. Assume I don't rewrite them, but just wrap them. In
> that case, how do I adapt a C++ functor to a plain C function pointer
> that a plain C routine would accept? Any example? I tried playing
> with mem_fun but I must be doing something wrong.
I've dealt with this before, and recently wrote a small tutorial to describe
the use of Boost.Function to generalize callbacks that are based on C
function pointers. It is available here:
http://www.cs.rpi.edu/~gregod/generalizing_callbacks.html
I hope it helps.
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk