valarray();
explicit valarray(size_t n);
Effects: Constructs a valarray that has length n. Each element of the array is value-initialized.
valarray(const T& v, size_t n);
Effects: Constructs a valarray that has length n. Each element of the array is initialized with v.
valarray(const T* p, size_t n);
Requires: p points to an array ([dcl.array]) of at least n elements.
Effects: Constructs a valarray that has length n. The values of the elements of the array are initialized with the first n values pointed to by the first argument.278
valarray(const valarray& v);
valarray(valarray&& v) noexcept;
Effects: Constructs a valarray that has the same length as v. The elements are initialized with the values of the corresponding elements of v.
valarray(initializer_list<T> il);
valarray(const slice_array<T>&);
valarray(const gslice_array<T>&);
valarray(const mask_array<T>&);
valarray(const indirect_array<T>&);
~valarray();
Effects: The destructor is applied to every element of *this; an implementation may return all allocated memory.
This default constructor is essential, since arrays of valarray may be useful. After initialization, the length of an empty array can be increased with the resize member function.
This constructor is the preferred method for converting a C array to a valarray object.
This copy constructor creates a distinct array rather than an alias. Implementations in which arrays share storage are permitted, but they shall implement a copy-on-reference mechanism to ensure that arrays are conceptually distinct.