我在阅读文章时遇到了一个代码,作者声称"C++标准库提供了以下类型定义:"
namespace std {
namespace chrono {
typedef duration<signed int-type >= 64 bits,nano> nanoseconds;
typedef duration<signed int-type >= 55 bits,micro> microseconds;
typedef duration<signed int-type >= 45 bits,milli> milliseconds;
typedef duration<signed int-type >= 35 bits> seconds;
typedef duration<signed int-type >= 29 bits,ratio<60>> minutes;
typedef duration<signed int-type >= 23 bits,ratio<3600>> hours;
}
}
Run Code Online (Sandbox Code Playgroud)
我的问题是什么signed int-type >= 64 bits意思?这是否意味着signed int减去type?如果是这样,你怎么解释?
mol*_*ilo 15
这不是实际的代码; 它仅说明(以"自然"语言)兼容实现中模板的类型参数所需的内容.
所以"signed int-type> = 64 bits"意味着"任何带有至少64位的有符号整数类型",但字母更少.
| 归档时间: |
|
| 查看次数: |
371 次 |
| 最近记录: |