Index: styleguide/c++/c++11.html |
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html |
index b83449f05a047542fe1276351e1708d17437926e..a90f443d14e91810de31404ec5922755734ac6ea 100644 |
--- a/styleguide/c++/c++11.html |
+++ b/styleguide/c++/c++11.html |
@@ -200,7 +200,7 @@ enum <i>enumname</i> : <i>base-type</i></code></td> |
<td><code>void func() {<br /> |
class Pred {<br /> |
public:<br /> |
- bool operator()(const T&) { ... }<br /> |
+ bool operator()(const T&) { ... }<br /> |
};<br /> |
std::remove_if(vec.begin(), vec.end(), Pred());</code></td> |
<td>Allows local and unnamed types as template arguments</td> |
@@ -213,7 +213,7 @@ enum <i>enumname</i> : <i>base-type</i></code></td> |
<td><code>void f() noexcept</code></td> |
<td>Specifies that a function will not throw exceptions</td> |
<td><a href="http://en.cppreference.com/w/cpp/language/noexcept_spec">noexcept specifier</a></td> |
-<td>Chromium compiles without exception support, but there are still cases where explicitly marking a function as <code>noexcept</code> may be necessary to compile, or for performance reasons. Usage should be rare. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/8i4tMqNpHhg">Discussion thread</a></td> |
+<td>Chromium compiles without exception support, but there are still cases where explicitly marking a function as <code>noexcept</code> may be necessary to compile, or for performance reasons. Use noexcept for move constructors whenever possible (see "Notes" section on <a href="http://en.cppreference.com/w/cpp/language/move_constructor">move constructors</a>). Other usage should be rare. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/8i4tMqNpHhg">Discussion thread</a></td> |
</tr> |
<tr> |
@@ -247,13 +247,13 @@ enum <i>enumname</i> : <i>base-type</i></code></td> |
<td><code>for (<i>type</i> <i>var</i> : <i>range</i>)</code></td> |
<td>Facilitates a more concise syntax for iterating over the elements of a container (or a range of iterators) in a <code>for</code> loop</td> |
<td><a href="http://en.cppreference.com/w/cpp/language/range-for">Range-based for loop</a></td> |
-<td>As a rule of thumb, use <code>for (const auto& ...)</code>, <code>for (auto& ...)</code>, or <code>for (<i>concrete type</i> ...)</code>. For pointers, use <code>for (auto* ...)</code> to make clear that the copy of the loop variable is intended, and only a pointer is copied. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/hpzz4EqbVmc">Discussion thread</a></td> |
+<td>As a rule of thumb, use <code>for (const auto& ...)</code>, <code>for (auto& ...)</code>, or <code>for (<i>concrete type</i> ...)</code>. For pointers, use <code>for (auto* ...)</code> to make clear that the copy of the loop variable is intended, and only a pointer is copied. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/hpzz4EqbVmc">Discussion thread</a></td> |
</tr> |
<tr> |
<td>Rvalue References</td> |
<td><code>T(T&& t)</code> and <code>T& operator=(T&& t)<br/><br/> |
-template <typename T><br/>void Function(T&& t) { ... }</code></td> |
+template <typename T><br/>void Function(T&& t) { ... }</code></td> |
<td>Reference that only binds to a temporary object</td> |
<td><a href="http://en.cppreference.com/w/cpp/language/reference#Rvalue_references">Rvalue references</a></td> |
<td>Only use these to define move constructors and move assignment operators, and for perfect forwarding. Most classes should not be copyable, even if movable. Continue to use DISALLOW_COPY_AND_ASSIGN in most cases. <a href="https://google.github.io/styleguide/cppguide.html#Rvalue_references">Google Style Guide</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/UnRaORb4TSw">Discussion thread</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/Q526tkruXpM">Another discussion thread</a></td> |
@@ -277,7 +277,7 @@ template <typename T><br/>void Function(T&& t) { ... }</code></td> |
<tr> |
<td>Trailing Return Types</td> |
-<td><code>auto <i>function declaration</i> -> <i>return_type</i></code></td> |
+<td><code>auto <i>function declaration</i> -> <i>return_type</i></code></td> |
<td>Allows trailing function return value syntax</td> |
<td><a href="http://en.cppreference.com/w/cpp/language/function">Declaring functions</a></td> |
<td>Use only where it considerably improves readability. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/OQyYSfH9m2M">Discussion thread</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/Lkp0nubVd0Q">Another discussion thread</a></td> |
@@ -564,8 +564,8 @@ codebase. |
<tr> |
<td>Ref-qualified Member Functions</td> |
<td><code>class T {<br /> |
- void f() & {}<br /> |
- void f() && {}<br /> |
+ void f() & {}<br /> |
+ void f() && {}<br /> |
};<br /> |
t.f(); // first<br /> |
T().f(); // second<br /> |