Article View: comp.std.c++
Article #3443Re: template typedef
From: Scott Howlett
Date: Mon, 19 Feb 1996 02:29
Date: Mon, 19 Feb 1996 02:29
29 lines
1531 bytes
1531 bytes
jonathan.k.armstrong@cdev.com (J. Karl Armstrong) wrote:
> Is there any reason why template typedefs are not allowed? Something like:
>
> template <class T>
> typedef T *GeneralPointer;
>
> GeneralPointer<int> iptr;
>
> Trivial example, I know, but there are reasons I would like this.
I would find this convenient as well, but it's easy to get this
functionality in a slightly different way (and perhaps this is the reason
that it isn't supported directly?):
template <class T> struct foo {
typedef T * GeneralPointer;
};
foo<T>::GeneralPointer iptr;
--
Scott Howlett, howlett@netcom.com
"Probably the earliest fly swatters were nothing more than some sort of
striking surface attached to the end of a long stick."
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. Moderation policy:
http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Technical Details
Message-ID:
<199602181812.KAA17074@netcom21.netcom.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<jonathan.k.armstrong-1602961624250001@mac-nro.denver.cdev.com>Show Full Headers
Complete Article Headers
From: howlett@netcom.com (Scott Howlett) Message-ID: <199602181812.KAA17074@netcom21.netcom.com> X-Original-Date: Sun, 18 Feb 1996 10:12:14 -0800 Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 19 Feb 96 02:29:16 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ Subject: Re: template typedef References: <jonathan.k.armstrong-1602961624250001@mac-nro.denver.cdev.com> Organization: (or lack thereof) X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMSfgiOEDnX0m9pzZAQHLggF+Oxh/z69E1ZqYVThDY0Nft4uxYhgXovdu 1miYNlWtoGeZN6/SlaY4FXbAYRJ1xjWy =15Uq