Set.clear

Removes all elements.

struct Set(T, alias hasher = hash)
void
clear
()
if (
isHashFunction!(hasher, T)
)

Examples

Set!int set;
set.insert(5);
assert(!set.empty);
set.clear();
assert(set.empty);

Meta