This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sorry not implemented: address of bound pointer-to-member function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]