|
MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
数值类型极限特性主模板 更多...
#include <numeric_traits.hpp>
静态 Public 成员函数 | |
| static MSTL_NODISCARD constexpr T | min () noexcept |
| 获取类型的最小值 | |
| static MSTL_NODISCARD constexpr T | max () noexcept |
| 获取类型的最大值 | |
| static MSTL_NODISCARD constexpr T | lowest () noexcept |
| 获取类型的最低值 | |
| static MSTL_NODISCARD constexpr T | epsilon () noexcept |
| 获取机器精度 | |
| static MSTL_NODISCARD constexpr T | round_error () noexcept |
| 获取最大舍入误差 | |
| static MSTL_NODISCARD constexpr T | denorm_min () noexcept |
| 获取最小的次正规化正值 | |
| static MSTL_NODISCARD constexpr T | infinity () noexcept |
| 获取正无穷大表示 | |
| static MSTL_NODISCARD constexpr T | quiet_nan () noexcept |
| 获取安静nan表示 | |
| static MSTL_NODISCARD constexpr T | signaling_nan () noexcept |
| 获取信号nan表示 | |
数值类型极限特性主模板
| T | 数值类型 |
| Dummy | SFINAE参数 |
主模板提供默认实现,返回类型T的默认值。 特定类型的特化将提供该类型的具体数值特性。
在文件 numeric_traits.hpp 第 141 行定义.
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
获取类型的最低值
在文件 numeric_traits.hpp 第 160 行定义.
被这些函数引用 duration< common_type_t< Rep >, typename Period::type >::min().
|
inlinestaticconstexprnoexcept |
获取类型的最大值
在文件 numeric_traits.hpp 第 153 行定义.
被这些函数引用 duration< common_type_t< Rep >, typename Period::type >::max(), latch::max(), tree_barrier< CmplFunc >::max(), random_lcd::next_int() , 以及 random_mt::next_int().
|
inlinestaticconstexprnoexcept |
获取类型的最小值
在文件 numeric_traits.hpp 第 148 行定义.
被这些函数引用 is_normal() , 以及 is_subnormal().
|
inlinestaticconstexprnoexcept |
获取安静nan表示
安静nan在大多数算术操作中不会触发浮点异常,具体特点如下:
在文件 numeric_traits.hpp 第 193 行定义.
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
获取信号nan表示
信号nan在大多数算术操作中会触发浮点异常,如SIGFPE或浮点无效操作异常。 一旦参与运算,如果硬件/系统启用了浮点异常捕获,可能触发陷阱。 其用于调试和诊断,可以捕获未初始化的浮点数使用。
在文件 numeric_traits.hpp 第 204 行定义.