List.empty

Returns whether the list is empty (i.e. whether its length is 0).

struct List
@property const scope pure nothrow @safe @nogc
bool
empty
()

Examples

List!(int) list;
assert(list.empty);

list.append(42);
assert(!list.empty);

Meta