mp_units::real¶
Customization point object: the real part of a complex value
Synopsis¶
Declared in <mp-units/framework/representation_concepts.h>
inline constexpr /* implementation-defined */ real;
Description¶
Calls clx.real(), or real(clx) found by ADL, and accepts only a result that is real and has the order of clx. Code written for any complex scalar calls it, whichever form the type provides:
// the complex conjugate, for `std::complex` and for a type with free `real()` and `imag()`
template<typename Complex>
constexpr Complex conjugate(const Complex& value)
{
return Complex(mp_units::real(value), -mp_units::imag(value));
}
Return Value¶
the real part of clx
Parameters¶
| Name | Description |
|---|---|
| clx | a complex value |
See Also¶
imagfor the imaginary partmodulusfor the modulus- Representation Types in the User's Guide