Bucket.remove

Looks up the element corresponding to key in this bucket and removes it, if found.

The removed element must be recycled by the owner of the bucket.

struct Bucket(size_t V, K = hash_t)
remove
(
K key
)
out (removed) { if (removed !is null) { assert (removed.next is null, "remove: forgot to clear removed.next"); debug(HostingArrayMapBucket) if (removed) { assert (removed.bucket is &this, "element to remove is not from this bucket"); removed.bucket = null; } } }

Parameters

key K

key of the element to remove

Return Value

Type: Element*

removed element or null if not found.

Meta