This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sorry not implemented: address of bound pointer-to-member function
- To: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Subject: Re: sorry not implemented: address of bound pointer-to-member function
- From: "A.P. Zijlstra" <peter at mcs dot nl>
- Date: Tue, 29 Sep 1998 18:15:51 +0200
- CC: egcs mailing list <egcs at cygnus dot com>
- Organization: Physics student @ University of Amsterdam
- References: <360FB8CF.F023B35E@mcs.nl> <oryar3h9dg.fsf@araguaia.dcc.unicamp.br>
- Reply-To: peter at mcs dot nl
Alexandre Oliva wrote:
>
> A P Zijlstra <peter@mcs.nl> writes:
>
> > error: "sorry not implemented: address of bound pointer-to-member function".
> > What do I do?
>
> Just add the required parentheses to invoke the method and you're
> done.
>
> > Cfunc( if->some_function);
> Cfunc( if->some_function () );
> ^^
>
this will pass the return value of Interface::some_function to Cfunc,
and this is not desirable in my case. I want Cfunc to have the address
of some_function. Fredrik rightly pointed out that this is somewhat more
complex than I initially thought, this as the function pointer itself
has to 'remember' which class instanitasion it belongs to.
Peter