Namespaces
Variants

std::chrono::zoned_time<Duration,TimeZonePtr>:: operator=

From cppreference.net
zoned_time & operator = ( const zoned_time & other ) = default ;
(1) (C++20 起)
zoned_time & operator = ( const std:: chrono :: sys_time < Duration > & other ) ;
(2) (C++20 起)
zoned_time & operator = ( const std:: chrono :: local_time < Duration > & other ) ;
(3) (C++20 起)

other 的值赋给 * this

1) 默认生成的拷贝赋值运算符。同时拷贝存储的时间点和存储的时区指针。 zoned_time 没有移动赋值运算符;移动操作即为拷贝操作。
2) other 赋值给存储的时间点。时区指针保持不变。此调用后, get_sys_time ( ) == other
3) other 转换为 std::chrono::sys_time ,转换方式为 zone - > to_sys ( other ) (其中 zone 是持有存储时区指针的非静态数据成员),并将结果赋值给存储的时间点。时区指针保持不变。此调用后, get_local_time ( ) == other

返回值

* this

异常

3) time_zone::to_sys() 抛出异常时,本函数亦抛出异常。