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]

Re: G++ cannot use nested classes in template functions


I think that the problem is with your code. You have to hint the 
compiler that T::inside is a type. Using:

template <class T>
void f(const T& t)
{
  typename T::Inside i;
}

solves your problem (at least with gcc-2.95.2 and gcc-current since I 
do not have gcc-2.8.1 handy).

	Theo.

--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



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