home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!ut-emx!tivoli!foraker!taylor
- From: taylor@foraker.tivoli.com (Eric Taylor)
- Newsgroups: comp.lang.c++
- Subject: typedefs in template class definitions
- Message-ID: <7648@tivoli.UUCP>
- Date: 8 Jan 93 22:22:15 GMT
- Sender: news@tivoli.UUCP
- Lines: 22
-
- I am using GNU C++ ver. 2.3.3
-
- I am having problems with the following type of declaration:
-
- template <class T>
- class foo {
- typedef int bar ;
- void gag(bar x) ;
- } ;
-
- template <class T>
- void foo<T>::gag(bar x)
- {
- }
-
- It is as if bar was not entered into the symbol table as a typedef
- when parsing gag.
-
- It does not matter if I change bar to foo<T>::bar or foo::bar
- (actually, I get different messages).
-
- Am I doing something wrong, or is this a compiler bug?
-