Google Style Guide "<chrono> is an unapproved C++11 header"
Asked Answered
O

1

10

Why is <chrono> an unapproved header in the Google CPP Guide? I can't find any direct mention of this in the Google CPP Style Guide. This point mentions portability issues with <ratio> and <cfenv> but nothing about <chrono>.

Obaza answered 11/11, 2015 at 15:1 Comment(0)
D
9

According to C++11 use in Chromium The reason is

Duplicated Time APIs in base/. Keep using the base/ classes.

Depositary answered 11/11, 2015 at 15:5 Comment(4)
Given that is the only answer, can you elaborate a bit more?Birgit
@MikeW What more are you looking for?Depositary
E.g. what is the exact issue with duplicating the API and what bugs can it creates with the libraries that use it. basically what is the big picture of using it?Birgit
@MikeW The <chrono> lib is banned in Google's Chromium project because Chromium features its own Time API, wich offers similar functionality. Since your situation is different, you could ignore this line by appending ` // NOLINT [build/c++11]`.Wycliffite

© 2022 - 2024 — McMap. All rights reserved.