home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!cs.utexas.edu!wupost!udel!darwin.sura.net!jvnc.net!newsserver.jvnc.net!newsserver.technet.sg!arthur
- From: arthur@solomon.technet.sg (Arthur Sombrito)
- Subject: About class template names
- Message-ID: <C0H9sA.BGw@newsserver.technet.sg>
- Sender: news@newsserver.technet.sg
- Nntp-Posting-Host: solomon.technet.sg
- X-Newsreader: TIN [version 1.1 PL8]
- Date: Thu, 7 Jan 1993 09:45:44 GMT
- Lines: 17
-
- Hi,
-
- According to the ARM, a class template name must be unique in a program
- and may not be declared to refer to any other template, class, function,
- object, value, or type in the same scope.
-
- Does this mean that a name previously used as a class template name
- can't be reused in another scope? For example:
-
- template <class T> class U {};
- enum U {}; // This should be an error. I am wondering why GNU
- // and Borland accepted this.
- f() {
- union U {}; // So is this an error?
- }
-
- Thanks for any replies.
-