home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1834 < prev    next >
Encoding:
Text File  |  1992-12-18  |  1.4 KB  |  40 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  3. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  4. Subject: Re: Pointer comparisons and templates
  5. Message-ID: <1992Dec17.214138.9122@ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  9. References: <1992Dec14.075853.3399@lth.se> <1992Dec15.164854.13070@ucc.su.OZ.AU> <1992Dec15.222952.17059@lth.se>
  10. Date: Thu, 17 Dec 1992 21:41:38 GMT
  11. Lines: 27
  12.  
  13. In article <1992Dec15.222952.17059@lth.se> dag@bellman.control.lth.se (Dag Bruck) writes:
  14. >
  15. >The first error I made, and the fact that nobody found it, is a strong
  16. >indication that specialization of templates is a real complication.
  17. >
  18.  
  19.     Partly because the type system is not so hot either.
  20. When you instantiate a template
  21.  
  22.     int i;
  23.     f(i);
  24.  
  25. what get generated? f(int)? f(const int)? f(int&)? f(const int&)?
  26. (and 4 more cases involving volatile)
  27.  
  28. IMHO all 8 of these functions should be considered redefintions:
  29.  
  30.     f(int);
  31.     f(int&); // error, redefinition
  32.     f( .. ) // as above for all the 6 other cases
  33.  
  34.  
  35. -- 
  36. ;----------------------------------------------------------------------
  37.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  38.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  39. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  40.