This is the mail archive of the gcc-bugs@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: & non-static -> member function


On Jan 31, 2000, Hany Morcos <hanymorcos@yahoo.com> wrote:

> mp.cpp:7: taking the address of a non-static member function
> mp.cpp:7:   to form a pointer to member function, say `&x::y'

> Is there any way to get rid rid of this error? 

Yes.  Use the correct syntax, as suggested by the error message
itself.

> This was acceptable before....

It was a bug.  Your code snippet is ill-formed according to the ISO
C++ Standard.

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


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