Voting For std.experimental.ndslice
Márcio Martins via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 29 06:51:37 PST 2015
On Tuesday, 29 December 2015 at 13:54:56 UTC, Jack Stouffer wrote:
> On Tuesday, 29 December 2015 at 13:30:47 UTC, Márcio Martins
> wrote:
>> If I am reading the code right, the number of dimensions must
>> always be known at compile time, right?
>
> Not necessarily. The dimensions for this slice are computed at
> runtime.
>
> ```
> auto slice = 1000.iota.sliced(5, 6, 7);
> ```
```
With this declaration:
```
struct Slice(size_t _N, _Range)
```
_N, the number of dimensions, must necessarily be known at
compile-time, right?
More information about the Digitalmars-d
mailing list