This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Member function pointer woes
Albert Antony wrote:
> I need to pass a pointer-to-member-function as a parameter to a
> function
> which takes pointer-to-function as an argument. Is there any way to
> do it
> besides overloading the function?
This has nothing to do with GCC development. What you are trying to do is a
closure of the member function pointer. There are several ways to do it. Please
look into std::mem_fn, and also the Boost library (boost::bind), or consult a
good C++ book.
Giovanni Bajo