Range primitives
Access to maximal length of the range. Note: the actual length of the range depends on the underlying range. If it has fewer elements, it will stop before maxLength is reached.
Range primitives
User accessible in read and write
array range
1 import nxt.dynamic_array : SA = DynamicArray; 2 import std.traits : isIterable; 3 import std.range.primitives : isInputRange; 4 alias C = SA!int; 5 6 auto cs = C([11, 13].s).intoUniqueRange; 7 8 alias CS = typeof(cs); 9 static assert(isInputRange!(typeof(cs))); 10 static assert(isIterable!(typeof(cs))); 11 12 assert(cs.front == 11); 13 cs.popFront(); 14 15 assert(cs.front == 13); 16 cs.popFront(); 17 18 assert(cs.empty);