This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: template type problem
- To: help-gcc at gnu dot org
- Subject: Re: template type problem
- From: "Yuriy Vaysman" <yvaysman at pactolus dot com>
- Date: Tue, 5 Oct 1999 13:43:09 -0400
- Newsgroups: gnu.gcc.help
- Organization: MindSpring Enterprises
- References: <7tb8tj$ir9$1@nntp9.atl.mindspring.net>
- Xref: wodc7nx0 gnu.gcc.help:1278
I found a solution to my problem.
Instead of writing:
> return static_cast<BaseStruct*>(pNewObj);
one should write
return static_cast<typename T::BaseStruct*>(pNewObj);
Typename declaration that I had:
> typename T::BaseStruct;
is unnecessary.
- Yuri