std::complex< _Tp >(3) Library Functions Manual std::complex< _Tp >(3)

std::complex< _Tp >

#include <complex>


typedef _Tp value_type
Value typedef.


constexpr complex (const _Tp &__r=_Tp(), const _Tp &__i=_Tp())
Default constructor. First parameter is x, second parameter is y. Unspecified parameters default to 0. constexpr complex (const complex &)=default
template<typename _Up > constexpr complex (const complex< _Up > &__z)
Converting constructor. __attribute ((__abi_tag__('cxx11'))) const expr _Tp imag() const
__attribute ((__abi_tag__('cxx11'))) const expr _Tp real() const
constexpr complex __rep () const
constexpr void imag (_Tp __val)
constexpr complex< _Tp > & operator*= (const _Tp &)
Multiply this complex number by a scalar. template<typename _Up > constexpr complex< _Tp > & operator*= (const complex< _Up > &)
Multiply this complex number by another. constexpr complex< _Tp > & operator+= (const _Tp &__t)
Add a scalar to this complex number. template<typename _Up > constexpr complex< _Tp > & operator+= (const complex< _Up > &)
Add another complex number to this one. constexpr complex< _Tp > & operator-= (const _Tp &__t)
Subtract a scalar from this complex number. template<typename _Up > constexpr complex< _Tp > & operator-= (const complex< _Up > &)
Subtract another complex number from this one. constexpr complex< _Tp > & operator/= (const _Tp &)
Divide this complex number by a scalar. template<typename _Up > constexpr complex< _Tp > & operator/= (const complex< _Up > &)
Divide this complex number by another. constexpr complex< _Tp > & operator= (const _Tp &)
Assign a scalar to this complex number. constexpr complex & operator= (const complex &)=default
template<typename _Up > constexpr complex< _Tp > & operator= (const complex< _Up > &)
Assign another complex number to this one. constexpr void real (_Tp __val)

class std::complex< _Tp >"Template to represent complex numbers.

Specializations for float, double, and long double are part of the library. Results with any other type are not guaranteed.

Parameters

Tp Type of real and imaginary values.

Value typedef.

template<typename _Tp > std::complex< _Tp >::complex (const _Tp & __r = _Tp(), const _Tp & __i = _Tp()) [inline], [constexpr]

Default constructor. First parameter is x, second parameter is y. Unspecified parameters default to 0.

Converting constructor.

template<typename _Tp > complex< _Tp > & std::complex< _Tp >::operator+= (const _Tp & __t) [inline], [constexpr]

Add a scalar to this complex number.

template<typename _Tp > complex< _Tp > & std::complex< _Tp >::operator-= (const _Tp & __t) [inline], [constexpr]

Subtract a scalar from this complex number.

Generated automatically by Doxygen for libstdc++ from the source code.

libstdc++