This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ss 19981101 does not like member function pointer assigments ...
- To: egcs-bugs at cygnus dot com
- Subject: ss 19981101 does not like member function pointer assigments ...
- From: Roger March <rogmon at monster dot mti dot sgi dot com>
- Date: Tue, 03 Nov 1998 02:13:11 +0000
- Organization: Silicon Graphics Inc
The attached code complains 'X::A() can only be used in a call'. This fails on
both an IRIX6.2 and Linux i586 build. Thanks.
--
Sen Bonehead: We must control pornography on the internet or one of our
children is likily to become a president like the one we have now ...
Roger March, rogmon@{sgi,aol}.com
//
// Member function pointer problem.
//
class X {
public:
int a; // something to play with
typedef void (X::*mfp)();
//
void A()
{ a = 1; }
//
mfp do_a; // the player
//
X() :
a(0)
{ do_a = &A; }
};