【发布时间】:2015-11-11 15:01:00
【问题描述】:
为什么<chrono> 在 Google CPP 指南中是未经批准的标头?我在Google CPP Style Guide 中找不到任何直接提及的内容。 This point 提到了 <ratio> 和 <cfenv> 的可移植性问题,但没有提到 <chrono>。
【问题讨论】:
标签: c++ c++11 google-style-guide
为什么<chrono> 在 Google CPP 指南中是未经批准的标头?我在Google CPP Style Guide 中找不到任何直接提及的内容。 This point 提到了 <ratio> 和 <cfenv> 的可移植性问题,但没有提到 <chrono>。
【问题讨论】:
标签: c++ c++11 google-style-guide
base/中的TimeAPI 重复。继续使用base/类。
【讨论】:
<chrono> 库在 Google 的 Chromium 项目中被禁止,因为 Chromium 有自己的 Time API,它提供了类似的功能。由于您的情况不同,您可以通过附加`// NOLINT [build/c++11]`来忽略这一行。