Generic Usenet Account wrote:[color=blue]
> This is a two-part question.
>
> (1) I have implemented a "Datastructure Registry" template class. I am
> getting no compiler warnings with older compilers, but newer compilers
> are generating the following error messages:
> warning: implicit typename is deprecated,
> please see the documentation for details[/color]
add 'typename' in the line of the error message. For details see:
http://womble.decadentplace.org.uk/c...plate-faq.html
[color=blue]
> Can someone kindly suggest how to get rid of these warnings? The
> source code follows.
>
> (2) I want to use the "Datastructure Registry" template class to
> implement a "Registry of Singletons", as mentioned in the GoF Design
> patterns book. For this I want to do something like this:
>
> typedefine the "Datastructure Registry" template-class as the "Registry
> of Singletons" template-class.
>
> I have tried various things, but nothing seems to be working.
>
> typedef DSRegistry SingletonRegistry;[/color]
What is DSRegistry? If It's a template you cannot typedef it like that.
[color=blue]
> typedef DSRegistry<class T> SingletonRegistry<class T>;
> typedef template DSRegistry<class T> template SingletonRegistry<class
> T>;
> typedef DSRegistry<class T> template SingletonRegistry<class T>;[/color]
You seem to be confused about templates and typedefs. They work
differently!