Fix bug reported by downs. Related to delegate types within tuple template parameters.

This commit is contained in:
Christian Kamm
2008-11-18 17:14:57 +01:00
parent 41d9e79780
commit ccd8810e68
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
alias char[] string;
template Unstatic(T) { alias T Unstatic; }
template Unstatic(T: T[]) { alias T[] Unstatic; }
template StupleMembers(T...) {
static if (T.length) {
const int id=T[0..$-1].length;
const string str=StupleMembers!(T[0..$-1]).str~"Unstatic!(T["~id.stringof~"]) _"~id.stringof~"; ";
} else const string str="";
}
struct Stuple(T...) {
mixin(StupleMembers!(T).str);
}
Stuple!(string, void delegate(float)) foo;