home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16828 < prev    next >
Encoding:
Internet Message Format  |  1992-11-24  |  1.1 KB

  1. Xref: sparky comp.lang.c++:16828 comp.std.c++:1616
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!xjzhu
  4. From: xjzhu@math.uwaterloo.ca (Xiaojun Zhu)
  5. Subject: Can A<S> and A<S, T> coexist ?
  6. Message-ID: <By7Cr9.5K4@math.uwaterloo.ca>
  7. Keywords: template, different number of arguments
  8. Organization: University of Waterloo
  9. Date: Tue, 24 Nov 1992 04:06:45 GMT
  10. Lines: 23
  11.  
  12. Q: Can A<S> and A<S, T> coexist?
  13.  
  14. I.e., is the following declaration valid?
  15.  
  16. template<class S> class A{};
  17. template<class S, class T> class A{};
  18.  
  19. AT&T C++ V3.0 fails on comipling the above code. 
  20.  
  21. As I see it, since the two A's are accepting different number of arguments,
  22. there is no reason why such thing should not be allowed.
  23.  
  24. Any comments?
  25.  
  26.  
  27.  
  28. --------------------------------------------------------------
  29.    A template version of my signature class is under repair.
  30. Symptom: It dies without a warning if I use certain class 
  31.          as an argument.
  32.          
  33.                                        xjzhu@math.uwaterloo.ca
  34. --------------------------------------------------------------
  35.