std::chrono::time_point<Clock,Duration>::operator++, std::chrono::time_point<Clock,Duration>::operator--
来自cppreference.com
| |
(1) | (C++20 起) |
| |
(2) | (C++20 起) |
| |
(3) | (C++20 起) |
| |
(4) | (C++20 起) |
以 duration 的一个计次修改时间点 *this。
若 d_ 为此 time_point 对象保有时长(即自纪元起的时间)的成员变量,则
1) 等价于
++d_; return *this;。2) 等价于
return time_point(d_++)。3) 等价于
--d_; return *this;。4) 等价于
return time_point(d_--);。参数
(无)
返回值
1,3) 到修改后的此
time_point 的引用。2,4) 进行修改前的
time_point 的副本。示例
| 本节未完成 原因:暂无示例 |
参阅
| 自增或自减计次数 ( std::chrono::duration<Rep,Period> 的公开成员函数) | |
| 以给定的 duration 修改 time_point (公开成员函数) | |
(C++11) |
实现涉及时间点的加法和减法运算 (函数模板) |