The
complex
and
valarray
components are parameterized by the type of information they contain and manipulate.
A C++ program shall instantiate these components only with a numeric type.
A numeric type is a cv-unqualified object type T
that meets the
Cpp17DefaultConstructible,
Cpp17CopyConstructible,
Cpp17CopyAssignable, and
Cpp17Destructible
requirements ([utility.arg.requirements]).223
In addition, many member and related functions of
valarray<T>
can be successfully instantiated
and will exhibit well-defined behavior if and only if
T meets additional requirements specified for each such member
or related function.
It is valid to instantiate
valarray<complex>,
but
operator>()
will not be successfully instantiated for
valarray<complex>
operands, since
complex
does not have any ordering operators.