This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Template and typedef
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Julien Allali <allali at univ-mlv dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: 14 Dec 2001 08:23:29 -0200
- Subject: Re: Template and typedef
- Organization: GCC Team, Red Hat
- References: <3C19CDB9.99B39A19@univ-mlv.fr>
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