Consider this structure:
To create a structure you type:Code:template<class T = double> struct Vector { Vector() { x = T(0); y = T(0); } ... T x; T y; }
However the <> is still needed even when using the default type. From a pedantic and visual standpoint I really find this ugly. Is there any way to make this work:Code:Vector<float> v1; Vector<> v2; //T = double
(without typedefing and appending letters like Vectorf, Vectord, Vectori etc...)Code:Vector<float> v1; Vector v2; //T = double
?