You may be right there. The reason why I wanted this to work is because
this doesn't:
template TFunc(T) {
...
}
TFunc!(extern(Windows) int function(int));
A nice workaround would have been to have another template apply the
calling convention:
template ExternWindows(T) {
extern(Windows) alias T ExternWindows;
}
TFunc!(ExternWindows!(int function(int, char*, char*, int));
I guess I'm now wondering why extern can't be used inline. It'd be
useful in the above situation, and on anonymous function literals.
John.

You may be right there. The reason why I wanted this to work is because
this doesn't:
template TFunc(T) {
...
}
TFunc!(extern(Windows) int function(int));
A nice workaround would have been to have another template apply the
calling convention:
template ExternWindows(T) {
extern(Windows) alias T ExternWindows;
}
TFunc!(ExternWindows!(int function(int, char*, char*, int));

No, "extern" has to go before "alias". In your code the calling
convention has been ignored. And mangleof shows that: 'F' signifies
functions with the D calling convention, 'W' functions with the Windows
calling convention.

No, "extern" has to go before "alias". In your code the calling
convention has been ignored. And mangleof shows that: 'F' signifies
functions with the D calling convention, 'W' functions with the Windows
calling convention.

I stand corrected then :)
Too bad the compiler does not complain, I even compiled it with warnings on.
L.