Bucket.add

Adds an element to the bucket.

The element is inserted as the first bucket element.

  1. Element* add(Element.Key key, Element* new_element)
  2. Element* add(Element* element)
    struct Bucket(size_t V, K = hash_t)
    add
    out { debug(HostingArrayMapBucket) { auto ptr1 = this.first; auto ptr2 = ptr1; while (ptr2 !is null) { ptr1 = ptr1.next; if (ptr2.next == null) break; else ptr2 = ptr2.next.next; assert (ptr1 !is ptr2, "Cyclic linked-list found"); } } }

Parameters

element Element*

element to add

Return Value

Type: Element*

element

Meta