type to be tested
true if R is an InputRange, false if not
import concepts.models: models; struct A {} struct B { void popFront(); @property bool empty(); @property int front(); } static assert(!isInputRange!A); static assert( isInputRange!B); static assert( isInputRange!(int[])); static assert( isInputRange!(char[])); static assert(!isInputRange!(char[4])); static assert( isInputRange!(inout(int)[]));
Returns true if R is an input range. An input range must define the primitives empty, popFront, and front. The following code should compile for any input range.
The following are rules of input ranges are assumed to hold true in all Phobos code. These rules are not checkable at compile-time, so not conforming to these rules when writing ranges or range based code will result in undefined behavior.
Also, note that Phobos code assumes that the primitives r.front and r.empty are O(1) time complexity wise or "cheap" in terms of running time. O() statements in the documentation of range functions are made with this assumption.