Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!uunet!pilchuck!dataio!fnx!nazgul!bright From: bright@nazgul.UUCP (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: C++ Syntax Query Keywords: Pointer to Member Functions Message-ID: <153@nazgul.UUCP> Date: 9 Nov 90 19:57:37 GMT References: <1743@metaphor.Metaphor.COM> Reply-To: bright@nazgul.UUCP (Walter Bright) Organization: Zortech, Seattle Lines: 18 In article <1743@metaphor.Metaphor.COM> dattatri@metaphor.Metaphor.COM (Dattatri) writes: / (alpha.*ptf)(); // Why not alpha.ptf() / beta->ptf(); // this is also not allowed / (beta->*ptf)(); // this is the language rule The trouble is that the beta->ptf() is a bit difficult to parse. There's a lot going on there trying to figure out what the user intended. It may not seem so on the surface, but in trying to work that into the parser, I thank Bjarne for those extra parens! P.S. I always thought the ability to dereference a function pointer by the shorthand method (no *) was a botch in the language. If you are dead set about how convenient it is, try: #define func (*func) Ah well, all water under the bridge! P.P.S. I also think the address of func should be written as &func. Seems clear to me!