This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Two-stage name lookup problem
- From: John Love-Jensen <eljay at adobe dot com>
- To: Jakub Pawlewicz <jakub dot pawlewicz at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 26 Oct 2005 07:47:31 -0500
- Subject: Re: Two-stage name lookup problem
Hi Jakub,
Your problem is not with templates.
Here's your problem in a nutshell...
struct A
{
int x;
struct B
{
A a;
};
};
You cannot use A within B, because at that point A is incomplete.
You can pull B out of A. If you want B to be in the A namespace, change
'struct A' to 'namespace A', and make 'struct A_impl', fully declared, and
then use that within 'struct B'.
HTH,
--Eljay