Namespaces
Variants

std:: chars_format

From cppreference.net
定义于头文件 <charconv>
enum class chars_format {

scientific = /*unspecified*/ ,
fixed = /*unspecified*/ ,
hex = /*unspecified*/ ,
general = fixed | scientific

} ;
(C++17 起)

一种 位掩码类型 ,用于为 std::to_chars std::from_chars 指定浮点数格式化方式。

注释

功能测试 标准 功能
__cpp_lib_to_chars 201611L (C++17) 基础字符串转换 ( std::to_chars , std::from_chars )

示例

参见

(C++17)
将整型或浮点数值转换为字符序列
(函数)
(C++17)
将字符序列转换为整型或浮点数值
(函数)