The member
operator[] is overloaded to provide several ways to select
sequences of elements from among those controlled by
*this. Each of these
operations returns a subset of the array
. The const-qualified versions return this
subset as a new
valarray object
. The non-const versions return a class
template object which has reference semantics to the original array, working in
conjunction with various overloads of
operator= and other assigning
operators to allow selective replacement (slicing) of the controlled sequence
. In each case the selected element(s) shall exist
.