包含自定义字面量运算符的命名空间。
More...
包含自定义字面量运算符的命名空间。
使用时需要 using namespace console::literals; 或直接引入所需字面量。
◆ operator""_f()
| f_string console::literals::operator""_f |
( |
const char * | str, |
|
|
size_t | ) |
格式化字符串字面量,返回 f_string 对象,支持延迟格式化。
- Parameters
-
- Returns
- f_string 可进行格式化绑定的对象。
用法:"Hello, {}"_f.format("world"); 或 "Value: {}"_f % 42;
◆ operator""_hr() [1/2]
| Time console::literals::operator""_hr |
( |
long double | hr | ) |
|
小时字面量(浮点数)。
- Parameters
-
- Returns
- Time 表示指定小时数的 Time 对象。
◆ operator""_hr() [2/2]
| Time console::literals::operator""_hr |
( |
unsigned long long | hr | ) |
|
小时字面量(整数)。
- Parameters
-
- Returns
- Time 表示指定小时数的 Time 对象(转换为纳秒)。
◆ operator""_min() [1/2]
| Time console::literals::operator""_min |
( |
long double | min | ) |
|
分钟字面量(浮点数)。
- Parameters
-
- Returns
- Time 表示指定分钟数的 Time 对象。
◆ operator""_min() [2/2]
| Time console::literals::operator""_min |
( |
unsigned long long | min | ) |
|
分钟字面量(整数)。
- Parameters
-
- Returns
- Time 表示指定分钟数的 Time 对象(转换为纳秒)。
◆ operator""_ms() [1/2]
| Time console::literals::operator""_ms |
( |
long double | ms | ) |
|
毫秒字面量(浮点数)。
- Parameters
-
- Returns
- Time 表示指定毫秒数的 Time 对象。
◆ operator""_ms() [2/2]
| Time console::literals::operator""_ms |
( |
unsigned long long | ms | ) |
|
毫秒字面量(整数)。
- Parameters
-
- Returns
- Time 表示指定毫秒数的 Time 对象(转换为纳秒)。
◆ operator""_ns() [1/2]
| Time console::literals::operator""_ns |
( |
long double | ns | ) |
|
纳秒字面量(浮点数)。
- Parameters
-
- Returns
- Time 表示指定纳秒数的 Time 对象。
◆ operator""_ns() [2/2]
| Time console::literals::operator""_ns |
( |
unsigned long long | ns | ) |
|
纳秒字面量(整数)。
- Parameters
-
- Returns
- Time 表示指定纳秒数的 Time 对象。
◆ operator""_s() [1/2]
| Time console::literals::operator""_s |
( |
long double | s | ) |
|
秒字面量(浮点数)。
- Parameters
-
- Returns
- Time 表示指定秒数的 Time 对象。
◆ operator""_s() [2/2]
| Time console::literals::operator""_s |
( |
unsigned long long | s | ) |
|
秒字面量(整数)。
- Parameters
-
- Returns
- Time 表示指定秒数的 Time 对象(转换为纳秒)。
◆ operator""_us() [1/2]
| Time console::literals::operator""_us |
( |
long double | us | ) |
|
微秒字面量(浮点数)。
- Parameters
-
- Returns
- Time 表示指定微秒数的 Time 对象。
◆ operator""_us() [2/2]
| Time console::literals::operator""_us |
( |
unsigned long long | us | ) |
|
微秒字面量(整数)。
- Parameters
-
- Returns
- Time 表示指定微秒数的 Time 对象(转换为纳秒)。