summaryrefslogtreecommitdiffstats
path: root/styleguide
diff options
context:
space:
mode:
authorpkasting <pkasting@chromium.org>2015-12-05 17:52:18 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-06 01:52:58 +0000
commit2f966af10710fdfdcdbbde8c943794197d9134f5 (patch)
treedac2213a433d63d8a667ca59f7faebd2e366686f /styleguide
parent1ffea991ffacd82ebb155edff782e4054bb1e561 (diff)
downloadchromium_src-2f966af10710fdfdcdbbde8c943794197d9134f5.zip
chromium_src-2f966af10710fdfdcdbbde8c943794197d9134f5.tar.gz
chromium_src-2f966af10710fdfdcdbbde8c943794197d9134f5.tar.bz2
Allow <cmath>.
While here, this also * Alphabetizes the section * Eliminates a period after "Discussion thread" in one place (since none of the other entries had one) * Formats the file one-cell-per-line (since most of the entries were already like this) Review URL: https://codereview.chromium.org/1498333002 Cr-Commit-Position: refs/heads/master@{#363351}
Diffstat (limited to 'styleguide')
-rw-r--r--styleguide/c++/c++11.html51
1 files changed, 23 insertions, 28 deletions
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index daa43e2..85ff363 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -303,7 +303,7 @@ Parameter pack</a></td>
<td><code>v.data()</code></td>
<td>Returns a pointer to a <code>std::vector</code>'s underlying data, accounting for empty vectors.</td>
<td><a href="http://en.cppreference.com/w/cpp/container/vector/data">std::vector::data</a></td>
-<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/16V7fmtbzok">Discussion thread</a>.</td>
+<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/16V7fmtbzok">Discussion thread</a></td>
</tr>
<tr>
@@ -319,6 +319,14 @@ std::end</a></td>
</tr>
<tr>
+<td>Conditional Type Selection</td>
+<td><code>std::enable_if</code> and <code>std::conditional</code></td>
+<td>Enables compile-time conditional type selection</td>
+<td><a href="http://en.cppreference.com/w/cpp/types/enable_if">std::enable_if</a> and <a href="http://en.cppreference.com/w/cpp/types/conditional">conditional</a></td>
+<td>Usage should be rare. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Containers containing movable types</td>
<td><code>vector&lt;scoped_ptr&gt;</code></td>
<td>Enables containers that contain move-only types like <code>scoped_ptr</code></td>
@@ -335,26 +343,22 @@ std::end</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>
+<td><a href="http://en.cppreference.com/w/cpp/iterator/make_move_iterator">std::make_move_iterator</a></td>
+<td>Useful to move objects between containers that contain move-only types like <code>scoped_ptr</code>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/lccnUljOHQU">Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Move Semantics</td>
<td><code>std::move()</code></td>
<td>Facilitates efficient move operations</td>
-<td><a href="http://en.cppreference.com/w/cpp/utility/move">
-<code>std::move</code> reference</a></td>
+<td><a href="http://en.cppreference.com/w/cpp/utility/move"><code>std::move</code> reference</a></td>
<td>Note: std::move() is allowed but writing your own move constructors is still only allowed in exceptional cases for now, see 'Rvalue References (and Move Semantics)'. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/x_dWFxJFdbM'>Discussion thread</a></td>
</tr>
<tr>
-<td>Conditional Type Selection</td>
-<td><code>std::enable_if</code> and <code>std::conditional</code></td>
-<td>Enables compile-time conditional type selection</td>
-<td><a href="http://en.cppreference.com/w/cpp/types/enable_if">
-std::enable_if</a> and
-<a href="http://en.cppreference.com/w/cpp/types/conditional">
-conditional</a></td>
-<td>Usage should be rare.<a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>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>
@@ -364,12 +368,11 @@ Standard library header &lt;type_traits&gt;</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>
-<td><a href="http://en.cppreference.com/w/cpp/iterator/make_move_iterator">
-std::make_move_iterator</a></td>
-<td>Useful to move objects between containers that contain move-only types like <code>scoped_ptr</code>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/lccnUljOHQU">Discussion thread</a></td>
+<td>Types, functions, and constants from <code>&lt;cmath&gt;</code></td>
+<td><code>std::round()</code>, <code>std::isnan()</code>, and others</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>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>
</tbody>
@@ -834,14 +837,6 @@ std::declare_no_pointers</a></td>
</tr>
<tr>
-<td>Is Nan</td>
-<td><code>std::isnan()</code></td>
-<td>Determines if a floating point value is not-a-number</td>
-<td><a href="http://en.cppreference.com/w/cpp/numeric/math/isnan">std::isnan</a></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