Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: styleguide/c++/c++11.html

Issue 1438073002: Use std::tie for multi-member comparisons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style guide updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_service_worker_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: styleguide/c++/c++11.html
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index ee1241444212fc56322b6219092e0fffeaa95074..e132f6853de48402be9d4479d42fda729488fec5 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -280,6 +280,14 @@ Parameter pack</a></td>
<td>TODO</td>
<td>Allows getting rid of <a href="http://crbug.com/554289">ScopedVector</a></td>
</tr>
+
+<tr>
+<td>Lexicographical struct comparison</td>
+<td><code>tie(a, b, c) &lt;<br>&nbsp; tie(rhs.a, rhs.b, rhs.c)</code></td>
+<td>Idiom for <code>operator&lt;</code> implementation</td>
+<td><a href="http://en.cppreference.com/w/cpp/utility/tuple/tie">std::tie</a></td>
+<td>General use of <code>std::tuple</code>, and <code>std::tie</code> for unpacking or multiple assignments is still not allowed. <a href="https://groups.google.com/a/chromium.org/d/topic/cxx/3DZ64dIMRTY/discussion">Discussion thread</a></td>
+</tr>
</tbody>
</table>
@@ -928,8 +936,8 @@ Declaring functions</a></td>
<td>Tuples</td>
<td><code>std::tuple</code></td>
<td>A fixed-size ordered collection of values of mixed types</td>
-<td>TODO: documentation link</td>
-<td></td>
+<td><a href="http://en.cppreference.com/w/cpp/utility/tuple">std::tuple</a></td>
+<td><a href="https://crbug.com/554987">Tracking bug</a> to plan moving from <code>base::Tuple</code> to <code>std::tuple</code>. See also <code>std::tie</code></td>
</tr>
<tr>
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_service_worker_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698