transposed with enforceNotJagged not throwing?

berni someone at somemail.de
Sat Sep 22 06:16:41 UTC 2018


I expect this small program to throw an Exception:

> import std.stdio;
> import std.range;
>
> void main()
> {
>     auto a = [[1,2],
>               [4,5,3]];
> 
>     a.transposed!(TransverseOptions.enforceNotJagged).writeln;
> }

But it just outputs:

> [[1, 4], [2, 5], [3]]

Is it a bug or is it me who's doing something wrong?


More information about the Digitalmars-d-learn mailing list