home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12351 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  2.1 KB

  1. 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
  2. From: jamshid@ut-emx.uucp (Jamshid Afshar)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Class Template Member Function returning pointer to function
  5. Summary: I think it's a Borland bug
  6. Message-ID: <77688@ut-emx.uucp>
  7. Date: 14 Aug 92 09:16:11 GMT
  8. References: <1992Aug7.204148.20180@cunews.carleton.ca>
  9. Reply-To: jamshid@emx.utexas.edu
  10. Organization: The University of Texas at Austin; Austin, Texas
  11. Lines: 38
  12.  
  13. In article <1992Aug7.204148.20180@cunews.carleton.ca> nholtz@zonker.cascade.carleton.ca (Neal Holtz) writes:
  14. >    template <class T>
  15. >    class Queue {
  16. >      public:
  17. >        typedef void (*FullQHandler)(Queue<T>&);
  18. >        FullQHandler setHandler( FullQHandler fn );
  19. >    };
  20. >[...]
  21. >An obvious thought might be to fully qualify the typedef name and
  22. >do this:
  23. >    template <class T>
  24. >    Queue<T>::FullQHandler
  25. >    Queue<T>::setHandler( Queue<T>::FullQHandler fn ) { ... }
  26. >
  27. >I haven't checked all of the rules in the ARM or in C++PL2, but the
  28. >latter in section r.7.1.6 seems to allow "Queue<T>::FullQHandler" as
  29. >a qualified-type-name and thus as a type-specifier.  Borland C++ 3.0
  30. >however does not allow it, simply saying "Declaration syntax error"
  31. >If this is not a Borland Bug, how do I do it????
  32.  
  33. I believe it is a Borland bug.  I reported it back in Dec. 91 but they
  34. didn't fix it in 3.1.  Can someone confirm that it is a bug?  BC++
  35. seems to really get confused with templates when you start playing
  36. around with nested types and with friends.  Other than using the real
  37. type, I don't know of a workaround for this bug.
  38.  
  39. Btw, I send all BC++ bugs I find to bugs@borland.com (just for
  40. reports, no reply) and to the the (unofficial) TC++/BC++ mailing list
  41. TCPLUS-L.  To subscribe, send mail to listserv@ucf1vm.cc.ucf.edu
  42. containing the line:
  43.    subscribe tcplus-l Your Name
  44.  
  45. BC++ 3.1 fixed a lot of 3.0 bugs, but it still has several, mostly
  46. template-related bugs.  I can send you a copy of my 3.0 or 3.1 bug
  47. reports if you like.
  48.  
  49. Jamshid Afshar
  50. jamshid@emx.utexas.edu
  51.