SList.empty

Check if the list is empty.

struct SList(T)
@nogc nothrow pure @safe const
bool
empty
()

Return Value

Type: bool

true if there are no nodes in the list; false otherwise.

Complexity: O(1).

Examples

SList!int sl;
assert(sl.empty);
size_t pos = 0;
sl.insert(pos, 1);
assert(!sl.empty);

Meta