Namespaces
Variants

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

From cppreference.net
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 起)

* this 所表示的时间点按 duration 的一个刻度进行修改。

如果 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> 的公开成员函数)
通过给定时长修改时间点
(公开成员函数)
执行涉及时间点的加减运算
(函数模板)