FixedSizeArray.opIndex

Use an index to access the array.

  1. T opIndex(size_t idx)
  2. const(T) opIndex(size_t idx)
    struct FixedSizeArray(T, size_t Size = 32)
    pragma(inline, true) ref @trusted const
    const(T)
    opIndex
    (
    const size_t idx
    )

Examples

FixedSizeArray!(int,32) fsa;
fsa.insertBack(1337);
fsa.insertBack(1338);
assert(fsa.length == 2);

assert(fsa[0] == 1337);
assert(fsa[1] == 1338);

Meta