This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9344: in template, typedef for reference return type cannot be used
- From: florian dot kirsch at gmx dot net
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 16 Jan 2003 22:26:02 -0000
- Subject: Re: c++/9344: in template, typedef for reference return type cannot be used
- Reply-to: florian dot kirsch at gmx dot net
The following reply was made to PR c++/9344; it has been noted by GNATS.
From: florian.kirsch@gmx.net
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: c++/9344: in template, typedef for reference return type cannot be used
Date: Thu, 16 Jan 2003 23:16:49 +0100 (MET)
Hm, i just found out that my posted code is probably incorrect,
and that my problem can be solved by repeating the typename
in the function declaration. I am not sure what the standard says
here, though.
template<typename T> class Container {
public:
typedef typename std::vector<T>::reference ref;
typename Container<T>::ref foo() { } // works
};
Florian
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!