|
From: stefan k. <ste...@ya...> - 2003-09-23 14:49:10
|
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
>
|