Enum member isInputRange
Determines whether R is an input range.
enum isInputRange(R)
= true;
An input range should define following primitives:
- front
- empty
- popFront
Parameters
Name | Description |
---|---|
R | The type to be tested. |
Returns
true if R is an input range, false otherwise.
Example
static struct Range
{
void popFront() @nogc nothrow pure @safe
{
}
int front() @nogc nothrow pure @safe
{
return 0;
}
bool empty() const @nogc nothrow pure @safe
{
return true;
}
}
static assert(isInputRange!Range);
static assert(isInputRange!(int[]));
static assert(!isInputRange!(void[]));