Summary: struct with @disable this cannot make range
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Kenji Hara <> 2011-11-12 01:11:57 PST ---
Following code should compile, but doesn't.

import std.range;
struct R
    @disable this();  // requires explicit initializer

    @property bool empty() const{ return false; }
    @property int front(){ return 0; }
    void popFront(){}

    @property R save(){ return this; }

    int back(){ return 0; }
    void popBack(){}

    int opIndex(size_t n){ return 0; }
    @property size_t length() const { return 0; }
static assert(isInputRange!R);
static assert(isForwardRange!R);
static assert(isBidirectionalRange!R);
static assert(isRandomAccessRange!R);

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to