Compiler can't find static member function pointer in egcs1.1b
Koos Vriezen
koos@polder.ubc.kun.nl
Wed Sep 9 01:07:00 GMT 1998
Hi,
The code below will not compile with my egcs1.1b installation on Linux.
The compiler can't find the static member 'mystatic' when called with the
-> operator on an object. It works however with the :: operator on the
class.
___________________________________________________________________
#include <iostream.h>
class Test {
public:
static void (*mystatic) ();
};
void myStaticImpl () {
cout << "static\n";
}
void main () {
Test::mystatic = myStaticImpl;
Test *test = new Test;;
test->mystatic ();
}
void (*Test::mystatic)();
____________________________________________________________________
Cheers,
Koos Vriezen
More information about the Gcc-bugs
mailing list