home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / cplus / 18277 < prev    next >
Encoding:
Text File  |  1992-12-21  |  798 b   |  30 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!debbie!johnh
  3. From: johnh@tt.com (John Hasselkus)
  4. Subject: Template member functions?
  5. Message-ID: <1992Dec21.161124.3196@debbie>
  6. Sender: news@debbie
  7. Nntp-Posting-Host: debbie
  8. Organization: Telecommunications Techniques Corporation, Germantown MD
  9. Date: Mon, 21 Dec 1992 16:11:24 GMT
  10. Lines: 18
  11.  
  12. I though I recall this being discussed recently, but I didn't need to know
  13. until now. :)
  14.  
  15. Is is possible to make a template member function of a class that is not a
  16. template class?
  17.  
  18. For example:
  19.  
  20. class FOO {
  21.   public:
  22.     void bar (A a);     <- I would like (instead) to make bar be a template
  23.     void bar (B b);        function so that I don't have to recode the
  24.     void bar (C c);        algorithm used for "bar" 3 times.
  25. }
  26.  
  27. -- 
  28. John Hasselkus
  29. johnh@tt.com
  30.