命名空间
变体
操作

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

[edit] 返回值

*this