isRefInputRange

Returns true if R is a pseudo input range with ref return.

An input range must define the primitives empty, popFront, and front. The following code should compile for any input range.

R r;              // can define a range object
if (r.empty) {}   // can test for empty
r.popFront();     // can invoke popFront()
auto h = r.front; // can get the front of the range of non-void type

The last line fails if the underlying type is non-copyable. It is still possible to define a pseudo input range that works with non-copyable types by having r.front return a reference, but isInputRange will return false for it.

Members

Variables

isRefInputRange
enum bool isRefInputRange;
Undocumented in source.
isRefInputRange
enum bool isRefInputRange;
Undocumented in source.

Parameters

R

type to be tested

Return Value

true if R is a pseudo InputRange with ref front, false if not

Meta