Asgn of ptr to member func ignores const

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu Feb 24 13:56:00 GMT 2000


> So, I've got this code where I'm assigning a non-const member function
> to a pointer to a const member function, and egcs doesn't say anything
> about it.

Thanks for your bug report. The mainline compiler (2.96 20000223
(experimental)) says

a.cc: In function `void some_func ()':
a.cc:9: cannot convert `void (SomeClass::*) ()' to `void (SomeClass::*)
a.cc:9: () const' in assignment

so it appears the bug has been fixed.

Regards,
Martin



More information about the Gcc-bugs mailing list