Performs add and subtract operations involving a time_point
.
d
to pt
. Effectively returns CT(pt.time_since_epoch() + d)
, where CT
is the return type.d
to pt
in negative direction. Effectively returns CT(ot.time_since_epoch() - d)
, where CT
is the return type.pt_lhs
and pt_rhs
.pt | - | a time point to apply the offset to |
d | - | a time offset |
pt_lhs, pt_rhs | - | time points to extract difference from |
d
.(none).
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 2739 | C++11 | pt - d behaved erratically for unsigned duration s | behavior corrected |
modifies the time point by the given duration (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/time_point/operator_arith2