标准库标头 <stdfloat> (C++23)
来自cppreference.com
类型 | ||
(C++23)(可选) |
宽度分别正好为 16、32、64 和 128 位的二进制浮点数类型 (typedef) | |
(C++23)(可选) |
16 位宽的 brain 浮点数类型 (typedef) |
[编辑] 注解
定宽浮点数类型必然是扩展浮点数类型(而非 float / double / long double)的别名,因此不是标准浮点数类型的简单替代品。
[编辑] 摘要
namespace std { #if defined(__STDCPP_FLOAT16_T__) using float16_t = /* 实现定义 */; #endif #if defined(__STDCPP_FLOAT32_T__) using float32_t = /* 实现定义 */; #endif #if defined(__STDCPP_FLOAT64_T__) using float64_t = /* 实现定义 */; #endif #if defined(__STDCPP_FLOAT128_T__) using float128_t = /* 实现定义 */; #endif #if defined(__STDCPP_BFLOAT16_T__) using bfloat16_t = /* 实现定义 */; #endif }
[编辑] 参阅
- C++23 标准(ISO/IEC 14882:2024):
- 17.5 Header
<stdfloat>
synopsis [stdfloat.syn]
- 17.5 Header