http://d.puremagic.com/issues/show_bug.cgi?id=3894
Summary: std.range.Stride!R requires R.front() and R.back() to return by reference Product: D Version: 2.041 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@kyllingen.net --- Comment #0 from Lars T. Kyllingstad <bugzi...@kyllingen.net> 2010-03-08 03:58:32 PST --- Quoting Mihail Strashun on the digitalmars.D.learn newsgroup: --- Following simple program fails to compile with latest DMD 2.041 (In fact it fails to compile with any dmd2 version i have tried): "test.d" > import std.stdio; > import std.range; > import std.algorithm; > > int main() > { > auto test = stride( iota(0,10,1) , 2 ); > return 0; > } Output: [m...@mistwork d]$ dmd -run test.d /usr/include/d/std/range.d(716): Error: this._input.front() is not an lvalue /usr/include/d/std/range.d(724): Error: this._input.back() is not an lvalue --- The problem is that Stride.front() and Stride.back() are defined to return by reference, which is not the case for all ranges. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------