NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
字面量

用户定义字面量支持 更多...

函数

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 string operator""_s (const char *str, size_t len)
 创建char字符串的字面量操作符
constexpr wstring operator""_s (const wchar_t *str, size_t len)
 创建wchar_t字符串的字面量操作符
constexpr u8string operator""_s (const char8_t *str, size_t len)
 创建char8_t字符串的字面量操作符
constexpr u16string operator""_s (const char16_t *str, size_t len)
 创建char16_t字符串的字面量操作符
constexpr u32string operator""_s (const char32_t *str, size_t len)
 创建char32_t字符串的字面量操作符
constexpr string_view operator""_sv (const char *str, size_t len) noexcept
 创建char字符串视图的字面量操作符
constexpr wstring_view operator""_sv (const wchar_t *str, size_t len) noexcept
 创建wchar_t字符串视图的字面量操作符
constexpr u8string_view operator""_sv (const char8_t *str, size_t len) noexcept
 创建char8_t字符串视图的字面量操作符
constexpr u16string_view operator""_sv (const char16_t *str, size_t len) noexcept
 创建char16_t字符串视图的字面量操作符
constexpr u32string_view operator""_sv (const char32_t *str, size_t len) noexcept
 创建char32_t字符串视图的字面量操作符
constexpr duration< decimal_t, ratio< 3600, 1 > > operator""_h (const decimal_t hours) noexcept
 小时字面量(浮点版本)
template<char... Digits>
constexpr hours operator""_h () noexcept
 小时字面量(整型版本)
constexpr duration< decimal_t, ratio< 60, 1 > > operator""_min (const decimal_t mins) noexcept
 分钟字面量(浮点版本)
template<char... Digits>
constexpr minutes operator""_min () noexcept
 分钟字面量(整型版本)
constexpr duration< decimal_toperator""_s (const decimal_t secs) noexcept
 秒字面量(浮点版本)
template<char... Digits>
constexpr seconds operator""_s () noexcept
 秒字面量(整型版本)
constexpr duration< decimal_t, millioperator""_ms (const decimal_t msecs) noexcept
 毫秒字面量(浮点版本)
template<char... Digits>
constexpr milliseconds operator""_ms () noexcept
 毫秒字面量(整型版本)
constexpr duration< decimal_t, microoperator""_us (const decimal_t usecs) noexcept
 微秒字面量(浮点版本)
template<char... Digits>
constexpr microseconds operator""_us () noexcept
 微秒字面量(整型版本)
constexpr duration< decimal_t, nanooperator""_ns (const decimal_t nsecs) noexcept
 纳秒字面量(浮点版本)
template<char... Digits>
constexpr nanoseconds operator""_ns () noexcept
 纳秒字面量(整型版本)
byte_size operator""_B (const unsigned long long bytes) noexcept
 创建byte_size的字面量操作符
byte_size operator""_B (const decimal_t bytes)
 创建byte_size的字面量操作符
byte_size operator""_KB (const unsigned long long bytes)
 创建byte_size的字面量操作符
byte_size operator""_KB (const decimal_t bytes)
 创建byte_size的字面量操作符
byte_size operator""_MB (const unsigned long long bytes)
 创建byte_size的字面量操作符
byte_size operator""_MB (const decimal_t bytes)
 创建byte_size的字面量操作符
byte_size operator""_GB (const unsigned long long bytes)
 创建byte_size的字面量操作符
byte_size operator""_GB (const decimal_t bytes)
 创建byte_size的字面量操作符
byte_size operator""_TB (const unsigned long long bytes)
 创建byte_size的字面量操作符
byte_size operator""_TB (const decimal_t bytes)
 创建byte_size的字面量操作符
byte_size operator""_PB (const unsigned long long bytes)
 创建byte_size的字面量操作符
byte_size operator""_PB (const decimal_t bytes)
 创建byte_size的字面量操作符
byte_size operator""_EB (const unsigned long long bytes)
 创建byte_size的字面量操作符
byte_size operator""_EB (const decimal_t bytes)
 创建byte_size的字面量操作符
constexpr hexadecimal operator""_hex (const char *str, const size_t len)
 字符串字面量转十六进制
constexpr hexadecimal operator""_hex (const unsigned long long value)
 整数字面量转十六进制
uuid operator""_uuid (const char *str, size_t len)
 UUID字面量运算符

详细描述

用户定义字面量支持

函数说明

◆ operator""_B() [1/2]

byte_size operator""_B ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp335 行定义.

引用了 byte_size::B.

◆ operator""_B() [2/2]

byte_size operator""_B ( const unsigned long long bytes)
inlinenodiscardnoexcept

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp328 行定义.

◆ operator""_EB() [1/2]

byte_size operator""_EB ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp441 行定义.

引用了 byte_size::EB.

◆ operator""_EB() [2/2]

