True if REP is a floating‐point type.

Synopsis

Declared in <bsls_timeinterval.h>

static
bool const k_IS_FLOAT = std::is_floating_point<REP>::value
                           || std::chrono::treat_as_floating_point<REP>::value;

Description

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 note), k_IS_FLOAT is false. Note that to cover all scenarios we need to examine two traits. The first one that tells if the representation type is a floating point (arithmetic) type or not (from <type_traits>), and another that tells that representation type is considered a floating point type from the std::chrono perspective. Formally the second one just duplicates the first one, but in theory either can be specialized to be true, independently. Also note that conversions from std::chrono::duration with a floating point representation to bsls::TimeInterval are not supported for now.

Created with MrDocs