comparison tests/mini/compile_delegatetuple.d @ 772:cd7da2ba14d1

Fix bug reported by downs. Related to delegate types within tuple template parameters.
author Christian Kamm <kamm incasoftware de>
date Tue, 18 Nov 2008 17:14:57 +0100
parents
children
comparison
equal deleted inserted replaced
771:bfabbac8e705 772:cd7da2ba14d1
1 alias char[] string;
2 template Unstatic(T) { alias T Unstatic; }
3 template Unstatic(T: T[]) { alias T[] Unstatic; }
4 template StupleMembers(T...) {
5 static if (T.length) {
6 const int id=T[0..$-1].length;
7 const string str=StupleMembers!(T[0..$-1]).str~"Unstatic!(T["~id.stringof~"]) _"~id.stringof~"; ";
8 } else const string str="";
9 }
10
11 struct Stuple(T...) {
12 mixin(StupleMembers!(T).str);
13 }
14 Stuple!(string, void delegate(float)) foo;