首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

operators (std::complex)

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)

比较两个复数。标量参数被视为复数,实数等于实数,虚部设为零。

1-3%29比较lhsrhs为了平等。

4-6%29比较lhsrhs不平等。

参数

lhs, rhs

-

the arguments to compare: either both complex numbers or one complex and one scalar of matching type (float, double, long double)

返回值

1-3%29truelhs等于rhs,,,false否则。

4-6%29!(lhs == rhs)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com