use of typeof to determine auto type with ndslice examples

Jay Norwood via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 20 20:23:52 PST 2015


import std.stdio;
import std.experimental.ndslice;

void main() {
     import std.algorithm.iteration: map;
     import std.array: array;
     import std.range;
     import std.traits;
     auto t0 = 1000.iota.sliced(3, 4, 5);

     pragma(msg, typeof(t0));
	Slice!(3u, Result) t1 = 1000.iota.sliced(3, 4, 5);

darn, I didn't duplicate the problem correctly.  It should be as 
above.

and the error is:

Slice!(3u, Result)
src\app.d(12,2): Error: undefined identifier 'Result'
dmd failed with exit code 1.


More information about the Digitalmars-d-learn mailing list