Mercurial > projects > dstress
changeset 819:cdf2bcfd23f9
Sean Kelly <sean@f4.ca>
2006-02-09
news:dsgsrf$2u4h$1@digitaldaemon.com
author | thomask |
---|---|
date | Sat, 11 Feb 2006 09:33:22 +0000 |
parents | 21a9e3e2dbb1 |
children | 211fe82a7f72 |
files | run/t/template_28_A.d |
diffstat | 1 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_28_A.d Sat Feb 11 09:33:22 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-09 +// @uri@ news:dsgsrf$2u4h$1@digitaldaemon.com + +module dstress.run.t.template_28_A; + +struct Empty{ +} + +class Tuple(HeadType, TailType){ +} + +template MakeTuple(T1, T2){ + alias Tuple!(T1, Tuple!(T2)) MakeTuple; +} + +template MakeTuple(T1=Empty, T2=Empty, T3=Empty){ + static if(is(T1 == Empty)) + alias Empty MakeTuple; + else + alias Tuple!(T1,MakeTuple!(T2,T3)) MakeTuple; +} + +int main(){ + auto t = new MakeTuple!(int,int)(); + return 0; +} +