BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::TimeInterval_DurationTraits< REP, PERIOD > Struct Template Reference

#include <bsls_timeinterval.h>

Static Public Attributes

static const bool k_IS_FLOAT = TimeInterval_RepTraits<REP>::k_IS_FLOAT
 
static const bool k_IS_IMPLICIT = (std::nano::den % PERIOD::den == 0)
 
static const bool k_IMPLICIT_CONVERSION_ENABLED
 
static const bool k_EXPLICIT_CONVERSION_ENABLED
 

Detailed Description

template<class REP, class PERIOD>
struct bsls::TimeInterval_DurationTraits< REP, PERIOD >

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

Member Data Documentation

◆ k_EXPLICIT_CONVERSION_ENABLED

template<class REP , class PERIOD >
const bool bsls::TimeInterval_DurationTraits< REP, PERIOD >::k_EXPLICIT_CONVERSION_ENABLED
static
Initial value:
=
static const bool k_IS_IMPLICIT
Definition bsls_timeinterval.h:263
static const bool k_IS_FLOAT
Definition bsls_timeinterval.h:257

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" andPERIOD', but they may be both false for floats.

◆ k_IMPLICIT_CONVERSION_ENABLED

template<class REP , class PERIOD >
const bool bsls::TimeInterval_DurationTraits< REP, PERIOD >::k_IMPLICIT_CONVERSION_ENABLED
static
Initial value:

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" andPERIOD', but they may be both false for floats.

◆ k_IS_FLOAT

template<class REP , class PERIOD >
const bool bsls::TimeInterval_DurationTraits< REP, PERIOD >::k_IS_FLOAT = TimeInterval_RepTraits<REP>::k_IS_FLOAT
static

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

template<class REP , class PERIOD >
const bool bsls::TimeInterval_DurationTraits< REP, PERIOD >::k_IS_IMPLICIT = (std::nano::den % PERIOD::den == 0)
static

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.


The documentation for this struct was generated from the following file: