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) |
Defined in header <complex> | ||
template<std::size_t I> friendconstexpr T& get(std::complex<T>& x); | (1) | (since C++26) |
template<std::size_t I> friendconstexprconst T& get(conststd::complex<T>& x); | (2) | (since C++26) |
template<std::size_t I> friendconstexpr T&& get(std::complex<T>&& x); | (3) | (since C++26) |
template<std::size_t I> friendconstexprconst T&& get(conststd::complex<T>&& x); | (4) | (since C++26) |
Returns the reference to real or imaginary part from acomplex
whenI==0 orI==1, respectively. It is mainly provided for structured binding support.
Contents |
x | - | acomplex |
Feature-test macro | Value | Std | Feature |
---|---|---|---|
__cpp_lib_tuple_like | 202311L | (C++26) | Add tuple protocol tostd::complex |
#include <complex> static_assert([z=std::complex(1.0,2.0)]{#if __cpp_lib_tuple_like >= 202311Lreturn std::get<0>(z)==1.0 and std::get<1>(z)==2.0;#elsereturn z.real()==1.0 and z.imag()==2.0;#endif}()); int main(){}
Structured binding(C++17) | binds the specified names to sub-objects or tuple elements of the initializer[edit] |
(C++11) | tuple accesses specified element (function template)[edit] |
(C++11) | accesses an element of apair (function template)[edit] |
(C++11) | accesses an element of anarray (function template)[edit] |