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

来自cppreference.com
< cpp‎ | chrono‎ | zoned time
 
 
工具库
语言支持
类型支持(基本类型、RTTI)
库功能特性测试宏 (C++20)
动态内存管理
程序工具
协程支持 (C++20)
变参数函数
调试支持
(C++26)
三路比较
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
通用工具
日期和时间
函数对象
格式化库 (C++20)
(C++11)
关系运算符 (C++20 中弃用)
整数比较函数
(C++20)(C++20)(C++20)   
(C++20)
交换类型运算
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
常用词汇类型
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
初等字符串转换
(C++17)
(C++17)

 
 
 
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