E
esuvs81
Hi all, i have a Vector class (as in mathematical vectors) which is
templatised on two parameters, the length of the vector and it's type
(int,double,etc). I am able to use a typedef like the folowing:
typedef Vector<3,float> Vector3DFloat;
Vector3DFloat myVector;
so that users can now use Vector3DFloat as a type in thier code.
However, i would like to just typedef away *one* of the parameters
which i would expect to look something like the following:
typedef Vector<3,Type> Vector3D<Type>;
Vector3D<float> myVector;
The above doesn'tcompile but hopefully illustrates what I am trying to
do. Is there a way to make this work?
Thanks,
David
templatised on two parameters, the length of the vector and it's type
(int,double,etc). I am able to use a typedef like the folowing:
typedef Vector<3,float> Vector3DFloat;
Vector3DFloat myVector;
so that users can now use Vector3DFloat as a type in thier code.
However, i would like to just typedef away *one* of the parameters
which i would expect to look something like the following:
typedef Vector<3,Type> Vector3D<Type>;
Vector3D<float> myVector;
The above doesn'tcompile but hopefully illustrates what I am trying to
do. Is there a way to make this work?
Thanks,
David