1. 首页
  2. 数据库
  3. 其它
  4. constexpr to string:C ++ 17代码在编译时将整数转换为字符串 源码

constexpr to string:C ++ 17代码在编译时将整数转换为字符串 源码

上传者: 2021-04-24 10:57:27上传 ZIP文件 5KB 热度 16次
constexpr-to-string 特征: 在编译时将任何整数类型转换为字符串 支持转换为2到36之间(包括2和36)的任意基数 没有外部依赖关系,仅包括用于模板参数检查的type_traits 支持自定义字符类型,例如to_string C ++ 20:支持使用f_to_string浮点数到字符串的转换 如何使用: 文件to_string.hpp提供了to_string实用程序,可以按以下方式使用它: const char *number = to_string; // produces "1DCD65003B9A1884" puts (number); puts (to_string<- 42 >); // produces "-42" puts (to_string< 30 ,
下载地址
用户评论