summaryrefslogtreecommitdiffstats
path: root/styleguide
diff options
context:
space:
mode:
authorjbroman <jbroman@chromium.org>2016-01-07 15:20:56 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-07 23:22:25 +0000
commit65552a1fac29a82419c1eb237b09aa728d541595 (patch)
tree69a067cf4afb049610ad4c4c2b17adec63251abf /styleguide
parente3ea96d84335e7bc9249b3355bd8b92346508edf (diff)
downloadchromium_src-65552a1fac29a82419c1eb237b09aa728d541595.zip
chromium_src-65552a1fac29a82419c1eb237b09aa728d541595.tar.gz
chromium_src-65552a1fac29a82419c1eb237b09aa728d541595.tar.bz2
styleguide: Allow std::forward with guidance.
Uses already exist in Chromium, so this works on our platforms. NOTRY=true Review URL: https://codereview.chromium.org/1571483002 Cr-Commit-Position: refs/heads/master@{#368189}
Diffstat (limited to 'styleguide')
-rw-r--r--styleguide/c++/c++11.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index 1e14b42..3f014b1 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -395,6 +395,17 @@ std::end</a></td>
</tr>
<tr>
+<td>Forwarding references</td>
+<td><code>std::forward()</code></td>
+<td>Perfectly forwards arguments (including rvalues)</td>
+<td><a href="http://en.cppreference.com/w/cpp/utility/forward"><code>std::forward</code></a></td>
+<td>
+ Allowed, though usage should be rare (primarily for forwarding constructor arguments, or in carefully reviewed library code).
+ <a href="https://groups.google.com/a/chromium.org/d/topic/cxx/-O7euklhSxs/discussion">Discussion thread</a>
+</td>
+</tr>
+
+<tr>
<td>Type Traits</td>
<td>Class templates within <code>&lt;type_traits&gt;</code></td>
<td>Allows compile-time inspection of the properties of types</td>