Add to this time interval the specified duration. Return a reference providing modifiable access to this object. The behavior is undefined unless the duration can be converted to a valid TimeInterval object, whose seconds field may have any 64‐bit signed integer value and nanoseconds field limited to the range [ ‐999,999,999..999,999,999 ]. Also the behavior is undefined unless the total number of seconds in the resulting time interval can be represented with 64‐bit signed integer. Note that this operation is allowed only if representation type of the duration is not a floating point type and the duration itself can be exactly represented by an integer nanoseconds.

Synopsis

Declared in <bsls_timeinterval.h>

template<
    class REP_TYPE,
    class PERIOD_TYPE>
constexpr
TimeInterval&
addDuration(
    std::chrono::duration<REP_TYPE, PERIOD_TYPE> const& duration,
    int* = 0)
requires TimeInterval_DurationTraits<REP_TYPE, PERIOD_TYPE>::
                                                 k_IMPLICIT_CONVERSION_ENABLED;

Created with MrDocs