This is the mail archive of the gcc-prs@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]

Re: c++/9344: in template, typedef for reference return type cannot be used


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!
 


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