annotate compile/t/template_44_B.d @ 1320:daef239f37cf

sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author thomask
date Sun, 31 Dec 2006 19:59:08 +0000
parents 8c53d3cfa6f6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1145
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
1 // $HeadURL$
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
2 // $Date$
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
3 // $Author$
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
4
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg@iname.com>
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
6 // @date@ 2006-09-16
1320
daef239f37cf sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents: 1145
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=351
1145
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
8 // @desc@ [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
9
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
10 module dstress.compile.t.template_44_B;
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
11
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
12 template Reverse(char[] s : "") {
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
13 const char[] Reverse = "";
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
14 }
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
15
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
16 template Reverse(char[] s) {
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
17 const char[] Reverse = Reverse!(s[1 .. s.length]) ~ s[0];
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
18 }
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
19
8c53d3cfa6f6 [Issue 351] New: Recursive string template doesn't work if the terminating specialisation is given first
thomask
parents:
diff changeset
20 static assert(Reverse!("abcD") == "Dcba");