Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: styleguide/c++/c++11.html

Issue 596723003: Move override/final to the approved C++11 features section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <link rel="stylesheet" href="c++11.css"> 10 <link rel="stylesheet" href="c++11.css">
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 <td>Angle Bracket Parsing in Templates</td> 59 <td>Angle Bracket Parsing in Templates</td>
60 <td><code>&gt;&gt;</code> for <code>&gt; &gt;</code> and <br /> 60 <td><code>&gt;&gt;</code> for <code>&gt; &gt;</code> and <br />
61 <code>&lt;::</code> for <code>&lt; ::</code></td> 61 <code>&lt;::</code> for <code>&lt; ::</code></td>
62 <td>More intuitive parsing of template parameters</td> 62 <td>More intuitive parsing of template parameters</td>
63 <td><a href="http://stackoverflow.com/questions/15785496/c-templates-angle-brack ets-pitfall-what-is-the-c11-fix"> 63 <td><a href="http://stackoverflow.com/questions/15785496/c-templates-angle-brack ets-pitfall-what-is-the-c11-fix">
64 C++ Templates Angle Brackets Pitfall</a></td> 64 C++ Templates Angle Brackets Pitfall</a></td>
65 <td>Recommended to increase readability. Approved without discussion.</td> 65 <td>Recommended to increase readability. Approved without discussion.</td>
66 </tr> 66 </tr>
67 67
68 <tr> 68 <tr>
69 <td>Final Specifier</td>
70 <td><code>final</code></td>
71 <td> Indicates that a class or function is final and cannot be overridden</td>
72 <td><a href="http://en.cppreference.com/w/cpp/language/final">final Language Ref erence</a></td>
73 <td>All uses of the old <code>FINAL</code> macro will be replaced throughout the codebase. Uses should conform to the <a href="http://google-styleguide.googleco de.com/svn/trunk/cppguide.html#Inheritance">C++ style guide</a>.
Nico 2014/09/24 21:46:14 Add "Recommended for new code." at the beginning,
dcheng 2014/09/24 21:50:50 I've replaced this text to indicate that we prefer
74 </tr>
75
76 <tr>
69 <td>Local Types as Template Arguments</td> 77 <td>Local Types as Template Arguments</td>
70 <td></td> 78 <td></td>
71 <td>Allows local and unnamed types as template arguments</td> 79 <td>Allows local and unnamed types as template arguments</td>
72 <td><a href="http://stackoverflow.com/questions/742607/using-local-classes-with- stl-algorithms"> 80 <td><a href="http://stackoverflow.com/questions/742607/using-local-classes-with- stl-algorithms">
73 Local types, types without linkage and unnamed types as template arguments</a></ td> 81 Local types, types without linkage and unnamed types as template arguments</a></ td>
74 <td>Usage should be rare. Approved without discussion.</td> 82 <td>Usage should be rare. Approved without discussion.</td>
75 </tr> 83 </tr>
76 84
77 <tr> 85 <tr>
78 <td>Standard Integers</td>
79 <td>Typedefs within <code>&lt;stdint.h&gt;</code>
80 and <code>&lt;inttypes&gt;</code></td>
81 <td>Provides fixed-size integers independent of platforms</td>
82 <td><a href="http://www.cplusplus.com/reference/cstdint/">
83 &lt;stdint.h&gt; (cstdint)</a></td>
84 <td>Already in common use in the codebase. Approved without discussion.</td>
85 </tr>
86
87 <tr>
88 <td>Null Pointer Constant</td> 86 <td>Null Pointer Constant</td>
89 <td><code>nullptr</code></td> 87 <td><code>nullptr</code></td>
90 <td>Declares a type-safe null pointer</td> 88 <td>Declares a type-safe null pointer</td>
91 <td>TODO: documentation link</td> 89 <td>TODO: documentation link</td>
92 <td>Recommended for new code. 90 <td>Recommended for new code.
93 <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/4mi jeJHzxLg">Discussion thread</a>. 91 <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/4mi jeJHzxLg">Discussion thread</a>.
94 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#0_and_ nullptr/NULL">Google Style Guide</a>. 92 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#0_and_ nullptr/NULL">Google Style Guide</a>.
95 Note: <code>std::nullptr_t</code> is a library feature and not available. 93 Note: <code>std::nullptr_t</code> is a library feature and not available.
96 </td> 94 </td>
97 </tr> 95 </tr>
98 96
97 <tr>
98 <td>Override Specifier</td>
99 <td><code>override</code></td>
100 <td>Indicates that a class or function overrides a base implementation</td>
101 <td><a href="http://en.cppreference.com/w/cpp/language/override">override Langua ge Reference</a></td>
102 <td>All uses of the old <code>OVERRIDE</code> macro will be replaced throughout the codebase. Uses should conform to the <a href="http://google-styleguide.googl ecode.com/svn/trunk/cppguide.html#Inheritance">C++ style guide</a>.
103 </tr>
104
105 <tr>
106 <td>Standard Integers</td>
107 <td>Typedefs within <code>&lt;stdint.h&gt;</code>
108 and <code>&lt;inttypes&gt;</code></td>
109 <td>Provides fixed-size integers independent of platforms</td>
110 <td><a href="http://www.cplusplus.com/reference/cstdint/">
111 &lt;stdint.h&gt; (cstdint)</a></td>
112 <td>Already in common use in the codebase. Approved without discussion.</td>
113 </tr>
114
99 </tbody> 115 </tbody>
100 </table> 116 </table>
101 117
102 <h2 id="blacklist">C++11 Blacklist (Disallowed and Banned Features)</h2> 118 <h2 id="blacklist">C++11 Blacklist (Disallowed and Banned Features)</h2>
103 119
104 <p>This section lists features that are not allowed to be used yet. 120 <p>This section lists features that are not allowed to be used yet.
105 121
106 <h3 id="blacklist_banned">C++11 Banned Features</h3> 122 <h3 id="blacklist_banned">C++11 Banned Features</h3>
107 123
108 <p>None yet! This section will list C++11 features that are not allowed in the 124 <p>None yet! This section will list C++11 features that are not allowed in the
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 <td>Explicit Conversion Operators</td> 276 <td>Explicit Conversion Operators</td>
261 <td><code>explicit operator <i>type</i>() { 277 <td><code>explicit operator <i>type</i>() {
262 <br />&nbsp;&nbsp;// code<br /> }</code></td> 278 <br />&nbsp;&nbsp;// code<br /> }</code></td>
263 <td>Allows conversion operators that cannot be implicitly invoked</td> 279 <td>Allows conversion operators that cannot be implicitly invoked</td>
264 <td><a href="http://en.cppreference.com/w/cpp/language/explicit"> 280 <td><a href="http://en.cppreference.com/w/cpp/language/explicit">
265 explicit specifier</a></td> 281 explicit specifier</a></td>
266 <td></td> 282 <td></td>
267 </tr> 283 </tr>
268 284
269 <tr> 285 <tr>
270 <td>Final Declarations</td>
271 <td><code>final</code></td>
272 <td>Indicates that a class or function is final and cannot be overridden</td>
273 <td>TODO: documentation link</td>
274 <td><code>FINAL</code> is already widely used in the codebase.</td>
275 </tr>
276
277 <tr>
278 <td>Function Local Variable</td> 286 <td>Function Local Variable</td>
279 <td><code>__func__</code></td> 287 <td><code>__func__</code></td>
280 <td>Provides a local variable of the name of the enclosing 288 <td>Provides a local variable of the name of the enclosing
281 function for logging purposes</td> 289 function for logging purposes</td>
282 <td><a href="http://www.informit.com/guides/content.aspx?g=cplusplus&amp;seqNum= 338"> 290 <td><a href="http://www.informit.com/guides/content.aspx?g=cplusplus&amp;seqNum= 338">
283 The __func__ Predeclared Identifier is Coming to C++</a></td> 291 The __func__ Predeclared Identifier is Coming to C++</a></td>
284 <td></td> 292 <td></td>
285 </tr> 293 </tr>
286 294
287 <tr> 295 <tr>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 <i>type</i> <i>var</i> = <i>value</i>;<br/> 344 <i>type</i> <i>var</i> = <i>value</i>;<br/>
337 C() // copy-initializes <i>var</i><br/> 345 C() // copy-initializes <i>var</i><br/>
338 </code> 346 </code>
339 <td>Allows non-static class members to be initialized at their definitions (outs ide constructors)</td> 347 <td>Allows non-static class members to be initialized at their definitions (outs ide constructors)</td>
340 <td><a href="http://en.cppreference.com/w/cpp/language/data_members"> 348 <td><a href="http://en.cppreference.com/w/cpp/language/data_members">
341 Non-static data members</a></td> 349 Non-static data members</a></td>
342 <td></td> 350 <td></td>
343 </tr> 351 </tr>
344 352
345 <tr> 353 <tr>
346 <td>Overrides</td>
347 <td><code>override</code></td>
348 <td>Indicates that a class or function overrides a base implementation</td>
349 <td>TODO: documentation link</td>
350 <td><code>OVERRIDE</code> is already widely used in the codebase.</td>
351 </tr>
352
353 <tr>
354 <td>Range-Based For Loops</td> 354 <td>Range-Based For Loops</td>
355 <td><code>for (<i>type</i> <i>var</i> : <i>range</i>)</code></td> 355 <td><code>for (<i>type</i> <i>var</i> : <i>range</i>)</code></td>
356 <td>Facilitates a more concise syntax for iterating over the elements 356 <td>Facilitates a more concise syntax for iterating over the elements
357 of a container (or a range of iterators) in a <code>for</code> loop</td> 357 of a container (or a range of iterators) in a <code>for</code> loop</td>
358 <td>TODO: documentation link</td> 358 <td>TODO: documentation link</td>
359 <td></td> 359 <td></td>
360 </tr> 360 </tr>
361 361
362 <tr> 362 <tr>
363 <td>Raw String Literals</td> 363 <td>Raw String Literals</td>
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 </tr> 945 </tr>
946 946
947 </tbody> 947 </tbody>
948 </table> 948 </table>
949 949
950 </details> 950 </details>
951 951
952 </div> 952 </div>
953 </body> 953 </body>
954 </html> 954 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698