Standard C++ Library Reference ISO/IEC (VERSION3)

The operators each convert both operands to the return type, then return the complex quotient of
the converted left and right.
operator<<
template<class Ty, class Elem, class Tr>
basic_ostream<Elem, Tr>&
operator<<(basic_ostream<Elem, Tr>& ostr,
const complex<Ty>& right);
The template function inserts the complex value right in the output stream os, effectively by
executing:
basic_ostringstream<Elem, Tr> osstr;
osstr.flags(ostr.flags());
osstr.imbue(ostr.imbue());
osstr.precision(ostr.precision());
osstr << '(' << real(right) << ','
<< imag(right) << ')';
ostr << osstr.str().c_str();
Thus, if ostr.width() is greater than zero, any padding occurs either before or after the
parenthesized pair of values, which itself contains no padding. The function returns ostr.
operator==
template<class Ty>
bool operator==(const complex<Ty>& left,
const complex<Ty>& right);
template<class Ty>
bool operator==(const complex<Ty>& left,
const Ty& right);
template<class Ty>
bool operator==(const Ty& left,
const complex<Ty>& right);
The operators each return true only if real(left) == real(right) &&
imag(left) == imag(right).
operator>>
template<class Ty, class Elem, class Tr>
basic_istream<Elem, Tr>&
operator>>(basic_istream<Elem, Tr>& istr,