On 12/12/2013 08:19 AM, Adam D. Ruppe wrote:

> Consider the following:
>
> struct JustZeroes {
>      int front = 0;
>      enum bool = false;

You meant empty = false;

>      void popFront() {}
> }
>
> Is that guaranteed to work as an input range?

Yes it is perfectly fine. And if it works for empty it should work for front. ;) The presence of std.range.hasLvalueElements is another indicator that it fine. Finally, if std.range.isInputRange returns true, it is an InputRange.

Ali

Reply via email to