Trait metafunction that determines whether the std::chrono::duration<REP, PERIOD> object can be converted to bsls::TimeInterval either implicitly or explicitly.

Synopsis

Declared in <bsls_timeinterval.h>

template<
    class REP,
    class PERIOD>
struct TimeInterval_DurationTraits;

Static Data Members

Name

Description

k_EXPLICIT_CONVERSION_ENABLED

This compile time constant is true if std::chrono::duration<REP, PERIOD> objects can be explicitly converted to TimeInterval, and false otherwise. This value is intended to be used with enable_if to enable explicitly converting function overloads. Note that this boolean value is mutually exclusive with k_IMPLICIT_CONVERION_ENABLED as in they will never be both true for the same REP" and `PERIOD', but they may be both `false for floats.

k_IMPLICIT_CONVERSION_ENABLED

This compile time constant is true if std::chrono::duration<REP, PERIOD> objects will be implicitly converted to TimeInterval, and false otherwise. This value is intended to be used with enable_if to enable implicitly converting function overloads. Note that this boolean value is mutually exclusive with k_EXPLICIT_CONVERION_ENABLED as in they will never be both true for the same REP" and `PERIOD', but they may be both `false for floats.

k_IS_FLOAT

This compile time constant is true if the REP (template type argument) is indicated to be a floating point type by the underlying library. Otherwise, if the underlying library does not consider REP floating point anywhere (see TimeInterval_RepTraits), k_IS_FLOAT is false.

k_IS_IMPLICIT

This compile time constant is true if any possible value of an 'std::chrono::duration<REP, PERIOD> object will be represented by integer nanoseconds (fractions of nanoseconds are not required). Otherwise this value is false.

Created with MrDocs