[Bug c++/19188] friend funtion inside a template class seems to have a problem
max656 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 30 07:41:00 GMT 2004
------- Additional Comments From max656 at hotmail dot com 2004-12-30 07:41 -------
Thanks for the reply.
In this one line of code
tstack<T>::link* p;
"tstack<T>::link " is a typename. so I can not give another name.
Actually, I got other ways to get around this problem.
But I am interested in this style as well.
The code I am experimenting came from Bruce Eckel's old book.
The 2nd edtion uses a different way from this.
Anyway the definition of "tstack<T>::link" is not created inside the class. it
is used only to declare a private pointer variable named "head".Actually it is
NOT defined. I think that's why g++ (GCC) 3.2.3 20030502 give the warning of
"implicite typename". But a new version, g++ 3.4.1, checks it out and send out a
error message of "../14/tstack.h:68: error: expected `;' before '*' token". I
don't have any idea of what this means. It does not make any sense at all.
Would you take a look at it and reply to me ?
I really appreciate it in advance.
Tyson
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19188
More information about the Gcc-bugs
mailing list