From 2354973211162033095
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,b39fa6eddecc0203
X-Google-Attributes: gidf78e5,public
From: vandevod@cs.rpi.edu (David Vandevoorde)
Subject: Re: typedefs and templates
Date: 1996/08/16
Message-ID: <xsoybjfs3ez.fsf@avs.cs.rpi.edu>#1/1
X-Deja-AN: 174574619
x-lines: 18
x-nntp-posting-host: avs.cs.rpi.edu
sender: vandevod@avs.cs.rpi.edu
references: <4v05f7$on6@shelob.aracnet.com>
content-length: 587
organization: RPI Computer Science
newsgroups: comp.std.c++
originator: clamage@taumet


>>>>> "SJ" == Scott Johnson <sj@aracnet.com> writes:
[...]
SJ> But is it legal (it don't work under GCC 2.7.2) to rename a template using
SJ> typedef?  And if it isn't, has this feature ever been considered?B

SJ> template <class T> class Foo;
SJ> template <class T> typedef Foo<T> Bar<T>;
SJ> typedef Bar< int >;	// instantiate Bar< int >, which is really Foo< int >

SJ> Or even, God forbid:

SJ> template <class T> typedef Pointer< T> T*;

Unfortunately not; typedef templates are not part of the
C++ language (yet; and almost certainly won't be part of
the first standard).

	Daveed


[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]



