命名空间
变体
操作

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

来自 cppreference.cn
< cpp‎ | chrono‎ | zoned time
 
 
 
 
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