passing subclass methods as parameters
Doug Landauer
landauer@apple.com
Wed Aug 22 22:04:00 GMT 2001
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
More information about the Gcc
mailing list