Outside array bounds
Alex
sascha.orlov at gmail.com
Sat Jul 7 12:13:21 UTC 2018
On Saturday, 7 July 2018 at 11:22:38 UTC, Timoses wrote:
>
> Aw, got it. So args is actually a tuple type where accessing
> beyond the defined tuple (T) is invalid?
>
> auto a = [1, 2, 4];
> // works
> pragma(msg, typeof(a[3]));
>
> auto t = tuple(3, 4, 5.3);
> // ERROR:
> // pragma(msg, typeof(t[3]));
Yes. The absence of the next element in the array, doesn't
matter, while asking its type, while the absence of the next
tuple element means also the absence of any type, as I understand
it.
More information about the Digitalmars-d-learn
mailing list