std::chrono::treat_as_floating_point
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <chrono> 中定义
|
||
template <class Rep> struct treat_as_floating_point : std::is_floating_point<Rep> {}; |
(C++11 起) | |
std::chrono::treat_as_floating_point
性状有助于确定与一个不同的刻度期间可以转换到另一个持续时间,如果持续时间.原文:
The
std::chrono::treat_as_floating_point
trait helps determine if a duration can be converted to another duration with a different tick period.隐式转换之间的持续时间通常取决于蜱周期的持续时间。然而,隐式转换可能会发生无论蜱期间,如果std::chrono::treat_as_floating_point<Rep>::value == true.
原文:
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.