命名空间
变体
操作

std::chrono::time_point<Clock,Duration>::operator++, std::chrono::time_point<Clock,Duration>::operator--

来自 cppreference.cn
< cpp‎ | chrono‎ | time_point
 
 
 
 
constexpr time_point& operator++();
(1) (C++20 起)
constexpr time_point operator++( int );
(2) (C++20 起)
constexpr time_point& operator--();
(3) (C++20 起)
constexpr time_point operator--( int );
(4) (C++20 起)

duration 的一个节拍修改 *this 所表示的时间点。

如果 d_ 是一个成员变量,存储此 time_point 对象的 duration(即自纪元以来的时间),

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> 的公开成员函数) [编辑]
按给定时长修改时间点
(公开成员函数) [编辑]
执行涉及时间点的加法和减法运算
(函数模板) [编辑]