Name

operator== function template — Checks equality

Synopsis

template<typename T>
  bool operator==(const complex<T>&, const complex<T>&);
template<typename T>
  bool operator==(const complex<T>&, const T&);
template<typename T>
  bool operator==(const T&, const complex<T>&);

The == operator returns true if the real and imaginary parts of both values are equal. If either operand is of type T, the argument is interpreted as the real part, with an imaginary part of T( ) or 0.