.TH "std::complex< _Tp >" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::complex< _Tp > .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Types" .in +1c .ti -1c .RI "typedef _Tp \fBvalue_type\fP" .br .RI "Value typedef\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "constexpr \fBcomplex\fP (const _Tp &__r=_Tp(), const _Tp &__i=_Tp())" .br .RI "Default constructor\&. First parameter is x, second parameter is y\&. Unspecified parameters default to 0\&. " .ti -1c .RI "constexpr \fBcomplex\fP (const \fBcomplex\fP &)=default" .br .ti -1c .RI "template constexpr \fBcomplex\fP (const \fBcomplex\fP< _Up > &__z)" .br .RI "Converting constructor\&. " .ti -1c .RI "\fB__attribute\fP ((__abi_tag__('cxx11'))) const expr _Tp imag() const" .br .ti -1c .RI "\fB__attribute\fP ((__abi_tag__('cxx11'))) const expr _Tp real() const" .br .ti -1c .RI "constexpr \fBcomplex\fP \fB__rep\fP () const" .br .ti -1c .RI "constexpr void \fBimag\fP (_Tp __val)" .br .ti -1c .RI "constexpr \fBcomplex\fP< _Tp > & \fBoperator*=\fP (const _Tp &)" .br .RI "Multiply this complex number by a scalar\&. " .ti -1c .RI "template constexpr \fBcomplex\fP< _Tp > & \fBoperator*=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Multiply this complex number by another\&. " .ti -1c .RI "constexpr \fBcomplex\fP< _Tp > & \fBoperator+=\fP (const _Tp &__t)" .br .RI "Add a scalar to this complex number\&. " .ti -1c .RI "template constexpr \fBcomplex\fP< _Tp > & \fBoperator+=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Add another complex number to this one\&. " .ti -1c .RI "constexpr \fBcomplex\fP< _Tp > & \fBoperator\-=\fP (const _Tp &__t)" .br .RI "Subtract a scalar from this complex number\&. " .ti -1c .RI "template constexpr \fBcomplex\fP< _Tp > & \fBoperator\-=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Subtract another complex number from this one\&. " .ti -1c .RI "constexpr \fBcomplex\fP< _Tp > & \fBoperator/=\fP (const _Tp &)" .br .RI "Divide this complex number by a scalar\&. " .ti -1c .RI "template constexpr \fBcomplex\fP< _Tp > & \fBoperator/=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Divide this complex number by another\&. " .ti -1c .RI "constexpr \fBcomplex\fP< _Tp > & \fBoperator=\fP (const _Tp &)" .br .RI "Assign a scalar to this complex number\&. " .ti -1c .RI "constexpr \fBcomplex\fP & \fBoperator=\fP (const \fBcomplex\fP &)=default" .br .ti -1c .RI "template constexpr \fBcomplex\fP< _Tp > & \fBoperator=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Assign another complex number to this one\&. " .ti -1c .RI "constexpr void \fBreal\fP (_Tp __val)" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::complex< _Tp >"Template to represent complex numbers\&. .PP Specializations for float, double, and long double are part of the library\&. Results with any other type are not guaranteed\&. .PP \fBParameters\fP .RS 4 \fITp\fP Type of real and imaginary values\&. .RE .PP .SH "Member Typedef Documentation" .PP .SS "template _Tp \fBstd::complex\fP< _Tp >::value_type" .PP Value typedef\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::complex\fP< _Tp >::complex (const _Tp & __r = \fR_Tp()\fP, const _Tp & __i = \fR_Tp()\fP)\fR [inline]\fP, \fR [constexpr]\fP" .PP Default constructor\&. First parameter is x, second parameter is y\&. Unspecified parameters default to 0\&. .SS "template template \fBstd::complex\fP< _Tp >::complex (const \fBcomplex\fP< _Up > & __z)\fR [inline]\fP, \fR [constexpr]\fP" .PP Converting constructor\&. .SH "Member Function Documentation" .PP .SS "template \fBcomplex\fP< _Tp > & \fBstd::complex\fP< _Tp >\fB::operator\fP+= (const _Tp & __t)\fR [inline]\fP, \fR [constexpr]\fP" .PP Add a scalar to this complex number\&. .SS "template \fBcomplex\fP< _Tp > & \fBstd::complex\fP< _Tp >\fB::operator\fP\-= (const _Tp & __t)\fR [inline]\fP, \fR [constexpr]\fP" .PP Subtract a scalar from this complex number\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.