| OLD | NEW |
| 1 C++11 in Skia | 1 C++11 in Skia |
| 2 ============= | 2 ============= |
| 3 | 3 |
| 4 Skia uses C++11. But as a library, we are technically limited by what our | 4 Skia uses C++11. But as a library, we are technically limited by what our |
| 5 clients support and what our build bots support. | 5 clients support and what our build bots support. |
| 6 | 6 |
| 7 Skia may also be limited by restrictions we choose put on ourselves. This | 7 Skia may also be limited by restrictions we choose put on ourselves. This |
| 8 document is not concerned with C++11 policy in Skia, only its technical | 8 document is not concerned with C++11 policy in Skia, only its technical |
| 9 feasibility. This is about what we can use, a superset of what we may use. | 9 feasibility. This is about what we can use, a superset of what we may use. |
| 10 | 10 |
| 11 The gist: | 11 The gist: |
| 12 | 12 |
| 13 - C++11 the language as supported by GCC 4.7 or later is pretty usable. | 13 - C++11 the language as supported by GCC 4.7 or later is pretty usable. |
| 14 - The C++11 standard library can generally be used, with some teething. | 14 - The C++11 standard library can generally be used, with some teething. |
| 15 - If you break a bot, that feature is not usable. | 15 - If you break a bot, that feature is not usable. |
| 16 - Local statics are not thread safe. | 16 - Local statics are not thread safe. |
| 17 | 17 |
| 18 | 18 |
| 19 Clients | 19 Clients |
| 20 ------- | 20 ------- |
| 21 | 21 |
| 22 The clients we pay most attention to are Chrome, Android, Mozilla, and a few | 22 The clients we pay most attention to are Chrome, Android, Mozilla, and a few |
| 23 internal Google projects. | 23 internal Google projects. |
| 24 | 24 |
| 25 Chrome builds with a recent Clang on Mac and Linux and with a recent MSVC on | 25 Chrome builds with a recent Clang on Mac and Linux and with a recent MSVC on |
| 26 Windows. These toolchains are new enough to not be the weak link to use any | 26 Windows. These toolchains are new enough to not be the weak link to use any |
| 27 C++11 language feature. | 27 C++11 language feature. Chromium, however, builds against libstdc++4.6.4 |
| 28 (STL and runtime) on Linux. This precludes direct use of a number of type |
| 29 traits. |
| 28 | 30 |
| 29 Chrome intentionally disables thread-safe initialization of static variables, | 31 Chrome intentionally disables thread-safe initialization of static variables, |
| 30 so we cannot rely on that. Our bots disable this too, so keep an eye on TSAN. | 32 so we cannot rely on that. Our bots disable this too, so keep an eye on TSAN. |
| 31 | 33 |
| 32 Android builds with either a somewhat aged GCC or a recent Clang. They're | 34 Android builds with either a somewhat aged GCC or a recent Clang. They're |
| 33 generally not a weak link for C++11 language features. Android's C++ standard | 35 generally not a weak link for C++11 language features. Android's C++ standard |
| 34 library had historically been a pain, but seems to work fine these days. | 36 library had historically been a pain, but seems to work fine these days. |
| 35 | 37 |
| 36 Mozilla's current weak link is a minimum requirement of GCC 4.7. Most features | 38 Mozilla's current weak link is a minimum requirement of GCC 4.7. Most features |
| 37 marked in red on Mozilla's C++11 [feature | 39 marked in red on Mozilla's C++11 [feature |
| 38 matrix](https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code) are | 40 matrix](https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code) are |
| 39 marked that way because they arrived in GCC 4.8. Their minimum-supported Clang | 41 marked that way because they arrived in GCC 4.8. Their minimum-supported Clang |
| 40 and MSVC toolchains are pretty good, but MSVC 2013 will become the weak link soo
n. | 42 and MSVC toolchains are pretty good, but MSVC 2013 will become the weak link soo
n. |
| 41 | 43 |
| 42 Internal Google projects tend to support C++11 completely, including the | 44 Internal Google projects tend to support C++11 completely, including the |
| 43 full C++11 standard library. | 45 full C++11 standard library. |
| 44 | 46 |
| 45 | 47 |
| 46 Bots | 48 Bots |
| 47 ---- | 49 ---- |
| 48 | 50 |
| 49 Most of our bots are pretty up-to-date: the Windows bots use MSVC 2013, the Mac | 51 Most of our bots are pretty up-to-date: the Windows bots use MSVC 2013, the Mac |
| 50 bots a recent Clang, and the Linux bots GCC 4.8 or a recent Clang. Our Android | 52 bots a recent Clang, and the Linux bots GCC 4.8 or a recent Clang. Our Android |
| 51 bots use a recent toolchain from Android (see above), and our Chrome bots use | 53 bots use a recent toolchain from Android (see above), and our Chrome bots use |
| 52 Chrome's toolchains (see above). I'm not exactly sure what our Chrome OS bots | 54 Chrome's toolchains (see above). I'm not exactly sure what our Chrome OS bots |
| 53 are using. They're probably our weak link right now, though problems are rare. | 55 are using. They're probably our weak link right now, though problems are rare. |
| 54 | 56 |
| 55 I believe our bots' ability to use C++11 matches Mozilla's list nearly identical
ly. | 57 I believe our bots' ability to use C++11 matches Mozilla's list nearly identical
ly. |
| OLD | NEW |