Chromium Code Reviews| Index: styleguide/c++/c++11.html |
| diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html |
| index 2776be9feedafe784cac2e3b82c9dd65729047a8..865b0e35356ccf9c90e46f2512955268a014ebae 100644 |
| --- a/styleguide/c++/c++11.html |
| +++ b/styleguide/c++/c++11.html |
| @@ -363,6 +363,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>Lexicographical struct comparison</td> |
| <td><code>tie(a, b, c) <<br> tie(rhs.a, rhs.b, rhs.c)</code></td> |
| <td>Idiom for <code>operator<</code> implementation</td> |
| @@ -395,17 +406,6 @@ 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><type_traits></code></td> |
| <td>Allows compile-time inspection of the properties of types</td> |
| @@ -422,6 +422,17 @@ Standard library header <type_traits></a></td> |
| <td>Anything in <code><cmath></code> is allowed. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/P-1bFBXMeUk">Discussion thread</a></td> |
| </tr> |
| +<tr> |
| +<td>Unordered Associative Containers</td> |
| +<td><code>std::unordered_set</code>, <code>std::unordered_map</code>, |
| +<code>std::unordered_multiset</code>, and <code>std::unordered_multimap</code></td> |
| +<td>Allows efficient containers of key/value pairs</td> |
| +<td><a href="http://en.cppreference.com/w/cpp/container/unordered_map">std::unordered_map</a> |
| +and <a href="http://en.cppreference.com/w/cpp/container/unordered_set">std::unordered_set</a> |
| +</td> |
| +<td>Per the <a href="https://google.github.io/styleguide/cppguide.html#std_hash">Google style guide</a>, specify custom hashers instead of specializing <code>std::hash</code> for custom types. Existing uses of <code>base::hash_map</code>, etc., will be <a href="https://crbug.com/576864">replaced throughout the codebase</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/nCdjQqnouO4">Discussion thread</a>.</td> |
|
danakj
2016/01/14 21:29:10
"Existing uses of <code>base::hash_map</code>, e
davidben
2016/01/16 00:22:23
Done. In fact, yeah, I think the places I copied i
|
| +</tr> |
| + |
| </tbody> |
| </table> |
| @@ -1058,17 +1069,6 @@ Ownership and Smart Pointers</a></td> |
| </tr> |
| <tr> |
| -<td>Unordered Associative Containers</td> |
| -<td><code>std::unordered_set</code>, <code>std::unordered_map</code>, |
| -<code>std::unordered_multiset</code>, and <code>std::unordered_multimap</code></td> |
| -<td>Allows efficient containers of key/value pairs</td> |
| -<td><a href="http://en.cppreference.com/w/cpp/container/unordered_map">std::unordered_map</a> |
| -and <a href="http://en.cppreference.com/w/cpp/container/unordered_set">std::unordered_set</a> |
| -</td> |
| -<td></td> |
| -</tr> |
| - |
| -<tr> |
| <td>Variadic Copy Macro</td> |
| <td><code>va_copy(va_list <i>dest</i>, va_list <i>src</i>)</code></td> |
| <td>Makes a copy of the variadic function arguments</td> |