byte_size operator""_EB ( const unsigned long long bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp432 行定义.

引用了 byte_size::EB.

◆ operator""_GB() [1/2]

byte_size operator""_GB ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp387 行定义.

引用了 byte_size::GB.

◆ operator""_GB() [2/2]

byte_size operator""_GB ( const unsigned long long bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp378 行定义.

引用了 byte_size::GB.

◆ operator""_h() [1/2]

template<char... Digits>
hours operator""_h ( )
constexprnoexcept

小时字面量(整型版本)

模板参数
Digits数字字符序列
返回
小时持续时间

在文件 duration.hpp762 行定义.

◆ operator""_h() [2/2]

duration< decimal_t, ratio< 3600, 1 > > operator""_h ( const decimal_t hours)
constexprnoexcept

小时字面量(浮点版本)

参数
hours小时数(浮点)
返回
小时持续时间

在文件 duration.hpp752 行定义.

◆ operator""_hex() [1/2]

hexadecimal operator""_hex ( const char * str,
const size_t len )
constexpr

字符串字面量转十六进制

参数
str字符串
len长度
返回
解析得到的十六进制对象

在文件 hexadecimal.hpp306 行定义.

◆ operator""_hex() [2/2]

hexadecimal operator""_hex ( const unsigned long long value)
constexpr

整数字面量转十六进制

参数
value整数值
返回
十六进制对象

在文件 hexadecimal.hpp315 行定义.

◆ operator""_i128() [1/2]

int128_t operator""_i128 ( const char * str,
const size_t len )
constexpr

128位有符号整数字符串字面量

参数
str字符串
len字符串长度
返回
int128_t对象
异常
typecast_exception字符串格式无效时抛出

在文件 int128.hpp687 行定义.

◆ operator""_i128() [2/2]

int128_t operator""_i128 ( const unsigned long long val)
constexprnoexcept

128位有符号整数字面量

参数
val整数值
返回
int128_t对象

在文件 int128.hpp669 行定义.

◆ operator""_KB() [1/2]

byte_size operator""_KB ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp351 行定义.

引用了 byte_size::KB.

◆ operator""_KB() [2/2]

byte_size operator""_KB ( const unsigned long long bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp342 行定义.

引用了 byte_size::KB.

◆ operator""_MB() [1/2]

byte_size operator""_MB ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp369 行定义.

引用了 byte_size::MB.

◆ operator""_MB() [2/2]

byte_size operator""_MB ( const unsigned long long bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp360 行定义.

引用了 byte_size::MB.

◆ operator""_min() [1/2]

template<char... Digits>
minutes operator""_min ( )
constexprnoexcept

分钟字面量(整型版本)

模板参数
Digits数字字符序列
返回
分钟持续时间

在文件 duration.hpp781 行定义.

◆ operator""_min() [2/2]

duration< decimal_t, ratio< 60, 1 > > operator""_min ( const decimal_t mins)
constexprnoexcept

分钟字面量(浮点版本)

参数
mins分钟数(浮点)
返回
分钟持续时间

在文件 duration.hpp771 行定义.

◆ operator""_ms() [1/2]

template<char... Digits>
milliseconds operator""_ms ( )
constexprnoexcept

毫秒字面量(整型版本)

模板参数
Digits数字字符序列
返回
毫秒持续时间

在文件 duration.hpp817 行定义.

◆ operator""_ms() [2/2]

duration< decimal_t, milli > operator""_ms ( const decimal_t msecs)
constexprnoexcept

毫秒字面量(浮点版本)

参数
msecs毫秒数(浮点)
返回
毫秒持续时间

在文件 duration.hpp807 行定义.

◆ operator""_ns() [1/2]

template<char... Digits>
nanoseconds operator""_ns ( )
constexprnoexcept

纳秒字面量(整型版本)

模板参数
Digits数字字符序列
返回
纳秒持续时间

在文件 duration.hpp855 行定义.

◆ operator""_ns() [2/2]

duration< decimal_t, nano > operator""_ns ( const decimal_t nsecs)
constexprnoexcept

纳秒字面量(浮点版本)

参数
nsecs纳秒数(浮点)
返回
纳秒持续时间

在文件 duration.hpp845 行定义.

◆ operator""_PB() [1/2]

byte_size operator""_PB ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp423 行定义.

引用了 byte_size::PB.

◆ operator""_PB() [2/2]

byte_size operator""_PB ( const unsigned long long bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp414 行定义.

引用了 byte_size::PB.

◆ operator""_s() [1/7]

template<char... Digits>
seconds operator""_s ( )
constexprnoexcept

秒字面量(整型版本)

模板参数
Digits数字字符序列
返回
秒持续时间

在文件 duration.hpp798 行定义.

◆ operator""_s() [2/7]

string operator""_s ( const char * str,
size_t len )
nodiscardconstexpr

创建char字符串的字面量操作符

参数
str字符串字面量
len字符串长度
返回
string对象

在文件 string.hpp54 行定义.

◆ operator""_s() [3/7]

u16string operator""_s ( const char16_t * str,
size_t len )
nodiscardconstexpr

创建char16_t字符串的字面量操作符

参数
strUTF-16字符串字面量
len字符串长度
返回
u16string对象

在文件 string.hpp80 行定义.

◆ operator""_s() [4/7]

u32string operator""_s ( const char32_t * str,
size_t len )
nodiscardconstexpr

创建char32_t字符串的字面量操作符

参数
strUTF-32字符串字面量
len字符串长度
返回
u32string对象

在文件 string.hpp88 行定义.

◆ operator""_s() [5/7]

u8string operator""_s ( const char8_t * str,
size_t len )
nodiscardconstexpr

创建char8_t字符串的字面量操作符

参数
strUTF-8字符串字面量
len字符串长度
返回
u8string对象

在文件 string.hpp71 行定义.

◆ operator""_s() [6/7]

duration< decimal_t > operator""_s ( const decimal_t secs)
constexprnoexcept

秒字面量(浮点版本)

参数
secs秒数(浮点)
返回
秒持续时间

在文件 duration.hpp790 行定义.

◆ operator""_s() [7/7]

wstring operator""_s ( const wchar_t * str,
size_t len )
nodiscardconstexpr

创建wchar_t字符串的字面量操作符

参数
str宽字符串字面量
len字符串长度
返回
wstring对象

在文件 string.hpp62 行定义.

◆ operator""_sv() [1/5]

string_view operator""_sv ( const char * str,
size_t len )
nodiscardconstexprnoexcept

创建char字符串视图的字面量操作符

参数
str字符串字面量
len字符串长度
返回
string_view对象

在文件 string_view.hpp55 行定义.

◆ operator""_sv() [2/5]

u16string_view operator""_sv ( const char16_t * str,
size_t len )
nodiscardconstexprnoexcept

创建char16_t字符串视图的字面量操作符

参数
strUTF-16字符串字面量
len字符串长度
返回
u16string_view对象

在文件 string_view.hpp81 行定义.

◆ operator""_sv() [3/5]

u32string_view operator""_sv ( const char32_t * str,
size_t len )
nodiscardconstexprnoexcept

创建char32_t字符串视图的字面量操作符

参数
strUTF-32字符串字面量
len字符串长度
返回
u32string_view对象

在文件 string_view.hpp91 行定义.

◆ operator""_sv() [4/5]

u8string_view operator""_sv ( const char8_t * str,
size_t len )
nodiscardconstexprnoexcept

创建char8_t字符串视图的字面量操作符

参数
strUTF-8字符串字面量
len字符串长度
返回
u8string_view对象

在文件 string_view.hpp72 行定义.

◆ operator""_sv() [5/5]

wstring_view operator""_sv ( const wchar_t * str,
size_t len )
nodiscardconstexprnoexcept

创建wchar_t字符串视图的字面量操作符

参数
str宽字符串字面量
len字符串长度
返回
wstring_view对象

在文件 string_view.hpp63 行定义.

◆ operator""_TB() [1/2]

byte_size operator""_TB ( const decimal_t bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp405 行定义.

引用了 byte_size::TB.

◆ operator""_TB() [2/2]

byte_size operator""_TB ( const unsigned long long bytes)
inlinenodiscard

创建byte_size的字面量操作符

参数
bytes字节数
返回
byte_size对象

在文件 byte_size.hpp396 行定义.

引用了 byte_size::TB.

◆ operator""_u128() [1/2]

uint128_t operator""_u128 ( const char * str,
const size_t len )
constexpr

128位无符号整数字符串字面量

参数
str字符串
len字符串长度
返回
uint128_t对象
异常
typecast_exception字符串格式无效时抛出

在文件 int128.hpp678 行定义.

◆ operator""_u128() [2/2]

uint128_t operator""_u128 ( const unsigned long long val)
constexprnoexcept

128位无符号整数字面量

参数
val整数值
返回
uint128_t对象

在文件 int128.hpp662 行定义.

◆ operator""_us() [1/2]

template<char... Digits>
microseconds operator""_us ( )
constexprnoexcept

微秒字面量(整型版本)

模板参数
Digits数字字符序列
返回
微秒持续时间

在文件 duration.hpp836 行定义.

◆ operator""_us() [2/2]

duration< decimal_t, micro > operator""_us ( const decimal_t usecs)
constexprnoexcept

微秒字面量(浮点版本)

参数
usecs微秒数(浮点)
返回
微秒持续时间

在文件 duration.hpp826 行定义.

◆ operator""_uuid()

uuid operator""_uuid ( const char * str,
size_t len )
inlinenodiscard

UUID字面量运算符

参数
strUUID字符串
len字符串长度
返回
解析后的UUID对象
异常
value_exception字符串格式无效时抛出

在文件 uuid.hpp179 行定义.