This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: G++ cannot use nested classes in template functions
- To: David Smith <smithd at pia dot bt dot co dot uk>
- Subject: Re: G++ cannot use nested classes in template functions
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Wed, 19 Jan 2000 15:21:26 +0100
- cc: gcc-bugs at gcc dot gnu dot org, dagsmith at dagsemail dot freeserve dot co dot uk
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
--------------------------------------------------------------------