[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it g++ bug with "typename"?
From: |
Paul Pluzhnikov |
Subject: |
Re: Is it g++ bug with "typename"? |
Date: |
Sun, 11 Mar 2007 06:57:20 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"Grizlyk" <grizlyk1@yandex.ru> writes:
> I am thinking: why if i will comment lines marked with '#' in the following
> example, all will be compiled, else will not:
You'll get better answers if you reduce your test case (or state
that you couldn't).
> 11.cpp:57: error: no type named 'Second' in 'class
> 11.cpp:57: error: Pxx::Puser::First<int, unsigned int>'
The error message appears to be mis-leading.
Here is what EDG parser reports:
"junk.cc", line 57: error: incomplete type is not allowed
typedef typename c_First::Second c_Second;
^
detected during:
instantiation of class "Pxx::Second<Tobj, c_First, c_Forth,
c_Third, Tuint> [with Tobj=int,
c_First=Pxx::Puser::First<int, uint>,
c_Forth=Pxx::Puser::Forth<int, uint>,
c_Third=Pxx::Puser::Third<int, uint>, Tuint=uint]" at
line 106
instantiation of class "Pxx::Puser::Second<Tobj, Tuint> [with
Tobj=int, Tuint=uint]" at line 14
instantiation of class "Pxx::First<Tobj, c_Second, Tuint> [with
Tobj=int, c_Second=Pxx::Puser::Second<int, uint>,
Tuint=uint]" at line 81
instantiation of class "Pxx::Puser::First<Tobj, Tuint> [with
Tobj=int, Tuint=uint]" at line 141
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.