Re: ndslice of an array structure member?

2015-12-21 Thread Jay Norwood via Digitalmars-d-learn
On Tuesday, 22 December 2015 at 01:13:54 UTC, Jack Stouffer wrote: The problem is that t3 is slicing a1 which is a dynamic array, which is a range, while t4 is trying to slice a static array, which is not a range. ok, thanks. I lost track of the double meaning of static ... I normally think

Re: ndslice of an array structure member?

2015-12-21 Thread Jack Stouffer via Digitalmars-d-learn
On Monday, 21 December 2015 at 23:59:07 UTC, Jay Norwood wrote: I'm trying to learn ndslice. It puzzles me why t3 compiles ok, but t4 causes a compiler error in the example below. Should I be able to slice a struct member that is an array? import std.stdio; import std.experimental.ndslice; i

ndslice of an array structure member?

2015-12-21 Thread Jay Norwood via Digitalmars-d-learn
I'm trying to learn ndslice. It puzzles me why t3 compiles ok, but t4 causes a compiler error in the example below. Should I be able to slice a struct member that is an array? import std.stdio; import std.experimental.ndslice; import std.experimental.ndslice.iteration: transposed; struct samp