And the first example still doesn't compile:

```
struct Range(R) {
        import std.array : empty, front, popFront;
    R range;
    bool empty() const { return range.empty; }
    auto front() const { return range.front; }
    void popFront() { range.popFront(); }
}

void main() {
    auto rng = Range!string("1234");
    assert(rng.front == '1');
}
```

onlineapp.d(11): Error: void has no value
onlineapp.d(11): Error: incompatible types for (rng.front) == ('1'): void and char
```
  • Bug? RazvanN via Digitalmars-d-learn
    • Re: Bug? Simen Kjærås via Digitalmars-d-learn
      • Re: Bug? RazvanN via Digitalmars-d-learn
    • Bug? Jack Applegame via Digitalmars-d-learn
      • Re: Bug? Jack Applegame via Digitalmars-d-learn
        • Re: Bug? Jack Applegame via Digitalmars-d-learn
      • Re: Bug? Adam D. Ruppe via Digitalmars-d-learn
        • Re: Bug? Jack Applegame via Digitalmars-d-learn
          • Re: Bug? Steven Schveighoffer via Digitalmars-d-learn
            • Re: Bug... Adam D. Ruppe via Digitalmars-d-learn
          • Re: Bug? Simen Kjærås via Digitalmars-d-learn
            • Re: Bug... Jack Applegame via Digitalmars-d-learn

Reply via email to