2.6 KiB
[numeric.requirements]
29 Numerics library [numerics]
29.2 Numeric type requirements [numeric.requirements]
Thecomplex andvalarray 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 theCpp17DefaultConstructible,Cpp17CopyConstructible,Cpp17CopyAssignable, andCpp17Destructible requirements ([utility.arg.requirements]).239
If any operation on T throws an exception the effects are undefined.
In addition, many member and related functions ofvalarray can be successfully instantiated and will exhibit well-defined behavior if and only ifT meets additional requirements specified for each such member or related function.
[Example 1:
It is valid to instantiatevalarray, butoperator>() will not be successfully instantiated forvalarray operands, sincecomplex does not have any ordering operators.
â end example]
In other words, value types.
These include arithmetic types, pointers, the library classcomplex, and instantiations ofvalarray for value types.