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

--- Comment #0 from Lars T. Kyllingstad <> 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):

> import std.stdio;
> import std.range;
> import std.algorithm;
> int main()
> {
>   auto test = stride( iota(0,10,1) , 2 );
>   return 0;
> }

[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:
------- You are receiving this mail because: -------

Reply via email to