This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: passing subclass methods as parameters
- To: Brent Phillips <brent at lyrastudios dot com>
- Subject: Re: passing subclass methods as parameters
- From: Doug Landauer <landauer at apple dot com>
- Date: Wed, 22 Aug 2001 21:57:54 -0700
- Cc: gcc at gcc dot gnu dot org
On Wednesday, August 22, 2001, at 08:40 PM, Brent Phillips wrote:
> ... the offensive line is
> RegisterHandler(mtype,
> (MsgHandler)&(GsForwardThread::handle_SMsg_Ping)))
You might be getting bit by section 5.3.1 of the standard:
&foo::bar is a pointer-to-member, but
&(foo::bar) is not.
Further questions about the standard might better be
asked in the comp.std.c++ newsgroup.
> Any thoughts on what to try to get this to compile? It seems every
> time I upgrade gcc, the method pointer parameter passing breaks...
Hmm, seems to me that this would discourage most programmers
from using pointers-to-members at all. ("Doc, it hurts when
I do this...")
-- Doug