Vector.opIndex

Returns reference to element at specified location pos.

  1. inout(ElementType)[] opIndex()
  2. inout(ElementType) opIndex(size_t pos)
    struct Vector
    ref inout scope pure nothrow @system @nogc
    opIndex
    (
    const size_t pos
    )

Examples

auto vec = Vector!(int, 10).build(1, 2, 3);

assert(vec[1] == 2);

Meta