cpp/chrono/duration/duration

Constructs a new from one of several optional data sources.

@1@ The default constructor is defaulted.

@2@ The copy constructor is defaulted (makes a bitwise copy of the tick count).

@3@ Constructs a duration with ticks. Note that this constructor only participates in overload resolution if (the argument type) is implicitly convertible to  (the type of this duration's ticks) and


 * is, or
 * is.

@@(that is, a duration with an integer tick count cannot be constructed from a floating-point value, but a duration with a floating-point tick count can be constructed from an integer value)

@4@ Constructs a duration by converting to an appropriate period and tick count, as if by. In order to prevent truncation during conversion, this constructor only participates in overload resolution if computation of the conversion factor (by ) does not overflow and:



@@ or both:


 * , and

@@ (that is, either the duration uses floating-point ticks, or is exactly divisible by period)