我在阅读一篇文章时遇到了一个代码,作者指出"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;
}
}
我的问题是signed int-type >= 64 bits
是什么意思?这是否意味着signed int
减去type
?如果是这样,您如何解释?
它不是实际的代码;它只说明(用"自然"语言)在兼容实现中模板的类型参数需要什么。
因此,"有符号 int-type>= 64 位"意味着"任何至少具有 64 位的有符号整数类型",但字母较少。