DList.empty

Check if the list is empty.

struct DList(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

DList!int dl;
assert(dl.empty);
size_t pos = 0;
dl.insert(pos, 1);
assert(!dl.empty);

Meta