operator+, operator-(std::chrono::time_point)
<chrono>
time_point<C, typename std::common_type <D1, duration<R2,P2>>::type>
operator+( const time_point<C,D1>& pt,
(until C++14)
constexpr time_point<C, std::common_type_t <D1, duration<R2,P2>>>
operator+( const time_point<C,D1>& pt,
time_point<C, typename std::common_type <duration<R1,P1>,D2>::type>
operator+( const duration<R1,P1>& d,
(until C++14)
constexpr time_point<C, std::common_type_t <duration<R1,P1>,D2>>
operator+( const duration<R1,P1>& d,
time_point<C, typename std::common_type <D1, duration<R2,P2>>::type>
operator-( const time_point<C,D1>& pt,
(until C++14)
constexpr time_point<C, std::common_type_t <D1, duration<R2,P2>>>
operator-( const time_point<C,D1>& pt,
typename std::common_type <D1,D2>::type
operator-( const time_point<C,D1>& pt_lhs,
(until C++14)
constexpr std::common_type_t <D1,D2>
operator-( const time_point<C,D1>& pt_lhs,
Performs add and subtract operations involving a time_point
.
CT
is the return type.CT
is the return type.[edit] Parameters
[edit] Return value
[edit] Exceptions
May throw implementation-defined exceptions.
[edit] Example
Reason: no example
[edit] Defect reports
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 |