The OpenD Programming Language

mir_slice.opIndexOpAssign

  1. auto ref opIndexOpAssign(T value, size_t[N] _indices)
  2. void opIndexOpAssign(Slice!(RIterator, RN, rkind) value, Slices slices)
  3. void opIndexOpAssign(T[] value, Slices slices)
  4. void opIndexOpAssign(T value, Slices slices)
  5. void opIndexOpAssign(T concatenation, Slices slices)
    struct mir_slice(Iterator_, size_t N_ = 1, SliceKind kind_ = Contiguous, Labels_...)
    return scope
    static if(isMutable!DeepElement)
    void
    opIndexOpAssign
    (
    string op
    T
    Slices...
    )
    if (
    (
    isFullPureSlice!Slices ||
    isIndexedSlice!Slices
    )
    &&
    )
    if (
    0 < N_ &&
    N_ < 255
    &&
    !(
    kind_ == Canonical &&
    N_ == 1
    )
    &&
    Labels_.length <= N_
    &&
    isIterator!Iterator_
    )

Examples

Packed slices have the same behavior.

import mir.ndslice.allocation;
import mir.ndslice.topology : pack;
auto a = slice!int(2, 3).pack!1;

a[] += 9;
assert(a == [[9, 9, 9], [9, 9, 9]]);

Meta