home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!uw-beaver!ubc-cs!destroyer!gumby!wupost!usc!sdd.hp.com!swrinde!news.dell.com!math.utexas.edu!ut-emx!jamshid
- From: jamshid@ut-emx.uucp (Jamshid Afshar)
- Newsgroups: comp.lang.c++
- Subject: Re: Class Template Member Function returning pointer to function
- Summary: I think it's a Borland bug
- Message-ID: <77688@ut-emx.uucp>
- Date: 14 Aug 92 09:16:11 GMT
- References: <1992Aug7.204148.20180@cunews.carleton.ca>
- Reply-To: jamshid@emx.utexas.edu
- Organization: The University of Texas at Austin; Austin, Texas
- Lines: 38
-
- In article <1992Aug7.204148.20180@cunews.carleton.ca> nholtz@zonker.cascade.carleton.ca (Neal Holtz) writes:
- > template <class T>
- > class Queue {
- > public:
- > typedef void (*FullQHandler)(Queue<T>&);
- > FullQHandler setHandler( FullQHandler fn );
- > };
- >[...]
- >An obvious thought might be to fully qualify the typedef name and
- >do this:
- > template <class T>
- > Queue<T>::FullQHandler
- > Queue<T>::setHandler( Queue<T>::FullQHandler fn ) { ... }
- >
- >I haven't checked all of the rules in the ARM or in C++PL2, but the
- >latter in section r.7.1.6 seems to allow "Queue<T>::FullQHandler" as
- >a qualified-type-name and thus as a type-specifier. Borland C++ 3.0
- >however does not allow it, simply saying "Declaration syntax error"
- >If this is not a Borland Bug, how do I do it????
-
- I believe it is a Borland bug. I reported it back in Dec. 91 but they
- didn't fix it in 3.1. Can someone confirm that it is a bug? BC++
- seems to really get confused with templates when you start playing
- around with nested types and with friends. Other than using the real
- type, I don't know of a workaround for this bug.
-
- Btw, I send all BC++ bugs I find to bugs@borland.com (just for
- reports, no reply) and to the the (unofficial) TC++/BC++ mailing list
- TCPLUS-L. To subscribe, send mail to listserv@ucf1vm.cc.ucf.edu
- containing the line:
- subscribe tcplus-l Your Name
-
- BC++ 3.1 fixed a lot of 3.0 bugs, but it still has several, mostly
- template-related bugs. I can send you a copy of my 3.0 or 3.1 bug
- reports if you like.
-
- Jamshid Afshar
- jamshid@emx.utexas.edu
-