Template and typedef
Alexandre Oliva
aoliva@redhat.com
Fri Dec 14 02:46:00 GMT 2001
On Dec 14, 2001, Julien Allali <allali@univ-mlv.fr> wrote:
> template<class T>
> typedef C<T,B> toto;
> I know that a solution is
> template<class T>
> class toto : C<T,B>
> {...};
> But this is really not a good way :)
Actually, a better solution is:
template <class T>
class toto { public: typedef C<T,B> t; };
...
toto<T>::t
> PS: if this functionnality can be present in futur release, it'll be
> realy nice.
It is not Standard C++, and I don't think it's planned to introduce it
as a language extension, given how easy it is to work around it.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc
mailing list