Defined in header
<complex> | ||
---|---|---|
template< class T > bool operator==( const complex<T>& lhs, const complex<T>& rhs); | (1) | (until C++14) |
template< class T > constexpr bool operator==( const complex<T>& lhs, const complex<T>& rhs); | (1) | (since C++14) |
template< class T > bool operator==( const complex<T>& lhs, const T& rhs); | (2) | (until C++14) |
template< class T > constexpr bool operator==( const complex<T>& lhs, const T& rhs); | (2) | (since C++14) |
template< class T > bool operator==( const T& lhs, const complex<T>& rhs); | (3) | (until C++14) |
template< class T > constexpr bool operator==( const T& lhs, const complex<T>& rhs); | (3) | (since C++14) |
template< class T > bool operator!=( const complex<T>& lhs, const complex<T>& rhs); | (4) | (until C++14) |
template< class T > constexpr bool operator!=( const complex<T>& lhs, const complex<T>& rhs); | (4) | (since C++14) |
template< class T > bool operator!=( const complex<T>& lhs, const T& rhs); | (5) | (until C++14) |
template< class T > constexpr bool operator!=( const complex<T>& lhs, const T& rhs); | (5) | (since C++14) |
template< class T > bool operator!=( const T& lhs, const complex<T>& rhs); | (6) | (until C++14) |
template< class T > constexpr bool operator!=( const T& lhs, const complex<T>& rhs); | (6) | (since C++14) |
Compares two complex numbers. Scalar arguments are treated as complex numbers with the real part equal to the argument and the imaginary part set to zero.
lhs
and rhs
for equality.lhs
and rhs
for inequality.lhs, rhs | - | the arguments to compare: either both complex numbers or one complex and one scalar of matching type (float , double , long double ) |
true
if respective parts of lhs
are equal to rhs
, false
otherwise.!(lhs == rhs)
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/complex/operator_cmp