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

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

Issue 685603005: Allow C++11 Delegated Constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « base/json/json_reader.cc ('k') | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 <td><code><i>Function</i>(<i>arguments</i>) = default;</code></td> 98 <td><code><i>Function</i>(<i>arguments</i>) = default;</code></td>
99 <td>Instructs the compiler to generate a default version 99 <td>Instructs the compiler to generate a default version
100 of the indicated function</td> 100 of the indicated function</td>
101 <td><a href="http://stackoverflow.com/questions/823935/whats-the-point-in-defaul ting-functions-in-c11"> 101 <td><a href="http://stackoverflow.com/questions/823935/whats-the-point-in-defaul ting-functions-in-c11">
102 What's the point in defaulting functions in C++11?</a></td> 102 What's the point in defaulting functions in C++11?</a></td>
103 <td>Doesn't work for move constructors and move assignment operators in MSVC2013 . 103 <td>Doesn't work for move constructors and move assignment operators in MSVC2013 .
104 <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/qgU 4mh_MpGA">Discussion thread</a></td> 104 <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/qgU 4mh_MpGA">Discussion thread</a></td>
105 </tr> 105 </tr>
106 106
107 <tr> 107 <tr>
108 <td>Delegated Constructors</td>
109 <td><code>Class() : Class(0) {}</code><br />
110 <code>Class(<i>type</i> <i>var</i>) : Class(<i>var</i>, 0)</code></td>
111 <td>Allow overloaded constructors to use common initialization code</td>
112 <td><a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4b c0-81c5-3956e82276f3/entry/introduction_to_the_c_11_feature_delegating_construct ors?lang=en">
113 Introduction to the C++11 feature: delegating constructors</a></td>
114 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /0zVA8Ctx3Xo">Discussion thread</a></td>
115 </tr>
116
117 <tr>
108 <td>Enumerated Type Classes and Enum Bases</td> 118 <td>Enumerated Type Classes and Enum Bases</td>
109 <td><code>enum class <i>classname</i></code><br> 119 <td><code>enum class <i>classname</i></code><br>
110 <code>enum class <i>classname</i> : <i>base-type</i></code><br> 120 <code>enum class <i>classname</i> : <i>base-type</i></code><br>
111 <code>enum <i>enumname</i> : <i>base-type</i></code></td> 121 <code>enum <i>enumname</i> : <i>base-type</i></code></td>
112 <td>Provide enums as full classes, with no implicit 122 <td>Provide enums as full classes, with no implicit
113 conversion to booleans or integers. Provide an explicit underlying type for 123 conversion to booleans or integers. Provide an explicit underlying type for
114 enum classes and regular enums.</td> 124 enum classes and regular enums.</td>
115 <td><a href="http://www.stroustrup.com/C++11FAQ.html#enum">enum-class</a></td> 125 <td><a href="http://www.stroustrup.com/C++11FAQ.html#enum">enum-class</a></td>
116 <td>Enum classes are still enums and follow enum naming rules 126 <td>Enum classes are still enums and follow enum naming rules
117 (which means SHOUTY_CASE in the <a href="http://www.chromium.org/developers/codi ng-style#Naming">current style guide</a>). 127 (which means SHOUTY_CASE in the <a href="http://www.chromium.org/developers/codi ng-style#Naming">current style guide</a>).
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 <td>Default Function Template Arguments</td> 406 <td>Default Function Template Arguments</td>
397 <td><code>template &lt;typename T = <i>type</i>&gt; <br /> 407 <td><code>template &lt;typename T = <i>type</i>&gt; <br />
398 &nbsp;&nbsp;<i>type</i> <i>Function</i>(T <i>var</i>) {}</code></td> 408 &nbsp;&nbsp;<i>type</i> <i>Function</i>(T <i>var</i>) {}</code></td>
399 <td>Allow function templates, like classes, to have default arguments</td> 409 <td>Allow function templates, like classes, to have default arguments</td>
400 <td><a href="http://stackoverflow.com/questions/2447458/default-template-argumen ts-for-function-templates"> 410 <td><a href="http://stackoverflow.com/questions/2447458/default-template-argumen ts-for-function-templates">
401 Default Template Arguments for Function Templates</a></td> 411 Default Template Arguments for Function Templates</a></td>
402 <td></td> 412 <td></td>
403 </tr> 413 </tr>
404 414
405 <tr> 415 <tr>
406 <td>Delegated Constructors</td>
407 <td><code>Class() : Class(0) {}</code><br />
408 <code>Class(<i>type</i> <i>var</i>) : Class(<i>var</i>, 0)</code></td>
409 <td>Allow overloaded constructors to use common initialization code</td>
410 <td><a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4b c0-81c5-3956e82276f3/entry/introduction_to_the_c_11_feature_delegating_construct ors?lang=en">
411 Introduction to the C++11 feature: delegating constructors</a></td>
412 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /0zVA8Ctx3Xo">Discussion thread</a></td>
413 </tr>
414
415 <tr>
416 <td>Exception Features</td> 416 <td>Exception Features</td>
417 <td><code>noexcept</code>, <code>exception_ptr</code>, 417 <td><code>noexcept</code>, <code>exception_ptr</code>,
418 <code>current_exception()</code>, <code>rethrow_exception</code>, 418 <code>current_exception()</code>, <code>rethrow_exception</code>,
419 and <code>nested_exception</code></td> 419 and <code>nested_exception</code></td>
420 <td>Enhancements to exception throwing and handling</td> 420 <td>Enhancements to exception throwing and handling</td>
421 <td><a href="http://en.cppreference.com/w/cpp/error/exception"> 421 <td><a href="http://en.cppreference.com/w/cpp/error/exception">
422 std::exception</a></td> 422 std::exception</a></td>
423 <td>Exceptions are banned by the 423 <td>Exceptions are banned by the
424 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Except ions"> C++ Style Guide</a>. <a href="https://groups.google.com/a/chromium.org/fo rum/#!topic/chromium-dev/8i4tMqNpHhg">Discussion thread</a></td> 424 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Except ions"> C++ Style Guide</a>. <a href="https://groups.google.com/a/chromium.org/fo rum/#!topic/chromium-dev/8i4tMqNpHhg">Discussion thread</a></td>
425 </tr> 425 </tr>
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 </tr> 966 </tr>
967 967
968 </tbody> 968 </tbody>
969 </table> 969 </table>
970 970
971 </details> 971 </details>
972 972
973 </div> 973 </div>
974 </body> 974 </body>
975 </html> 975 </html>
OLDNEW
« no previous file with comments | « base/json/json_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698