www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3873] New: std.range.repeat should have popBack defined

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3873

           Summary: std.range.repeat should have popBack defined
           Product: D
           Version: 2.040
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: philippe.sigaud gmail.com


--- Comment #0 from Philippe Sigaud <philippe.sigaud gmail.com> 2010-03-04
14:59:19 CET ---
std.range.repeat does not define a popBack method and as such cannot be used as
a bidirectional range.

Here is the code with the (almost non-existent...) missing function:

struct Repeat(T)
{
    private T _value;
    ref T front() { return _value; }
    ref T back() { return _value; }
    enum bool empty = false;
    void popFront() {}
    void popBack() {}
    ref T opIndex(uint) { return _value; }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 04 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3873


Masahiro Nakagawa <repeatedly gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |repeatedly gmail.com


--- Comment #1 from Masahiro Nakagawa <repeatedly gmail.com> 2010-05-17
09:35:42 PDT ---
changeset 1517

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 17 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3873


Masahiro Nakagawa <repeatedly gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Masahiro Nakagawa <repeatedly gmail.com> 2010-06-13
13:08:38 PDT ---
Fixed dmd 2.047.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 13 2010