mir_slice.popBackAll

Peforms popBackAll for all dimensions

  1. void popBackAll()
    struct mir_slice(Iterator_, size_t N_ = 1, SliceKind kind_ = Contiguous, Labels_...)
    @optmath
    static if(N > 1)
    static if(kind_ != SliceKind.contiguous)
    void
    popBackAll
    ()
    if (
    0 < N_ &&
    N_ < 255
    &&
    !(
    kind_ == Canonical &&
    N_ == 1
    )
    &&
    Labels_.length <= N_
    &&
    isIterator!Iterator_
    )
  2. alias popBackAll = popBack

Examples

import mir.ndslice.topology: iota, canonical;
auto v = [2, 3].iota.canonical;
v.popBackAll;
assert(v == [[0, 1]]);

Meta