summaryrefslogtreecommitdiffstats
path: root/styleguide
diff options
context:
space:
mode:
authormdempsky <mdempsky@chromium.org>2014-11-06 21:25:12 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-07 05:25:28 +0000
commit2319bef8605fb694894a6209f02568414b102152 (patch)
tree969ecee2c26ee312a7f87fff4271a893891bcfbf /styleguide
parentfd5030a219ce844d2d86bb2530dce9088e3c0523 (diff)
downloadchromium_src-2319bef8605fb694894a6209f02568414b102152.zip
chromium_src-2319bef8605fb694894a6209f02568414b102152.tar.gz
chromium_src-2319bef8605fb694894a6209f02568414b102152.tar.bz2
styleguide: Allow "= default" and "= delete"
NOTRY=true Review URL: https://codereview.chromium.org/685933004 Cr-Commit-Position: refs/heads/master@{#303191}
Diffstat (limited to 'styleguide')
-rw-r--r--styleguide/c++/c++11.html39
1 files changed, 20 insertions, 19 deletions
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index f99a8eb..41671bd 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -94,6 +94,17 @@ decltype specifier</a></td>
</tr>
<tr>
+<td>Default Function Creation</td>
+<td><code><i>Function</i>(<i>arguments</i>) = default;</code></td>
+<td>Instructs the compiler to generate a default version
+of the indicated function</td>
+<td><a href="http://stackoverflow.com/questions/823935/whats-the-point-in-defaulting-functions-in-c11">
+What's the point in defaulting functions in C++11?</a></td>
+<td>Doesn't work for move constructors and move assignment operators in MSVC2013.
+<a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/qgU4mh_MpGA">Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Enumerated Type Classes and Enum Bases</td>
<td><code>enum class <i>classname</i></code><br>
<code>enum class <i>classname</i> : <i>base-type</i></code><br>
@@ -116,6 +127,15 @@ enum classes and regular enums.</td>
</tr>
<tr>
+<td>Function Suppression</td>
+<td><code><i>Function</i>(<i>arguments</i>) = delete;</code></td>
+<td>Suppresses the implementation of a function, especially a
+synthetic function such as a copy constructor</td>
+<td>TODO: documentation link</td>
+<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/i1o7-RNRnMs">Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Lambda Expressions</td>
<td><code>[<i>captures</i>](<i>params</i>) -&gt; <i>ret</i> { <i>body</i> }</code></td>
<td>Anonymous functions</td>
@@ -373,16 +393,6 @@ C++11 generalized attributes</a></td>
</tr>
<tr>
-<td>Default Function Creation</td>
-<td><code><i>Function</i>(<i>arguments</i>) = default;</code></td>
-<td>Instructs the compiler to generate a default version
-of the indicated function</td>
-<td><a href="http://stackoverflow.com/questions/823935/whats-the-point-in-defaulting-functions-in-c11">
-What's the point in defaulting functions in C++11?</a></td>
-<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/qgU4mh_MpGA">Discussion thread</a></td>
-</tr>
-
-<tr>
<td>Default Function Template Arguments</td>
<td><code>template &lt;typename T = <i>type</i>&gt; <br />
&nbsp;&nbsp;<i>type</i> <i>Function</i>(T <i>var</i>) {}</code></td>
@@ -415,15 +425,6 @@ std::exception</a></td>
</tr>
<tr>
-<td>Function Suppression</td>
-<td><code><i>Function</i>(<i>arguments</i>) = delete;</code></td>
-<td>Suppresses the implementation of a function, especially a
-synthetic function such as a copy constructor</td>
-<td>TODO: documentation link</td>
-<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/i1o7-RNRnMs">Discussion thread</a></td>
-</tr>
-
-<tr>
<td>Inline Namespaces</td>
<td><code>inline</code></td>
<td>Allows better versioning of namespaces</td>