NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
int128.hpp 文件参考

128位整数类型实现 更多...

int128.hpp 的引用(Include)关系图:

浏览该文件的源代码.

struct  uint128_t
 128位无符号整数类型 更多...
struct  int128_t
 128位有符号整数类型 更多...
class  numeric_traits< uint128_t >
 uint128_t类型的数值特征特化 更多...
class  numeric_traits< int128_t >
 int128_t类型的数值特征特化 更多...

函数

constexpr uint128_t operator""_u128 (const unsigned long long val) noexcept
 128位无符号整数字面量
constexpr int128_t operator""_i128 (const unsigned long long val) noexcept
 128位有符号整数字面量
constexpr uint128_t operator""_u128 (const char *str, const size_t len)
 128位无符号整数字符串字面量
constexpr int128_t operator""_i128 (const char *str, const size_t len)
 128位有符号整数字符串字面量
constexpr uint128_t to_uint128 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为128位无符号整数
constexpr int128_t to_int128 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为128位有符号整数

详细描述

128位整数类型实现

此文件提供了128位有符号和无符号整数类型的完整实现。 支持所有基本算术运算、位运算、比较运算、字符串转换等功能。

主要功能:

  • 128位无符号整数与有符号整数
  • 所有算术运算符重载
  • 位运算支持
  • 字符串解析和格式化
  • 与内置整数类型的隐式转换
  • 数值特性
  • 字面量支持

在文件 int128.hpp 中定义.