https://issues.dlang.org/show_bug.cgi?id=15027

--- Comment #4 from Walter Bright <[email protected]> ---
The trouble is InputRange has to modify the range.

A solution is to rewrite DirEntry.name from:
        @property string name() const pure nothrow
        {
            return _name;
        }
to:
        string _name2;
        @property ref string name() return const pure nothrow
        {
            _name2 = _name;
            return _name2;
        }
but there'll be trouble with that if there are two calls to name() within the
same expression and both try to modify through the ref.

--

Reply via email to