I have my library module:
========================================================
module mylib.vector;
// alias Vector!(float, 4) Vector4f;
struct Vector(T, uint size)
{
T[size] array = 0;
...
}
========================================================
And I have client module:
========================================================
import mylib.vector;
alias Vector!(float, 4) Vector4f;
void main()
{
auto x = Vector4f([1.0f, 2.0f, 3.0f, 4.0f]);
}
========================================================
If alias would be in vector module (commented there) I will have
to compile
both modules (otherwise I'll get link errors for some vector
functions), but I want to simply import vector module and
immediately use predefined aliases for vector template struct.
How can I do this?