This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12464] Regression in 3.4: typedef in class not recognized


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12464



------- Additional Comments From gdr at integrable-solutions dot net  2003-09-30 16:30 -------
Subject: Re:  New: Regression in 3.4: typedef in class not recognized

"James dot W dot Mckelvey at jpl dot nasa dot gov" <gcc-bugzilla@gcc.gnu.org> writes:

[...]

| template <typename DataType>
| 
| class TemplateVariable
| {
| public:
| 
|     typedef int SetType;
| 
|     inline SetType operator=(int other) const;
| };
| 
| 
| template <typename DataType>
| TemplateVariable<DataType>::SetType TemplateVariable<DataType>::
 ^

Your program is ill-formed.  There is a missing "typename" to tell the
compiler that TemplateVariable<DataType>::SetType is a typename.  See
our FAQ.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]