From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b09c5ba52b0f85c8,start X-Google-Attributes: gidfee84,public X-Google-Thread: 109fba,b09c5ba52b0f85c8,start X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 1994-05-17 03:17:27 PST Xref: gmd.de comp.unix.osf.osf1:3230 comp.lang.c++:55486 Path: gmd.de!nntp.gmd.de!urmel.informatik.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!ina.zfn.uni-bremen.de!marvin.pc-labor.uni-bremen.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!zip.eecs.umich.edu!umn.edu!mayonews.mayo.edu!chirpa!stan From: stan@chirpa.mayo.edu (Andrew Staniszewski) Newsgroups: comp.unix.osf.osf1,comp.lang.c++ Subject: DEC C++ template problem Date: 16 May 1994 19:06:34 GMT Organization: Mayo Foundataion Sender: stan@chirpa (Andrew Staniszewski) Distribution: world Message-ID: <2r8g7q$gsq@fermat.mayo.edu> Reply-To: staniszewski@mayo.edu NNTP-Posting-Host: chirpa.mayo.edu X-Newsreader: mxrn 6.18-9 I need to write some code taking advantage of the flexability of templates. But the DEC C++ compiler is being rather noisome. My specific problem lies in passing a member function from a paramatized type, specificly ----------------------------------------------------------------------------- include class foo { public: int barr() { return 0;} }; template int func(type data,int (type::*memberFunc)()) { return data.memberFunc(); } void main() { foo data; cout << func(data,&foo::barr) << endl; } -------------------------------------------------------------------------------- generates the message from the compiler chirpa> cxx -c test.cxx test.cxx:8: error: In the declaration of "memberFunc", type is not a class, struct, or union type. Compilation terminated with errors. The only way I can get this to compile is to declare memberFunc to belong explicily to foo. I THINK this is a compiler bug, but can anyone tell me for sure? -- ------------------------------------------------------------------------------ Andrew Staniszewski staniszewski@mayo.edu ------------------------------------------------------------------------------