Maybe a Bug in Cygwin in using Pointers to class fuctions

Mumit Khan khan@xraylith.wisc.EDU
Tue Aug 31 23:49:00 GMT 1999

"Ward Correll" <> writes:

> Maybe a bug in Cygwin! I think that this sorce code is correct in the Final
> ANSI\ISO standard on C++ so I think it could be cygwin. Please check it out
> for me in this simple code.

It's not a bug. Please see the discussion on pointer to member function
in a recent C++ book such as Stroustrup 3rd edition. Of course, the
best place is the ISO standard itself (cf: 8.3.3 [dcl.mptr]/2), but that
can be rather obtuse.

It's also a good idea to report what version of compiler you're using and
some system/OS info (gcc -v reports the compiler version).

>               case 1: pFunc = Mammal::Speak; break;
>               default: pFunc = Mammal::Move; break;

> BASH.EXE-2.02$ c++ -o try try.cpp
> test.cpp: In function `int main()':
> test.cpp:66: assuming & on `Mammal::Speak'
> test.cpp:67: assuming & on `Mammal::Move'
> =====================================================================
> I know I want the fuction pointer to assume on Mammal::Speak or Mammal::Move
> when meets some conditions as you see. But cygwin won't let me do that.
> Anyway to force compiling?

The compiler gave you the answer, so use it! (hint: Mammal::Speak -->

Followup to a C++ forum please.


Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list