Common mathematical functions | |||||||||||||||||||||||||||||||
Mathematical special functions(C++17) | |||||||||||||||||||||||||||||||
Mathematical constants(C++20) | |||||||||||||||||||||||||||||||
Basic linear algebra algorithms(C++26) | |||||||||||||||||||||||||||||||
Data-parallel types (SIMD)(C++26) | |||||||||||||||||||||||||||||||
Floating-point environment(C++11) | |||||||||||||||||||||||||||||||
Complex numbers | |||||||||||||||||||||||||||||||
Numeric array (valarray ) | |||||||||||||||||||||||||||||||
Pseudo-random number generation | |||||||||||||||||||||||||||||||
Bit manipulation(C++20) | |||||||||||||||||||||||||||||||
Saturation arithmetic(C++26) | |||||||||||||||||||||||||||||||
Factor operations | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
Interpolations | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
Generic numeric operations | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
C-style checked integer arithmetic | |||||||||||||||||||||||||||||||
|
Member functions | |||||||||||||||||||||
| |||||||||||||||||||||
Non-member functions | |||||||||||||||||||||
Exponential functions | |||||||||||||||||||||
Power functions | |||||||||||||||||||||
Trigonometric functions | |||||||||||||||||||||
Hyperbolic functions | |||||||||||||||||||||
Helper types | |||||||||||||||||||||
(C++26) | |||||||||||||||||||||
(C++26) |
All specializations | ||
(1) | ||
complex& operator=(const complex& cx); | (until C++20) | |
constexpr complex& operator=(const complex& cx); | (since C++20) | |
(2) | ||
template<class X> complex& operator=(conststd::complex<X>& cx); | (until C++20) | |
template<class X> constexpr complex& operator=(conststd::complex<X>& cx); | (since C++20) | |
Primary template complex<T> | ||
(3) | ||
complex& operator=(const T& x); | (until C++20) | |
constexpr complex& operator=(const T& x); | (since C++20) | |
Specializations for standard floating-point types complex<F> (until C++23) | ||
(3) | ||
complex& operator=( F x); | (until C++20) | |
constexpr complex& operator=( F x); | (since C++20) (until C++23) | |
Assigns new values to the contents.
T
is a floating-point type.(since C++23)Contents |
x | - | value to assign |
cx | - | complex value to assign |
*this
The copy assignment operator is required to betrivial since C++23, but implementations generally make it trivial in all modes.
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 3935 | C++98 | the description of overload(2) was missing | added |
constructs a complex number (public member function)[edit] | |
astd::complex literal representing purely imaginary number (function)[edit] |