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

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

Issue 1662933002: Allow <algorithm>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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 | « no previous file | 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 8c3cbc0426634f5be32e0a81cdbeeddda577b3ba..cef58cf5fbbf2763e007d164a0dd9f53df49fb55 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -335,6 +335,14 @@ Parameter pack</a></td>
</tr>
<tr>
+<td>Algorithms</td>
+<td>Everything in <code>&lt;algorithm&gt;</code></td>
+<td>Safe and performant implementations of common algorithms</td>
+<td><a href="http://en.cppreference.com/w/cpp/header/algorithm"><code>&lt;algorithm&gt;</code></a></td>
+<td>Note that range-based move() is allowed, but there is usually a way to write code without it that is cleaner and more readable. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/UJQk8S1IuHk">Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Begin and End Non-Member Functions</td>
<td><code>std::begin()</code> and <code>std::end()</code></td>
<td>Allows use of free functions on any container, including
@@ -382,6 +390,14 @@ std::end</a></td>
</tr>
<tr>
+<td>Math functions</td>
+<td>Everything in <code>&lt;cmath&gt;</code></td>
+<td>Useful for math-related code</td>
+<td><a href="http://en.cppreference.com/w/cpp/header/cmath"><code>&lt;cmath&gt;</code></a></td>
+<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/P-1bFBXMeUk">Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Move Iterator Adaptor</td>
<td><code>std::make_move_iterator()</code></td>
<td>Wraps an iterator so that it moves objects instead of copying them.</td>
@@ -398,31 +414,14 @@ std::end</a></td>
</tr>
<tr>
-<td>Range Move</td>
-<td><code>std::move()</code></td>
danakj 2016/02/03 23:32:19 Can you keep this as a separate point, or keep the
Nico 2016/02/03 23:46:09 you mean the "Moves contents of an iterator range
danakj 2016/02/03 23:47:51 I was thinking also of the "probably don't use tho
Peter Kasting 2016/02/03 23:54:09 So, are you saying the wording for that that I kep
-<td>Moves contents of an iterator range to a different iterator. This is a counterpart of std::copy that applies std::move() to each element.</td>
-<td><a href="http://en.cppreference.com/w/cpp/algorithm/move"><code>std::move</code> reference</a></td>
-<td>This is allowed, but there is almost always a way to write code without using this version of std::move. Not using it usually results in cleaner, easier to read, and less confusing code. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/8WzmtYrZvQ8'>Discussion thread</a></td>
-</tr>
-
-<tr>
<td>Type Traits</td>
-<td>Class templates within <code>&lt;type_traits&gt;</code></td>
+<td>Everything in <code>&lt;type_traits&gt;</code></td>
<td>Allows compile-time inspection of the properties of types</td>
-<td><a href="http://en.cppreference.com/w/cpp/header/type_traits">
-Standard library header &lt;type_traits&gt;</a></td>
+<td><a href="http://en.cppreference.com/w/cpp/header/type_traits">&lt;type_traits&gt;</a></td>
<td>Note that not all type traits are available on all platforms (eg std::underlying_type doesn't work in libstdc++4.6). Use judiciously. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a></td>
</tr>
<tr>
-<td>Types, functions, and constants from <code>&lt;cmath&gt;</code></td>
-<td><code>std::round()</code>, <code>std::isnan()</code>, and others</td>
Nico 2016/02/03 23:46:09 i like having these function snippets; i ctrl-f fo
Peter Kasting 2016/02/03 23:54:09 I don't like picking a couple of functions seeming
-<td>Useful for math-related code</td>
-<td><a href="http://en.cppreference.com/w/cpp/header/cmath"><code>&lt;cmath&gt;</code></a></td>
-<td>Anything in <code>&lt;cmath&gt;</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>
@@ -903,14 +902,6 @@ std::declare_no_pointers</a></td>
</tr>
<tr>
-<td>Heap Validation</td>
-<td><code>std::is_heap()</code></td>
-<td>Checks whether an iterator range is in fact a heap</td>
-<td>TODO: documentation link</td>
-<td></td>
-</tr>
-
-<tr>
<td>Iterator Operators</td>
<td><code>std::next()</code> and <code>std::prev()</code></td>
<td>Copies an iterator and increments or decrements the copy by
@@ -1002,15 +993,6 @@ std::stof, std::stod, std::stold</a> </td>
</tr>
<tr>
-<td>STL Algorithms</td>
-<td>Functions within <code>&lt;algorithm&gt;</code>.</td>
-<td>Enhancements to the set of STL algorithms</td>
-<td>See the <a href="http://en.cppreference.com/w/cpp/algorithm">
-Algorithms library</a> for a complete list.</td>
-<td></td>
-</tr>
-
-<tr>
<td>System Errors</td>
<td><code>&lt;system_error&gt;</code></td>
<td>Provides a standard system error library</td>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698