Namespaces
Variants
Views
Actions

std::chrono::treat_as_floating_point

From cppreference.com
< cpp‎ | chrono
Revision as of 19:34, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
 
 
Defined in header <chrono>
template <class Rep>
struct treat_as_floating_point : std::is_floating_point<Rep> {};
(since C++11)

The std::chrono::treat_as_floating_point trait helps determine if a duration can be converted to another duration with a different tick period.

Implicit conversions between two durations normally depends on the tick period of the durations. However, implicit conversions can happen regardless of tick period if std::chrono::treat_as_floating_point<Rep>::value == true.