Range type.
$(D_KEYWORD true) if R has lvalue elements, $(D_KEYWORD false) otherwise.
static struct R1 { enum bool empty = false; int front() @nogc nothrow pure @safe { return 5; } void popFront() @nogc nothrow pure @safe { } } static assert(!hasLvalueElements!R1); static struct R2 { int element; enum bool empty = false; ref const(int) front() const @nogc nothrow pure @safe { return element; } void popFront() @nogc nothrow pure @safe { } ref const(int) opIndex(size_t) const @nogc nothrow pure @safe { return element; } } static assert(hasLvalueElements!R2);
Determines whether R provides access to its elements by reference.