[Dev-C++] [C++] are templated typedefs possible?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Paul P. <pog...@gm...> - 2005-02-18 13:29:16
|
Hi.
Suppose I have a code like this:
=09template <class X, typename T>
=09class I {
=09 ...
=09};
=09class A {
=09 ...
=09};
and would like to define `IA <T>' to be exactly the same type as `I <A, T=
>'.
Sort of a templated typedef. However, what comes to mind doesn't work:
=09template <typename T>
=09typedef I <A, T> IA;
=09test.cpp:18: template declaration of `typedef class I<A, T> IA'
or like this:
=09template <typename T>
=09typedef I <A, T> IA <T>;
=09test.cpp:18: template-id `IA<T>' used as a declarator
=09test.cpp:18: template declaration of `typedef class I<A, T> IA'
Is there a way to do this in C++?
Paul
P.S. I'm not subscribed, please CC me.
|