valarray::valarray

valarray();
explicit valarray(size_t n);
valarray(const T& val, size_t n));
valarray(const T *p, size_t n);
valarray(const slice_array<T>& sa);
valarray(const gslice_array<T>& ga);
valarray(const mask_array<T>& ma);
valarray(const indirect_array<T>& ia);

The first (default) constructor initializes the object to an empty array. Each of the next three constructors initializes the object to an array of n elements as follows:

Each of the remaining constructors initializes the object to a valarray<T> object determined by the argument.