G++ cannot use nested classes in template functions

Theodore Papadopoulo Theodore.Papadopoulo@sophia.inria.fr
Wed Jan 19 06:23:00 GMT 2000


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
 --------------------------------------------------------------------




More information about the Gcc-bugs mailing list