1484
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Daniel <Daniel919@web.de>
|
|
6 // @date@ 2007-02-07
|
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=938
|
|
8 // @desc@ [Issue 938] struct with Tuple
|
|
9
|
|
10 module dstress.compile.t.tuple_21_A;
|
|
11
|
|
12 struct Tuple(A...) {
|
|
13 alias A Tuple;
|
|
14 }
|
|
15
|
|
16 template removeSpace(char[] s, int x = 0) {
|
|
17 static if (s[0] == ' '){
|
|
18 alias removeSpace!(s[1..$], x+1) removeSpace;
|
|
19 }else{
|
|
20 alias Tuple!(s, x) removeSpace;
|
|
21 }
|
|
22 }
|
|
23
|
|
24 static assert("Hello you !" == removeSpace!(" Hello you !").Tuple[0]);
|