i386: Fix scalar VCOMSBF16 which only compares low word
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / test14962.d
blob69c0d89eb431f61a647954b04d9b72b9dcc0c146
1 template map(fun...)
3 auto map(R)(R r)
5 return MapResult!(fun, R)(r);
9 struct MapResult(alias fun, R)
11 R _input;
13 @property bool empty() { return _input.length == 0; }
14 @property auto front() { return fun(_input[0]); }
15 void popFront() { _input = _input[1..$]; }
18 struct Foo
20 int baz(int v)
22 static int id;
23 return v + id++;
25 void bar()
27 auto arr1 = [1, 2, 3];
28 auto arr2 = [4, 5, 6];
29 arr1.map!(
30 // lambda1
31 i =>
32 arr2.map!(
33 // lambda2
34 j =>
35 baz(i + j)
41 void main() {}