cpp/numeric/valarray/mask array

is a helper template used by the valarray subscript operator with argument. It has reference semantics and provides access to the subset of the valarray consisting of the elements whose indices correspond to values in the  mask.