Mercurial > projects > dstress
changeset 573:56951036e398
mixing "static if" and "if"
Thomas Kuehne <thomas@kuehne.THISISSPAM.cn>
2005-06-10
news:oouon2-li3.ln1@lnews.kuehne.cn
author | thomask |
---|---|
date | Fri, 10 Jun 2005 17:21:54 +0000 |
parents | 139307e27398 |
children | 36e896c73c8a |
files | undefined/static_if_05_A.d undefined/static_if_05_B.d |
diffstat | 2 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/undefined/static_if_05_A.d Fri Jun 10 17:21:54 2005 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Thomas Kuehne <thomas-dloop@kuehne.THISISSPAM.cn> +// @date@ 2005-06-10 +// @uri@ news:oouon2-li3.ln1@lnews.kuehne.cn +// @desc@ mixing "static if" and "if" + +module dstress.undefined.static_of_05_A; + +int main(){ + const int i=1; + static if(i==1){ + return 0; + }else if(i==2){ + return 1; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/undefined/static_if_05_B.d Fri Jun 10 17:21:54 2005 +0000 @@ -0,0 +1,21 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Thomas Kuehne <thomas-dloop@kuehne.THISISSPAM.cn> +// @date@ 2005-06-10 +// @uri@ news:oouon2-li3.ln1@lnews.kuehne.cn +// @desc@ mixing "static if" and "if" + +module dstress.undefined.static_of_05_B; + +int main(){ + const int i=1; + if(i==1){ + return 0; + }else static if(i==2){ + return 1; + }else if(i==3){ + return 2; + } +}