This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21575] definition member function of template class with nested class as return type
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2005 21:24:06 -0000
- Subject: [Bug c++/21575] definition member function of template class with nested class as return type
- References: <20050514212217.21575.wich@stack.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-14 21:24 -------
Invalid, you need the typename keyword, like so:
template<class T>
class foo {
public:
typedef T foo2;
foo2 bar();
};
template<class T>
typename foo<T>::foo2 foo<T>::bar() {
return foo2();
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21575