import std.range; /**Random access range based on an array, but w/o assignable or lvalue * elements.*/ struct ValArray { uint[] stuff; @property uint front() { return stuff[0]; } void popFront() { stuff = stuff[1..$]; } @property bool empty() { return stuff.length == 0; } @property uint back() { return stuff[$ - 1]; } void popBack() { stuff = stuff[0..$ - 1]; } uint opIndex(size_t index) { return stuff[index]; } @property typeof(this) save() { return this; } @property size_t length() { return stuff.length; } } void main() { auto stuff = ValArray([1u, 2U, 3U]); auto myZip = zip(stuff, stuff); } Error Msgs: d:\dmd2\windows\bin\..\..\src\phobos\std\range.d(1720): Error: cannot implicitly convert expression (&this.ranges._field_field_0.front) of type uint delegate() to uint* d:\dmd2\windows\bin\..\..\src\phobos\std\range.d(1720): Error: cannot implicitly convert expression (&this.ranges._field_field_1.front) of type uint delegate() to uint* d:\dmd2\windows\bin\..\..\src\phobos\std\range.d(1733): Error: cannot implicitly convert expression (&this.ranges._field_field_0.back) of type uint delegate() to uint* d:\dmd2\windows\bin\..\..\src\phobos\std\range.d(1733): Error: cannot implicitly convert expression (&this.ranges._field_field_1.back) of type uint delegate() to uint* Zip should detect whether the ranges it's fed offer lvalue access and properly relay this property.
Fixed SVN.