mir_slice.popFrontAll

Peforms popFrontAll for all dimensions

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

Examples

import mir.ndslice.topology: iota, canonical;
auto v = [2, 3].iota.canonical;
v.popFrontAll;
assert(v == [[4, 5]]);

Meta