You could always do it as a mixin.
string makeAliases() {
string code;
import std.conv;
foreach(type; ["float", "double", "int"])
foreach(n; 2 .. 5)
code ~= "alias Vector!("~type~", " ~ to!string(n) ~ ") vec" ~ to!string(n) ~ type[0] ~ ";\n";
return code;
}
mixin(makeAliases());
Generally, if you make a compile time evaluatable function that builds a string of code, you can then mixin(thatFunction(args...)); at some point and make it happen.
When debugging the function, you can just run it at runtime and writeln(thatFunction()) to see what code it generates.