Commit d9a02e76 authored by danakj's avatar danakj Committed by Commit bot

styleguide: Move Rvalue References to the Blacklist with Exceptions.

The discussion around Rvalue references has been that we should ban
their use for now, but come back to it later. So that is what this
does.

One exceptional case that was agreed upon without dissent was to allow
move semantics in scoped_ptr to allow use of scoped_ptr cleaner
throughout the codebase, without leaking the requirement to understand
Rvalue references outside of the scoped_ptr implementation.

R=jamesr@chromium.org, thakis@chromium.org

Review URL: https://codereview.chromium.org/607773002

Cr-Commit-Position: refs/heads/master@{#297016}
parent d9b040ba
......@@ -163,6 +163,28 @@ Are Variadic macros nonstandard?</a></td>
<p>This section lists features that are not allowed to be used yet.
<table id="banned_list" class="unlined striped">
<tbody>
<tr>
<th style='width:240px;'>Feature or Library</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes</th>
</tr>
<tr>
<td>Rvalue References (and Move Semantics)</td>
<td><code>T(T&amp;&amp; t)</code> and <code>T&amp; operator=(T&amp;&amp; t)</code></td>
<td>Reference that only binds to a temporary object</td>
<td>TODO: documentation link</td>
<td>To be revisited in the future. Allowed in exceptional cases where approved by the OWNERS of src/styleguide/c++/.</td>
</tr>
</tbody>
</table>
<h3 id="blacklist_banned">C++11 Banned Features</h3>
<p>This section will list C++11 features that are not allowed in the Chromium
......@@ -413,14 +435,6 @@ sequences, easing parsing in regex expressions, for example</td>
<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/2kWQHbbuMHI">Discussion thread</a></td>
</tr>
<tr>
<td>Rvalue References (and Move Semantics)</td>
<td><code>T(T&amp;&amp; t)</code> and <code>T&amp; operator=(T&amp;&amp; t)</code></td>
<td>Reference that only binds to a temporary object</td>
<td>TODO: documentation link</td>
<td></td>
</tr>
<tr>
<td>Union Class Members</td>
<td><code>union <i>name</i> { <i>class</i> <i>var</i>}</code></td>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment