xxxxxxxxxx
import core.stdc.stdio;
struct Sint
{
int x;
this(int v) { x = v;}
}
extern(C) void main()
{
// No more TypeInfo error in this initializer
Sint[6] a1 = [Sint(1), Sint(2), Sint(3), Sint(1), Sint(2), Sint(3)];
foreach(si; a1) printf("%i\n", si.x);
// Arrays/slices of structs can now be compared
assert(a1[0..3] == a1[3..$]);
// No more linker error when comparing strings, either explicitly
// or implicitly such as in a switch.
auto s = "abc";
switch(s)
{
case "abc":
puts("Got a match!");
break;
default:
break;
}
// And the same goes for any byte-sized type
char[6] a = [1,2,3,1,2,3];
assert(a[0..3] >= a[3..$]);
puts("All the asserts passed!");
}