Mercurial > projects > dstress
comparison run/mini/compile_delegatetuple.d @ 1628:c6ef09dfba4d
add mini test set from ldc project
author | Moritz Warning <moritzwarning@web.de> |
---|---|
date | Mon, 10 Jan 2011 19:47:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1627:e1b954780837 | 1628:c6ef09dfba4d |
---|---|
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; |