Namespaces
Variants

std::chrono:: operator== (std::chrono::zoned_time)

From cppreference.net
定义于头文件 <chrono>
template < class Duration1, class Duration2, class TimeZonePtr >

bool operator == ( const std:: chrono :: zoned_time < Duration1, TimeZonePtr > & x,

const std:: chrono :: zoned_time < Duration2, TimeZonePtr > & y ) ;
(C++20 起)

比较两个 zoned_time x y 。当两个 zoned_time 对象的时间点和时区指针均通过 operator== 比较相等时,这两个对象才被视为相等。

!= 运算符由 operator== 合成而来。

返回值

x. get_time_zone ( ) == y. get_time_zone ( ) && x. get_sys_time ( ) == y. get_sys_time ( ) ,不同之处在于比较是直接对 x y 的非静态数据成员执行的,且不进行任何复制操作。