【发布时间】:2015-04-18 19:20:38
【问题描述】:
我在阅读article时遇到了一段代码,作者指出“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?如果是这样,您如何解释?
【问题讨论】:
-
CPPReference 是 C++ 的一个很好的参考,在这种情况下以更清晰的格式呈现这些 typedef。