| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2014 The Chromium Authors. All rights reserved. | 3 Copyright 2014 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <html> | 7 <html> |
| 8 <head> | 8 <head> |
| 9 <meta charset="utf-8"> | 9 <meta charset="utf-8"> |
| 10 <title>C++11 use in Chromium</title> | 10 <title>C++11 use in Chromium</title> |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 <td>Provide enums as full classes, with no implicit | 158 <td>Provide enums as full classes, with no implicit |
| 159 conversion to booleans or integers. Provide an explicit underlying type for | 159 conversion to booleans or integers. Provide an explicit underlying type for |
| 160 enum classes and regular enums.</td> | 160 enum classes and regular enums.</td> |
| 161 <td><a href="http://www.stroustrup.com/C++11FAQ.html#enum">enum-class</a></td> | 161 <td><a href="http://www.stroustrup.com/C++11FAQ.html#enum">enum-class</a></td> |
| 162 <td>Enum classes are still enums and follow enum naming rules | 162 <td>Enum classes are still enums and follow enum naming rules |
| 163 (which means SHOUTY_CASE in the <a href="http://www.chromium.org/developers/codi
ng-style#Naming">current style guide</a>). | 163 (which means SHOUTY_CASE in the <a href="http://www.chromium.org/developers/codi
ng-style#Naming">current style guide</a>). |
| 164 <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/Q5W
mkAImanc">Discussion thread</a></td> | 164 <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/Q5W
mkAImanc">Discussion thread</a></td> |
| 165 </tr> | 165 </tr> |
| 166 | 166 |
| 167 <tr> | 167 <tr> |
| 168 <td>Explicit Conversion Operators</td> |
| 169 <td><code>explicit operator <i>type</i>() { |
| 170 <br /> // code<br /> }</code></td> |
| 171 <td>Allows conversion operators that cannot be implicitly invoked</td> |
| 172 <td><a href="http://en.cppreference.com/w/cpp/language/explicit"> |
| 173 explicit specifier</a></td> |
| 174 <td>Prefer to the "safe bool" idiom. <a href="https://groups.google.com/a/chromi
um.org/d/msg/chromium-dev/zGF1SrQ-1HQ/BAiC12vwPeEJ">Discussion thread</a></td> |
| 175 </tr> |
| 176 |
| 177 <tr> |
| 168 <td>Final Specifier</td> | 178 <td>Final Specifier</td> |
| 169 <td><code>final</code></td> | 179 <td><code>final</code></td> |
| 170 <td> Indicates that a class or function is final and cannot be overridden</td> | 180 <td> Indicates that a class or function is final and cannot be overridden</td> |
| 171 <td><a href="http://en.cppreference.com/w/cpp/language/final">final Language Ref
erence</a></td> | 181 <td><a href="http://en.cppreference.com/w/cpp/language/final">final Language Ref
erence</a></td> |
| 172 <td>Recommended for new code. Existing uses of the <code>FINAL</code> macro will
be <a href="https://crbug.com/417463">replaced throughout the codebase</a>. <a
href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/VTNZzi
zN0zo">Discussion thread</a></td> | 182 <td>Recommended for new code. Existing uses of the <code>FINAL</code> macro will
be <a href="https://crbug.com/417463">replaced throughout the codebase</a>. <a
href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/VTNZzi
zN0zo">Discussion thread</a></td> |
| 173 </tr> | 183 </tr> |
| 174 | 184 |
| 175 <tr> | 185 <tr> |
| 176 <td>Function Suppression</td> | 186 <td>Function Suppression</td> |
| 177 <td><code><i>Function</i>(<i>arguments</i>) = delete;</code></td> | 187 <td><code><i>Function</i>(<i>arguments</i>) = delete;</code></td> |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 <td><code>constexpr</code></td> | 554 <td><code>constexpr</code></td> |
| 545 <td>Compile-time constant expressions</td> | 555 <td>Compile-time constant expressions</td> |
| 546 <td><a href="http://en.cppreference.com/w/cpp/language/constexpr"> | 556 <td><a href="http://en.cppreference.com/w/cpp/language/constexpr"> |
| 547 constexpr specifier</a></td> | 557 constexpr specifier</a></td> |
| 548 <td>Doesn't work in MSVS2013. Reevalute once it does. <a | 558 <td>Doesn't work in MSVS2013. Reevalute once it does. <a |
| 549 href="https://google.github.io/styleguide/cppguide.html#Use_of_constexpr">Google | 559 href="https://google.github.io/styleguide/cppguide.html#Use_of_constexpr">Google |
| 550 Style Guide on <code>constexpr</code></a></td> | 560 Style Guide on <code>constexpr</code></a></td> |
| 551 </tr> | 561 </tr> |
| 552 | 562 |
| 553 <tr> | 563 <tr> |
| 554 <td>Explicit Conversion Operators</td> | |
| 555 <td><code>explicit operator <i>type</i>() { | |
| 556 <br /> // code<br /> }</code></td> | |
| 557 <td>Allows conversion operators that cannot be implicitly invoked</td> | |
| 558 <td><a href="http://en.cppreference.com/w/cpp/language/explicit"> | |
| 559 explicit specifier</a></td> | |
| 560 <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811334/
bug-in-vs-2013-support-for-explicit-conversion-operators">Doesn't work in MSVS20
13</a>. Reevaluate once it does. <a href="https://groups.google.com/a/chromium.o
rg/d/msg/chromium-dev/zGF1SrQ-1HQ/BAiC12vwPeEJ">Discussion thread</a></td> | |
| 561 </tr> | |
| 562 | |
| 563 <tr> | |
| 564 <td>Function Local Variable</td> | 564 <td>Function Local Variable</td> |
| 565 <td><code>__func__</code></td> | 565 <td><code>__func__</code></td> |
| 566 <td>Provides a local variable of the name of the enclosing | 566 <td>Provides a local variable of the name of the enclosing |
| 567 function for logging purposes</td> | 567 function for logging purposes</td> |
| 568 <td><a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=
338"> | 568 <td><a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=
338"> |
| 569 The __func__ Predeclared Identifier is Coming to C++</a></td> | 569 The __func__ Predeclared Identifier is Coming to C++</a></td> |
| 570 <td>Doesn't work in MSVS2013. Reevaluate once it does. <a href="https://groups.g
oogle.com/a/chromium.org/forum/#!topic/chromium-dev/ojGfcgSDzHM">Discussion thre
ad</a></td> | 570 <td>Doesn't work in MSVS2013. Reevaluate once it does. <a href="https://groups.g
oogle.com/a/chromium.org/forum/#!topic/chromium-dev/ojGfcgSDzHM">Discussion thre
ad</a></td> |
| 571 </tr> | 571 </tr> |
| 572 | 572 |
| 573 <tr> | 573 <tr> |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 C++ Style Guide</a>. However, may be useful for | 1108 C++ Style Guide</a>. However, may be useful for |
| 1109 consuming non-ASCII data.</td> | 1109 consuming non-ASCII data.</td> |
| 1110 </tr> | 1110 </tr> |
| 1111 | 1111 |
| 1112 </tbody> | 1112 </tbody> |
| 1113 </table> | 1113 </table> |
| 1114 | 1114 |
| 1115 </div> | 1115 </div> |
| 1116 </body> | 1116 </body> |
| 1117 </html> | 1117 </html> |
| OLD | NEW |