繁体   English   中英

以下typedef在chrono :: duration中的含义是什么?

[英]What does the following typedef mean in chrono::duration?

我在阅读文章时遇到了一个代码,作者声称“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 如果是这样,你怎么解释?

这不是实际的代码; 它仅说明(以“自然”语言)兼容实现中模板的类型参数所需的内容。

所以“signed int-type> = 64 bits”意味着“任何带有至少64位的有符号整数类型”,但字母更少。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM