Correction - Was: [Dev-C++] typedef problem
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: stefan k. <ste...@ya...> - 2003-09-23 15:09:08
|
Never answer from pure memory... ;-)
The correct syntax (verified in .NET) is:
typedef class GenericIterator<T> BasicIterator;
Best,
Stefan
> Just type this:
>
> typedef template class GenericIterator<T> BasicIterator;
>
> That should work.
>
> Cheers,
> Stefan
>
> Marcos Cesar Carrard wrote:
>
>> Hello!
>>
>> I have a problem with a c++ library that I'm developing.I have one
>> class to
>> define a generic container and another class to a generic iterator,
>> like this:
>>
>> template <class T> class GenericIterator{
>> .....
>> };
>>
>> template <class T> class GenericContainer{
>> ....
>> typedef GenericIterator<T> BasicIterator;
>> ....
>> };
>>
>> When this code is compiled, there was several warnings messages in the
>> typedef
>> inside of container class and in that locals where I use
>> BasicIterator. The
>> warnings are like "implicit typename is deprecated, see documentation".
>> However, I need this type definition to allow a iterator declaration
>> through the
>> container class, like:
>>
>> int main()
>> {
>> Container<int> c;
>> Container<int>::BasicIterator i;
>> ....
>> }
>>
>> How can I do to make this without error and/or warnings messages?
>>
>> Thanks,
>>
>> Marcos
>>
>>
>>
>> -------------------------------------------------------
>> This sf.net email is sponsored by:ThinkGeek
>> Welcome to geek heaven.
>> http://thinkgeek.com/sf
>> _______________________________________________
>> Dev-cpp-users mailing list
>> Dev...@li...
>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|