Pretty much the title. Slices uses TypeInfo, which should be disallowed in betterC mode. --- import core.stdc.stdio; extern(C) void main() { static int[] a = [ 1, 2, 3, 4, 5, 6 ]; // Shouldn't be allowed printf("%lli", a.sizeof); // prints 16 instead of 24 } ---
A slice is a fat pointer, nothing more. So no direct dependency on TypeInfos and no reason to disallow them for -betterC.
Also, sizeof returns the size of the pointer + length, not the actual array.