Article View: gnu.g++.help
Article #79pointers to member functions
From: Clifford Liem
Date: Wed, 05 Aug 1992 22:13
Date: Wed, 05 Aug 1992 22:13
26 lines
1092 bytes
1092 bytes
Pointers to member functions seem to be well documented.
E.g.
class SampleClass;
int (SampleClass::*pmf)() = SampleClass::greaterThan;
Why then can I not pass a pointer to a member function as a parameter?
E.g.
void sort(int (SampleClass::*pmf)());
This crashes with a syntax error (in gnu and cfront).
Anyone ever try this sort of thing??
Cliff
--
_____ __
/\____\ /\_\ Cliff Liem Synthesis and Design of Embedded Systems
/ / ___/ / / / Bell-Northern Research, Ottawa, Ontario
/ / /_\ / / /_\ E-mail: cbl@bnr.ca Phone: (613)763-5978
\/____/ \/____/ Fax: (613)763-7241
Technical Details
Message-ID:
<CBL.92Aug5171335@bcrks88.bnr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!news.utdallas.edu!corpgate!bnrgate!bcrka451!bcrka451!cblShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.help Path: arc1-ca.pugleaf.net!sparky!uunet!convex!news.utdallas.edu!corpgate!bnrgate!bcrka451!bcrka451!cbl From: cbl@bcrks88.bnr.ca (Clifford Liem) Subject: pointers to member functions Message-ID: <CBL.92Aug5171335@bcrks88.bnr.ca> Sender: 5E00 Corkstown News Server Organization: Bell-Northern Research Ltd., Distribution: gnu Date: Wed, 5 Aug 1992 22:13:35 GMT Lines: 26