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

< 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) 如同用 zone->to_sys(other) 转换 otherstd::chrono::sys_time (其中 zone 是保有存储的时区指针的非静态数据成员)再赋值结果给存储的时间点。不更改时区指针。调用后 get_local_time() == other

返回值

*this