simple struct template
Hendrik Renken
funsheep at gmx.net
Fri Mar 30 04:40:52 PDT 2007
Hi,
i've wrote a simple struct template:
struct Vector(T)
{
T x;
T y;
T z;
}
now i would like to define some aliases to make my programming life easier:
Vectorf for Vector!(float)
Vectord for Vector!(double)
void main(char[][] args)
{
Vectorf v;
v.x = 0.2f;
}
is that possible? i tried
mixin Vector!(float) Vectorf;
alias Vector!(float) Vectorf;
with gdc 0.23. both dont work.
regards
Hendrik
More information about the Digitalmars-d-learn
mailing list