Set.opIndex

Returns a bidirectional range over the container.

  1. Range opIndex()
    struct Set(T, alias hasher = hash)
    opIndex
    ()
    if (
    isHashFunction!(hasher, T)
    )
  2. ConstRange opIndex()

Return Value

Type: Range

A bidirectional range that iterates over the container.

Examples

Set!int set;
assert(set[].empty);

set.insert(8);
assert(!set[].empty);
assert(set[].front == 8);
assert(set[].back == 8);

Meta