home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1831 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.0 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!umn.edu!csus.edu!borland.com!pete
  2. From: pete@borland.com (Pete Becker)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Template names
  5. Message-ID: <1992Dec17.172510.27088@borland.com>
  6. Date: 17 Dec 92 17:25:10 GMT
  7. References: <TEUBEN.92Dec16162305@lynx.astro.umd.edu>
  8. Sender: news@borland.com (News Admin)
  9. Distribution: comp
  10. Organization: Borland International
  11. Lines: 24
  12. Originator: pete@genghis.borland.com
  13.  
  14. In article <TEUBEN.92Dec16162305@lynx.astro.umd.edu> teuben@lynx.astro.umd.edu (Peter Teuben) writes:
  15. >
  16. >If one defines a template as e.g.
  17. >
  18. >  template <class T> class star {
  19. >    ...
  20. >  };
  21. >
  22. >and also define a real class with that same 'template' name, i.e.
  23. >
  24. >  class star {
  25. >        ...
  26. >  };
  27. >
  28. >the Borland C++ compiler (3.0) complains. Can anybody confirm if this 
  29. >is a Borland bug?
  30.  
  31.     I hope not, since it isn't a bug.  ARM, section 14.2:
  32.  
  33.     A class template name must be unique in a program and may not
  34.     be declared to refer to any other template, class, function,
  35.     object, value, or type in the same scope.
  36.  
  37.     -- Pete
  38.